Skip to content

Commit

Permalink
fix(orchestrator): fix status filter (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
batzionb authored Dec 12, 2024
1 parent 562a850 commit cf1c024
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions workspaces/orchestrator/.changeset/swift-cats-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-orchestrator': patch
---

bug fix in workflow runs table status filter
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 cf1c024

Please sign in to comment.