Skip to content

Commit

Permalink
[Fleet] Fix hide enrollment key tooltip (elastic#123188)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8ac8d69)
  • Loading branch information
nchaulet authored and kibanamachine committed Jan 18, 2022
1 parent 29c9a74 commit ae94184
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const ApiKeyField: React.FunctionComponent<{ apiKeyId: string }> = ({ apiKeyId }
})
}
color="text"
isDisabled={state === 'LOADING'}
onClick={toggleKey}
iconType={state === 'VISIBLE' ? 'eyeClosed' : 'eye'}
/>
Expand Down Expand Up @@ -269,6 +268,10 @@ export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => {
},
];

const isLoading =
(enrollmentAPIKeysRequest.isLoading && enrollmentAPIKeysRequest.isInitialRequest) ||
(agentPoliciesRequest.isLoading && agentPoliciesRequest.isInitialRequest);

return (
<DefaultLayout section="enrollment_tokens">
{isModalOpen && (
Expand Down Expand Up @@ -312,10 +315,10 @@ export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => {
</EuiFlexGroup>
<EuiSpacer size="m" />
<EuiBasicTable<EnrollmentAPIKey>
loading={enrollmentAPIKeysRequest.isLoading && enrollmentAPIKeysRequest.isInitialRequest}
loading={isLoading}
hasActions={true}
noItemsMessage={
enrollmentAPIKeysRequest.isLoading && enrollmentAPIKeysRequest.isInitialRequest ? (
isLoading ? (
<FormattedMessage
id="xpack.fleet.enrollemntAPIKeyList.loadingTokensMessage"
defaultMessage="Loading enrollment tokens..."
Expand Down

0 comments on commit ae94184

Please sign in to comment.