Skip to content
Snippets Groups Projects
Commit a2199e3f authored by Johanna Szepanski's avatar Johanna Szepanski
Browse files

Removed no longer needed JobStatus stepper

parent ce57ef36
No related branches found
No related tags found
2 merge requests!612Release 5.0.0,!545CE-2825: Default stepper to custom
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"; import { HelpOutline } from "@mui/icons-material";
const ActiveIcon = STEPPER_STATES.active.outlinedIcon; const ActiveIcon = STEPPER_STATES.active.outlinedIcon;
...@@ -42,28 +42,6 @@ const STATUS = { ...@@ -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 }) => { export const JobStatusIcon = ({ job }) => {
const activeStep = STATUS[job?.status?.toLowerCase()] ?? STATUS.unknown; const activeStep = STATUS[job?.status?.toLowerCase()] ?? STATUS.unknown;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment