From 061a0d4c5f3ed9d66a3949dd81e03cb0da5b1b09 Mon Sep 17 00:00:00 2001 From: Pradithya Aria Pura Date: Sat, 1 Apr 2023 09:52:07 +0800 Subject: [PATCH] feat: show launch plan version Signed-off-by: Pradithya Aria Pura --- .../Tables/WorkflowExecutionTable/cells.tsx | 19 +++++++++++++++++-- .../useWorkflowExecutionsTableColumns.tsx | 5 +++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx b/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx index e369f2fe6..4e3e32997 100644 --- a/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx +++ b/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx @@ -100,11 +100,26 @@ export function getDurationCell(execution: Execution): React.ReactNode { ); } -export function getLaunchPlanName(execution: Execution): React.ReactNode { +export function getLaunchPlan( + execution: Execution, + className: string, +): React.ReactNode { const isArchived = isExecutionArchived(execution); const lp = execution.spec.launchPlan; + const version = execution.spec.launchPlan.version; - return ; + return ( + <> + + + {version} + + + ); } export const showOnHoverClass = 'showOnHover'; diff --git a/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/useWorkflowExecutionsTableColumns.tsx b/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/useWorkflowExecutionsTableColumns.tsx index f75360912..b54599131 100644 --- a/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/useWorkflowExecutionsTableColumns.tsx +++ b/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/useWorkflowExecutionsTableColumns.tsx @@ -11,7 +11,7 @@ import { getExecutionIdCell, getStartTimeCell, getStatusCell, - getLaunchPlanName, + getLaunchPlan, } from './cells'; import { useStyles } from './styles'; import t, { patternKey } from './strings'; @@ -46,7 +46,8 @@ export function useWorkflowExecutionsTableColumns( label: t(patternKey('tableLabel', 'name')), }, { - cellRenderer: ({ execution }) => getLaunchPlanName(execution), + cellRenderer: ({ execution }) => + getLaunchPlan(execution, commonStyles.textWrapped), className: styles.columnLaunchPlan, key: 'launchPlan', label: t(patternKey('tableLabel', 'launchPlan')),