forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Fix disabling logic for "View Agents" button in agent activity (
elastic#202968) ## Summary I came across a small bug while testing Fleet agents activity: the "View Agents" button is currently always disabled for agent policy changes. This is because agent policy data has been modified to be fetched with `noAgentCount: true` by default. As getting the agent count involves a performance concern, this PR fixes the logic that disables the "View Agents" button for policy change actions instead. The behaviour is not as follows: * For tag updates actions: button not showed (no change) * For policy change actions * If `action.nbAgentsActionCreated > 10000`: disable button and show tooltip explaining why it's disabled * Otherwise: enable button and show tooltip saying that these are the agents _currently_ assigned to the policy (existing behaviour, known limitation) * For other types of actions (no change) * If `action.nbAgentsActionCreated > 10000`: disable button and show tooltip explaining why it's disabled * Otherwise: enable button, no tooltip ### Screenshots ![Screenshot 2024-12-05 at 10 56 40](https://github.com/user-attachments/assets/c5f4f868-cdac-4de7-a96d-f11afd803d87) ![Screenshot 2024-12-05 at 10 57 13](https://github.com/user-attachments/assets/91195e3a-4f5c-4a91-b9ff-ffb62818647f) ![Screenshot 2024-12-05 at 10 57 20](https://github.com/user-attachments/assets/9029b1b5-6983-4509-9b62-15e073546d42)
- Loading branch information
1 parent
fe396b0
commit 38f1882
Showing
8 changed files
with
29 additions
and
60 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
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