Skip to content

Commit

Permalink
Update DefaultTaskGroup custom icon to use BanIcon (#3489)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnaik1 authored Nov 22, 2024
1 parent 537caad commit b5f39ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@patternfly/react-table": "^5.4.0",
"@patternfly/react-templates": "^1.1.0",
"@patternfly/react-tokens": "^5.4.0",
"@patternfly/react-topology": "^5.4.0",
"@patternfly/react-topology": "^5.4.1",
"@patternfly/react-virtualized-extension": "^5.1.0",
"@segment/analytics-next": "^1.72.0",
"@types/classnames": "^2.3.1",
Expand Down
11 changes: 8 additions & 3 deletions frontend/src/concepts/topology/PipelineDefaultTaskGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
LabelPosition,
} from '@patternfly/react-topology';
import { Flex, FlexItem, Popover, Stack, StackItem } from '@patternfly/react-core';
import { BanIcon } from '@patternfly/react-icons';
import { PipelineNodeModelExpanded, StandardTaskNodeData } from '~/concepts/topology/types';
import NodeStatusIcon from '~/concepts/topology/NodeStatusIcon';
import { ExecutionStateKF } from '~/concepts/pipelines/kfTypes';
Expand Down Expand Up @@ -68,21 +69,25 @@ const DefaultTaskGroupInner: React.FunctionComponent<PipelinesDefaultGroupInnerP
}
}, [state, runStatus]);

// TODO, Update canceled status icon with BanIcon when PF topology is updated
// https://issues.redhat.com/browse/RHOAIENG-14822
const groupNode = (
<DefaultTaskGroup
element={element}
collapsible
recreateLayoutOnCollapseChange
GroupLabelComponent={TaskGroupPillLabel}
GroupLabelComponent={(props) => (
<TaskGroupPillLabel
{...props}
customStatusIcon={status === RunStatus.Cancelled ? <BanIcon /> : undefined}
/>
)}
selected={selected}
onSelect={onSelect}
hideDetailsAtMedium
centerLabelOnEdge
labelPosition={LabelPosition.top}
showStatusState
scaleNode={hover && detailsLevel !== ScaleDetailsLevel.high}
customStatusIcon={status === RunStatus.Cancelled ? <BanIcon /> : undefined}
showLabelOnHover
status={status}
hiddenDetailsShownStatuses={[
Expand Down

0 comments on commit b5f39ca

Please sign in to comment.