Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
only link to task history for current build variant
Browse files Browse the repository at this point in the history
  • Loading branch information
khelif96 committed Oct 31, 2023
1 parent 2d8f306 commit f392601
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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

0 comments on commit f392601

Please sign in to comment.