Skip to content

Commit

Permalink
change models tooltip to popover
Browse files Browse the repository at this point in the history
  • Loading branch information
ashley-o0o committed Oct 17, 2024
1 parent 3f41512 commit e32a974
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Text, Icon, Tooltip } from '@patternfly/react-core';
import { Text, Icon, Popover } from '@patternfly/react-core';
import {
CheckCircleIcon,
ExclamationCircleIcon,
Expand Down Expand Up @@ -45,6 +45,7 @@ const InferenceServiceStatus: React.FC<InferenceServiceStatusProps> = ({
isInline
tabIndex={0}
iconSize={iconSize}
style={{ cursor: 'pointer' }}
>
<CheckCircleIcon />
</Icon>
Expand All @@ -59,6 +60,7 @@ const InferenceServiceStatus: React.FC<InferenceServiceStatusProps> = ({
isInline
tabIndex={0}
iconSize={iconSize}
style={{ cursor: 'pointer' }}
>
<ExclamationCircleIcon />
</Icon>
Expand All @@ -80,6 +82,7 @@ const InferenceServiceStatus: React.FC<InferenceServiceStatusProps> = ({
isInline
tabIndex={0}
iconSize={iconSize}
style={{ cursor: 'pointer' }}
>
<OutlinedQuestionCircleIcon />
</Icon>
Expand All @@ -94,6 +97,7 @@ const InferenceServiceStatus: React.FC<InferenceServiceStatusProps> = ({
isInline
tabIndex={0}
iconSize={iconSize}
style={{ cursor: 'pointer' }}
>
<OutlinedQuestionCircleIcon />
</Icon>
Expand All @@ -102,10 +106,9 @@ const InferenceServiceStatus: React.FC<InferenceServiceStatusProps> = ({
};

return (
<Tooltip
role="none"
data-testid="model-status-tooltip"
content={
<Popover
position="right"
bodyContent={
modelStatus?.failedToSchedule ? (
<Text>Insufficient resources</Text>
) : (
Expand All @@ -114,7 +117,7 @@ const InferenceServiceStatus: React.FC<InferenceServiceStatusProps> = ({
}
>
{statusIcon()}
</Tooltip>
</Popover>
);
};

Expand Down

0 comments on commit e32a974

Please sign in to comment.