Skip to content

Commit

Permalink
fix(orchestrator): fix status filter
Browse files Browse the repository at this point in the history
  • Loading branch information
batzionb committed Dec 11, 2024
1 parent 462bfde commit 458da3b
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { Grid } from '@material-ui/core';
import {
capitalize,
ellipsis,
ProcessInstanceState,
ProcessInstanceStatusDTO,
} from '@red-hat-developer-hub/backstage-plugin-orchestrator-common';

Expand All @@ -45,11 +44,11 @@ import { WorkflowRunDetail } from './WorkflowRunDetail';

const makeSelectItemsFromProcessInstanceValues = () =>
[
ProcessInstanceState.Active,
ProcessInstanceState.Error,
ProcessInstanceState.Completed,
ProcessInstanceState.Aborted,
ProcessInstanceState.Suspended,
ProcessInstanceStatusDTO.Active,
ProcessInstanceStatusDTO.Error,
ProcessInstanceStatusDTO.Completed,
ProcessInstanceStatusDTO.Aborted,
ProcessInstanceStatusDTO.Suspended,
].map(
(status): SelectItem => ({
label: capitalize(status),
Expand Down Expand Up @@ -117,7 +116,7 @@ export const WorkflowRunsTabContent = () => {
(value ?? []).filter(
(row: WorkflowRunDetail) =>
statusSelectorValue === Selector.AllItems ||
row.status?.toLocaleLowerCase('en-US') === statusSelectorValue,
row.status === statusSelectorValue,
),
[statusSelectorValue, value],
);
Expand Down

0 comments on commit 458da3b

Please sign in to comment.