diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/PipelineDetailsTitle.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/PipelineDetailsTitle.tsx index b8283803b5..ca27c0f517 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/PipelineDetailsTitle.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/PipelineDetailsTitle.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Label, Split, SplitItem } from '@patternfly/react-core'; import { PipelineRunKFv2 } from '~/concepts/pipelines/kfTypes'; -import { computeRunStatus } from '~/concepts/pipelines/content/utils'; +import { computeRunStatus, getStorageState } from '~/concepts/pipelines/content/utils'; import PipelineRunTypeLabel from '~/concepts/pipelines/content/PipelineRunTypeLabel'; type RunJobTitleProps = { @@ -17,6 +17,8 @@ const PipelineDetailsTitle: React.FC = ({ }) => { const { icon, label } = computeRunStatus(run); + const isArchived = getStorageState(run) === 'ARCHIVED'; + return ( <> @@ -31,6 +33,11 @@ const PipelineDetailsTitle: React.FC = ({ )} + {isArchived && ( + + + + )} ); diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDetailsActions.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDetailsActions.tsx index d7fac1de30..4928a5031b 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDetailsActions.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDetailsActions.tsx @@ -42,15 +42,15 @@ const PipelineRunDetailsActions: React.FC = ({ o ? [] : [ api - .stopPipelineRun({}, run.run_id) - .catch((e) => notification.error('Unable to stop pipeline run', e.message)) + .retryPipelineRun({}, run.run_id) + .catch((e) => notification.error('Unable to retry pipeline run', e.message)) } > - Stop + Retry , = ({ o ) } > - Duplicate + Clone + , + + api + .stopPipelineRun({}, run.run_id) + .catch((e) => notification.error('Unable to stop pipeline run', e.message)) + } + > + Stop , isExperimentsAvailable && experimentId && isRunActive ? ( = ({ o ) : ( ), + !isRunActive ? ( + + api + .unarchivePipelineRun({}, run.run_id) + .catch((e) => notification.error('Unable to restore pipeline run', e.message)) + } + > + Restore + + ) : ( + + ), , onDelete()}> Delete diff --git a/frontend/src/concepts/pipelines/content/utils.tsx b/frontend/src/concepts/pipelines/content/utils.tsx index ddcf80c8b4..df1d2951e3 100644 --- a/frontend/src/concepts/pipelines/content/utils.tsx +++ b/frontend/src/concepts/pipelines/content/utils.tsx @@ -15,6 +15,7 @@ import { PipelineRunKFv2, PipelineVersionKFv2, RuntimeStateKF, + StorageStateKF, runtimeStateLabels, } from '~/concepts/pipelines/kfTypes'; import { relativeTime } from '~/utilities/time'; @@ -30,6 +31,8 @@ export type RunStatusDetails = { const UNKNOWN_ICON = ; const UNKNOWN_STATUS = 'warning'; +export const getStorageState = (run?: PipelineRunKFv2 | null): StorageStateKF | undefined => run?.storage_state; + export const computeRunStatus = (run?: PipelineRunKFv2 | null): RunStatusDetails => { if (!run) { return { icon: UNKNOWN_ICON, status: UNKNOWN_STATUS, label: '-' };