-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cloud Security] fix agent count to show correct pop-up modal (#181503)
## Summary Summarize your PR. If it involves visual changes include a screenshot or gif. This PR fixes agent count to for the following cases: * If current agent policy is New agent policy, then AWS CloudFormation when the agent count is 0 * if current agent policy is Existing agent policy with an agent , then show confirmation agent modal * If current agent policy is Agentless policy, then navigate to fleet agent policies page. `isDirty` and `currentAgentPolicy` states will used be to circumvent the race condition `useEffect` that sets SetupTechnology when we first navigate to the add CSPM integration page. * `currentAgentPolicy` state keep current agentPolicy and reset agent count when we switch from `agentless` to `agent-based` * `isDirty` helps exit out `x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts` `useEffect` race condition once we initialize `setupTechnology` state on page load.
- Loading branch information
1 parent
0c9a323
commit 310bba0
Showing
4 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters