Skip to content

Commit

Permalink
feat: show launch plan version
Browse files Browse the repository at this point in the history
Signed-off-by: Pradithya Aria Pura <[email protected]>
  • Loading branch information
pradithya committed Apr 1, 2023
1 parent e2729d3 commit 061a0d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <LaunchPlanLink id={lp} color={isArchived ? 'disabled' : 'primary'} />;
return (
<>
<LaunchPlanLink id={lp} color={isArchived ? 'disabled' : 'primary'} />
<Typography
className={className}
variant="subtitle1"
color="textSecondary"
>
{version}
</Typography>
</>
);
}

export const showOnHoverClass = 'showOnHover';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
getExecutionIdCell,
getStartTimeCell,
getStatusCell,
getLaunchPlanName,
getLaunchPlan,
} from './cells';
import { useStyles } from './styles';
import t, { patternKey } from './strings';
Expand Down Expand Up @@ -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')),
Expand Down

0 comments on commit 061a0d4

Please sign in to comment.