Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.12] [Fleet] Fix incorrect count of agents in bulk actions (#175318) (
#175527) # Backport This will backport the following commits from `main` to `8.12`: - [[Fleet] Fix incorrect count of agents in bulk actions (#175318)](#175318) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Cristina Amico","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-25T11:29:25Z","message":"[Fleet] Fix incorrect count of agents in bulk actions (#175318)\n\nFixes https://github.com/elastic/kibana/issues/171914\r\n\r\n## Summary\r\nFix a small issue occurring when there are inactive agents, both regular\r\nand managed.\r\n\r\nAnother PR with some refactoring for this component will follow.\r\n\r\n### Repro steps\r\n\r\n- Enroll fleet server on fleet-server-policy - make sure to have two\r\ninactive fleet server agents on this policy as well\r\n- Enroll ~20 agents with horde and make them inactive\r\n- Make fleet server policy \"managed\"\r\n- Select \"inactive\" in the status filter\r\n- Click on \"Select agents on all pages\"\r\n- The bulk actions shouldn't report negative actions. If the count is 0,\r\nthe actions will appear disabled\r\n\r\n#### Before\r\n![Screenshot 2024-01-22 at 15 59\r\n42](https://github.com/elastic/kibana/assets/16084106/cb8c6c80-b23f-4415-af2a-b4de8ae387f6)\r\n\r\n#### After\r\n![Screenshot 2024-01-24 at 15 53\r\n53](https://github.com/elastic/kibana/assets/16084106/6b020016-6171-43d7-bc12-685bf01b7989)\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"f2fb3ee768f62aca11a6b3adae0514e1b1f56fcd","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.13.0"],"title":"[Fleet] Fix incorrect count of agents in bulk actions","number":175318,"url":"https://github.com/elastic/kibana/pull/175318","mergeCommit":{"message":"[Fleet] Fix incorrect count of agents in bulk actions (#175318)\n\nFixes https://github.com/elastic/kibana/issues/171914\r\n\r\n## Summary\r\nFix a small issue occurring when there are inactive agents, both regular\r\nand managed.\r\n\r\nAnother PR with some refactoring for this component will follow.\r\n\r\n### Repro steps\r\n\r\n- Enroll fleet server on fleet-server-policy - make sure to have two\r\ninactive fleet server agents on this policy as well\r\n- Enroll ~20 agents with horde and make them inactive\r\n- Make fleet server policy \"managed\"\r\n- Select \"inactive\" in the status filter\r\n- Click on \"Select agents on all pages\"\r\n- The bulk actions shouldn't report negative actions. If the count is 0,\r\nthe actions will appear disabled\r\n\r\n#### Before\r\n![Screenshot 2024-01-22 at 15 59\r\n42](https://github.com/elastic/kibana/assets/16084106/cb8c6c80-b23f-4415-af2a-b4de8ae387f6)\r\n\r\n#### After\r\n![Screenshot 2024-01-24 at 15 53\r\n53](https://github.com/elastic/kibana/assets/16084106/6b020016-6171-43d7-bc12-685bf01b7989)\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"f2fb3ee768f62aca11a6b3adae0514e1b1f56fcd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/175318","number":175318,"mergeCommit":{"message":"[Fleet] Fix incorrect count of agents in bulk actions (#175318)\n\nFixes https://github.com/elastic/kibana/issues/171914\r\n\r\n## Summary\r\nFix a small issue occurring when there are inactive agents, both regular\r\nand managed.\r\n\r\nAnother PR with some refactoring for this component will follow.\r\n\r\n### Repro steps\r\n\r\n- Enroll fleet server on fleet-server-policy - make sure to have two\r\ninactive fleet server agents on this policy as well\r\n- Enroll ~20 agents with horde and make them inactive\r\n- Make fleet server policy \"managed\"\r\n- Select \"inactive\" in the status filter\r\n- Click on \"Select agents on all pages\"\r\n- The bulk actions shouldn't report negative actions. If the count is 0,\r\nthe actions will appear disabled\r\n\r\n#### Before\r\n![Screenshot 2024-01-22 at 15 59\r\n42](https://github.com/elastic/kibana/assets/16084106/cb8c6c80-b23f-4415-af2a-b4de8ae387f6)\r\n\r\n#### After\r\n![Screenshot 2024-01-24 at 15 53\r\n53](https://github.com/elastic/kibana/assets/16084106/6b020016-6171-43d7-bc12-685bf01b7989)\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"f2fb3ee768f62aca11a6b3adae0514e1b1f56fcd"}}]}] BACKPORT--> Co-authored-by: Cristina Amico <[email protected]>
- Loading branch information