Skip to content

Commit

Permalink
Add tooltipo to timeout status
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianogorza committed Mar 15, 2024
1 parent 939cdcc commit 91e1cbb
Showing 1 changed file with 30 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import {
EuiModalBody,
EuiModalFooter,
EuiButton,
EuiFlexGroup,
EuiFlexItem,
EuiToolTip,
EuiButtonIcon,
} from '@elastic/eui';

interface AgentUpgradesTaskDetailsModalProps {
Expand Down Expand Up @@ -100,14 +104,36 @@ export const AgentUpgradesTaskDetailsModal = ({
{
field: 'status',
name: 'Status',
width: '120px',
width: '130px',
sortable: true,
searchable: true,
show: true,
render: value => (
<EuiHealth color={UI_TASK_STATUS_COLORS[value]}>
{value}
</EuiHealth>
<EuiFlexGroup
alignItems='center'
gutterSize='xs'
responsive={false}
>
<EuiFlexItem grow={false}>
<EuiHealth color={UI_TASK_STATUS_COLORS[value]}>
{value}
</EuiHealth>
</EuiFlexItem>
{value === API_NAME_TASK_STATUS.TIMEOUT ? (
<EuiFlexItem grow={false}>
<EuiToolTip
position='top'
content='Upgrade task has appears to be done but the notification has never reached the manager'
>
<EuiButtonIcon
color='primary'
iconType='questionInCircle'
aria-label='Info about the error'
/>
</EuiToolTip>
</EuiFlexItem>
) : null}
</EuiFlexGroup>
),
},
{
Expand All @@ -116,12 +142,6 @@ export const AgentUpgradesTaskDetailsModal = ({
show: true,
searchable: true,
width: '250px',
render: (value, task) => {
if (task.status === API_NAME_TASK_STATUS.TIMEOUT) {
return 'Upgrade task has appears to be done but the notification has never reached the manager';
}
return value;
},
},
]}
tableInitialSortingField='last_update_time'
Expand Down

0 comments on commit 91e1cbb

Please sign in to comment.