From f392601ee03222fddfe70083ea4cd8ed6f3badb9 Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Tue, 31 Oct 2023 12:46:50 -0400 Subject: [PATCH] only link to task history for current build variant --- src/constants/routes.ts | 10 +++++++--- src/pages/task/ActionButtons.tsx | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/constants/routes.ts b/src/constants/routes.ts index 92643e9044..777442bc65 100644 --- a/src/constants/routes.ts +++ b/src/constants/routes.ts @@ -257,7 +257,8 @@ const getHistoryRoute = ( failingTests?: string[]; passingTests?: string[]; }, - selectedCommit?: number + selectedCommit?: number, + visibleColumns?: string[] ) => { if (filters || selectedCommit) { const failingTests = toArray(filters?.failingTests); @@ -267,6 +268,7 @@ const getHistoryRoute = ( [TestStatus.Failed]: failingTests, [TestStatus.Passed]: passingTests, [HistoryQueryParams.SelectedCommit]: selectedCommit, + [HistoryQueryParams.VisibleColumns]: visibleColumns, }); return `${basePath}?${queryParams}`; } @@ -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 ); }; diff --git a/src/pages/task/ActionButtons.tsx b/src/pages/task/ActionButtons.tsx index 4c657b6970..313ec245d2 100644 --- a/src/pages/task/ActionButtons.tsx +++ b/src/pages/task/ActionButtons.tsx @@ -55,6 +55,7 @@ export const ActionButtons: React.FC = ({ task, }) => { const { + buildVariant, canAbort, canDisable, canOverrideDependencies, @@ -178,6 +179,7 @@ export const ActionButtons: React.FC = ({ const HistoryLink = useLGButtonRouterLink( getTaskHistoryRoute(projectIdentifier, displayName, { selectedCommit: !isPatch && order, + visibleColumns: [buildVariant], }) );