From 52934cc107051fc79dc0f01ef6ab02b1314f504a Mon Sep 17 00:00:00 2001 From: Dipanshu Gupta Date: Tue, 11 Jun 2024 15:52:13 +0530 Subject: [PATCH] Dashboard shows cached pipeline steps in gray (no info about what it means) --- .../pipelines/topology/__tests__/parseUtils.spec.ts | 2 +- frontend/src/concepts/pipelines/topology/parseUtils.ts | 2 +- .../src/concepts/topology/customNodes/StandardTaskNode.tsx | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/concepts/pipelines/topology/__tests__/parseUtils.spec.ts b/frontend/src/concepts/pipelines/topology/__tests__/parseUtils.spec.ts index 74b68b181d..05f2b8243d 100644 --- a/frontend/src/concepts/pipelines/topology/__tests__/parseUtils.spec.ts +++ b/frontend/src/concepts/pipelines/topology/__tests__/parseUtils.spec.ts @@ -283,7 +283,7 @@ describe('pipeline topology parseUtils', () => { { state: RuntimeStateKF.SKIPPED, status: RunStatus.Skipped }, { state: RuntimeStateKF.SUCCEEDED, status: RunStatus.Succeeded }, { state: ExecutionStateKF.CANCELED, status: RunStatus.Cancelled }, - { state: ExecutionStateKF.CACHED, status: RunStatus.Skipped }, + { state: ExecutionStateKF.CACHED, status: RunStatus.Succeeded }, { state: ExecutionStateKF.COMPLETE, status: RunStatus.Succeeded }, { state: ExecutionStateKF.FAILED, status: RunStatus.Failed }, { state: ExecutionStateKF.RUNNING, status: RunStatus.Running }, diff --git a/frontend/src/concepts/pipelines/topology/parseUtils.ts b/frontend/src/concepts/pipelines/topology/parseUtils.ts index 775bd58b61..a45733fb70 100644 --- a/frontend/src/concepts/pipelines/topology/parseUtils.ts +++ b/frontend/src/concepts/pipelines/topology/parseUtils.ts @@ -315,8 +315,8 @@ export const translateStatusForNode = ( return RunStatus.InProgress; case ExecutionStateKF.COMPLETE: case RuntimeStateKF.SUCCEEDED: - return RunStatus.Succeeded; case ExecutionStateKF.CACHED: + return RunStatus.Succeeded; case RuntimeStateKF.SKIPPED: return RunStatus.Skipped; case RuntimeStateKF.RUNTIME_STATE_UNSPECIFIED: diff --git a/frontend/src/concepts/topology/customNodes/StandardTaskNode.tsx b/frontend/src/concepts/topology/customNodes/StandardTaskNode.tsx index 9f0eeba370..4f31022cd3 100644 --- a/frontend/src/concepts/topology/customNodes/StandardTaskNode.tsx +++ b/frontend/src/concepts/topology/customNodes/StandardTaskNode.tsx @@ -12,7 +12,9 @@ import { WithContextMenuProps, WithSelectionProps, } from '@patternfly/react-topology'; +import { AngleDoubleRightIcon } from '@patternfly/react-icons'; import { PipelineNodeModelExpanded } from '~/concepts/topology/types'; +import { ExecutionStateKF } from '~/concepts/pipelines/kfTypes'; type StandardTaskNodeProps = { element: GraphElement; @@ -45,6 +47,11 @@ const StandardTaskNode: React.FunctionComponent = ({ selected={selected} scaleNode={hover && detailsLevel !== ScaleDetailsLevel.high} status={data?.runStatus} + customStatusIcon={ + data?.pipelineTask.status?.state === ExecutionStateKF.CACHED ? ( + + ) : undefined + } hideDetailsAtMedium hiddenDetailsShownStatuses={[ RunStatus.Succeeded,