Skip to content

Commit

Permalink
[Fleet] Do not show settings banner while its loading in the add agen…
Browse files Browse the repository at this point in the history
…t flyout (#103883)
  • Loading branch information
nchaulet authored Jun 30, 2021
1 parent 36b21b4 commit 9fdd569
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export const AgentEnrollmentFlyout: React.FunctionComponent<Props> = ({
}
}, [modal, lastModal, settings]);

const isLoadingInitialRequest = settings.isLoading && settings.isInitialRequest;

return (
<EuiFlyout data-test-subj="agentEnrollmentFlyout" onClose={onClose} size="m">
<EuiFlyoutHeader hasBorder aria-labelledby="FleetAgentEnrollmentFlyoutTitle">
Expand Down Expand Up @@ -108,7 +110,7 @@ export const AgentEnrollmentFlyout: React.FunctionComponent<Props> = ({

<EuiFlyoutBody
banner={
fleetServerHosts.length === 0 && mode === 'managed' ? (
!isLoadingInitialRequest && fleetServerHosts.length === 0 && mode === 'managed' ? (
<MissingFleetServerHostCallout />
) : undefined
}
Expand Down

0 comments on commit 9fdd569

Please sign in to comment.