Skip to content

Commit

Permalink
DEVPROD-949 Only surface build variant for current task on task histo…
Browse files Browse the repository at this point in the history
…ry page (evergreen-ci#2129)
  • Loading branch information
khelif96 authored Nov 1, 2023
1 parent 1d33a16 commit 8aceacf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ const getHistoryRoute = (
failingTests?: string[];
passingTests?: string[];
},
selectedCommit?: number
selectedCommit?: number,
visibleColumns?: string[]
) => {
if (filters || selectedCommit) {
const failingTests = toArray(filters?.failingTests);
Expand All @@ -267,6 +268,7 @@ const getHistoryRoute = (
[TestStatus.Failed]: failingTests,
[TestStatus.Passed]: passingTests,
[HistoryQueryParams.SelectedCommit]: selectedCommit,
[HistoryQueryParams.VisibleColumns]: visibleColumns,
});
return `${basePath}?${queryParams}`;
}
Expand Down Expand Up @@ -302,14 +304,16 @@ export const getTaskHistoryRoute = (
passingTests?: string[];
};
selectedCommit?: number;
visibleColumns?: string[];
}
) => {
const { filters, selectedCommit } = options || {};
const { filters, selectedCommit, visibleColumns } = options || {};

return getHistoryRoute(
`${paths.taskHistory}/${encodeURIComponent(projectIdentifier)}/${taskName}`,
filters,
selectedCommit
selectedCommit,
visibleColumns
);
};

Expand Down
2 changes: 2 additions & 0 deletions src/pages/task/ActionButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const ActionButtons: React.FC<Props> = ({
task,
}) => {
const {
buildVariant,
canAbort,
canDisable,
canOverrideDependencies,
Expand Down Expand Up @@ -178,6 +179,7 @@ export const ActionButtons: React.FC<Props> = ({
const HistoryLink = useLGButtonRouterLink(
getTaskHistoryRoute(projectIdentifier, displayName, {
selectedCommit: !isPatch && order,
visibleColumns: [buildVariant],
})
);

Expand Down
3 changes: 2 additions & 1 deletion src/pages/task/taskTabs/testsTable/LogsColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const LogsColumn: React.FC<Props> = ({ task, testResult }) => {
urlParsley,
urlRaw,
} = testResult.logs ?? {};
const { displayName, displayTask, order, project } = task ?? {};
const { buildVariant, displayName, displayTask, order, project } = task ?? {};
const { sendEvent } = useTaskAnalytics();
const filters =
status === TestStatus.Fail
Expand Down Expand Up @@ -114,6 +114,7 @@ export const LogsColumn: React.FC<Props> = ({ task, testResult }) => {
to={getTaskHistoryRoute(project?.identifier, displayName, {
filters,
selectedCommit: order,
visibleColumns: [buildVariant],
})}
/>
)}
Expand Down

0 comments on commit 8aceacf

Please sign in to comment.