From a2199e3f40803c4b0b3fcc6553161a6e641f142c Mon Sep 17 00:00:00 2001 From: Johanna Szepanski <johanna.szepanski@softhouse.se> Date: Thu, 12 Sep 2024 10:21:09 +0200 Subject: [PATCH] Removed no longer needed JobStatus stepper --- src/components/Job/JobStatus.js | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/components/Job/JobStatus.js b/src/components/Job/JobStatus.js index 5394bfc9..d518e934 100644 --- a/src/components/Job/JobStatus.js +++ b/src/components/Job/JobStatus.js @@ -1,4 +1,4 @@ -import { Stepper, STEPPER_STATES, LabeledIcon } from "@ess-ics/ce-ui-common"; +import { STEPPER_STATES, LabeledIcon } from "@ess-ics/ce-ui-common"; import { HelpOutline } from "@mui/icons-material"; const ActiveIcon = STEPPER_STATES.active.outlinedIcon; @@ -42,28 +42,6 @@ const STATUS = { } }; -export const JobStatusStepper = ({ job, operation }) => { - const normalizedStatus = job?.status?.toLowerCase(); - const currentStep = Object.keys(STEPPER_STATUS).indexOf(normalizedStatus); - let activeStep = STEPPER_STATUS[normalizedStatus] - ? currentStep + 1 - : currentStep; - const jobFailed = job?.status?.toLowerCase() === "failed"; - - // to show the correct failed step for an already finished operation - if (jobFailed) { - activeStep = operation?.startTime ? 1 : 0; - } - - return ( - <Stepper - steps={Object.values(STEPPER_STATUS).map((it) => it.label)} - activeStep={activeStep} - isActiveStepFailed={jobFailed} - /> - ); -}; - export const JobStatusIcon = ({ job }) => { const activeStep = STATUS[job?.status?.toLowerCase()] ?? STATUS.unknown; -- GitLab