Skip to content

Commit

Permalink
[Fleet] Fix logic for detecting first time Elastic Agent users (#182214)
Browse files Browse the repository at this point in the history
## Summary

Resolves #181800. Fixes the
logic for detecting first time Elastic Agent users on Cloud so that the
multi-page layout for adding an integration kicks in.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
jen-huang and kibanamachine authored May 1, 2024
1 parent 1e8d51a commit 63bc11a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ export const useIsFirstTimeAgentUserQuery = (): UseIsFirstTimeAgentUserResponse

return {
isLoading: authz.fleet.readAgentPolicies && (areAgentPoliciesLoading || areAgentsLoading),
isFirstTimeAgentUser: !authz.fleet.readAgentPolicies && agents?.data?.total === 0,
isFirstTimeAgentUser: authz.fleet.readAgentPolicies && agents?.data?.total === 0,
};
};

0 comments on commit 63bc11a

Please sign in to comment.