Skip to content

Commit

Permalink
[Fleet] Fix Set correct title for Restart upgrade agent modal under a…
Browse files Browse the repository at this point in the history
…gent list (#192536)

## Summary

Fixes #179122 

The agent list determines the `isUpdating` status, should Use the
`isStuckInUpdating` method.

The same as the details page.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
viajes7 and elasticmachine authored Sep 12, 2024
1 parent f7c708f commit 3181644
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import React, { useState, useMemo, useCallback } from 'react';
import { differenceBy, isEqual } from 'lodash';
import { EuiSpacer, EuiPortal } from '@elastic/eui';

import { isStuckInUpdating } from '../../../../../../common/services/agent_status';

import type { Agent } from '../../../types';

import {
Expand Down Expand Up @@ -348,7 +350,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
setAgentToUpgrade(undefined);
refreshAgents();
}}
isUpdating={Boolean(agentToUpgrade.upgrade_started_at && !agentToUpgrade.upgraded_at)}
isUpdating={isStuckInUpdating(agentToUpgrade)}
/>
</EuiPortal>
)}
Expand Down

0 comments on commit 3181644

Please sign in to comment.