Skip to content

Commit

Permalink
[Fleet] Fix hide enrollment key tooltip (elastic#123188) (elastic#123246
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 8ac8d69)

Co-authored-by: Nicolas Chaulet <[email protected]>
  • Loading branch information
kibanamachine and nchaulet authored Jan 18, 2022
1 parent 92297e8 commit a3736a7
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 a3736a7

Please sign in to comment.