Skip to content

Commit

Permalink
UI warning icon not changed to error icon on 24 hours timeout in host…
Browse files Browse the repository at this point in the history
…s table (#2596)
  • Loading branch information
ammont82 authored Jun 11, 2024
1 parent bf26bf8 commit f58c142
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libs/ui-lib/lib/common/components/hosts/HostStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,12 @@ const WithHostStatusPopover: React.FC<WithHostStatusPopoverProps> = (props) => (
</Popover>
);

const getHostStatusIcon = (icon: React.ReactNode, progress: HostProgressInfo | undefined) => {
if (progress?.stageTimedOut !== undefined) {
const getHostStatusIcon = (
icon: React.ReactNode,
progress: HostProgressInfo | undefined,
status: HostStatusProps['status'],
) => {
if (progress?.stageTimedOut !== undefined && status.title !== 'Error') {
return (
<Popover
bodyContent={
Expand Down Expand Up @@ -271,7 +275,7 @@ const HostStatus: React.FC<HostStatusProps> = ({
openshiftVersion,
};

const hostIcon = getHostStatusIcon(icon, host.progress);
const hostIcon = getHostStatusIcon(icon, host.progress, status);
return (
<Flex alignItems={{ default: 'alignItemsCenter' }} spaceItems={{ default: 'spaceItemsXs' }}>
{
Expand Down

0 comments on commit f58c142

Please sign in to comment.