kibana/x-pack/plugins
John Schulz 357c4a5457
[Fleet] Can't select managed agent. Bulk upgrade agent UI changes (#96087)
## Summary

This PR implements several items from point 8 in https://github.com/elastic/observability-design/issues/32 

The changes to modal titles and success/error behavior are only for bulk upgrade in this PR. Once we confirm the pattern, I'll apply it to unenroll and reassign in a follow up PR.

- [x] Disable the checkbox for agents enrolled in a hosted agent policy. We don't need to provide a tooltip description since the Agent policy "lock" icon appears in the table row.
- [x] If a user selects the top-left checkbox to select all agents on the page, and then clicks "select everything on all pages", we don't need to provide a count for total number of agents selected. The bulk actions button can say "all agents selected" (as discussed, calculating the total number of agents is problematic and can be tough on performance). Choosing a bulk action should filter out / not include any agents that are enrolled in a hosted agent policy.
- [x] Related to calculating total number of agents, we previously showed a count in the action modal's title. In the case where users have selected everything on all pages, the title can just say "all selected agents" -> i.e. "upgrade all selected agents"
- [x] If the result of a bulk action has mixed results, as in some percentage of agents are successful but others fail, show a warning toast that indicates how many succeeded and how many failed. See screenshot below.
- [x] Change the "experimental" badge for the upgrade agent action modal to be an icon only badge. You can use the `beaker` icon. The badge should use the same tooltip description that we use today indicating that this action is experimental.

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

## Per feature details & screenshots
<details>
  <summary>Disable the checkbox for agents enrolled in a hosted agent policy.</summary>
<img width="1016" alt="Screen Shot 2021-04-02 at 10 35 38 AM" src="https://user-images.githubusercontent.com/57655/113425437-d9e9e680-939f-11eb-9b1b-423d78dbc8fc.png">
<blockquote>We don't need to provide a tooltip description since the Agent policy "lock" icon appears in the table row.</blockquote>
I left the description in until we implement the "lock" icon.
</details>

<details>
  <summary>If a user selects the top-left checkbox to select all agents on the page, and then clicks "select everything on all pages", ... the bulk actions button can say "all agents selected" </summary>
<img width="998" alt="Screen Shot 2021-04-02 at 9 20 28 AM" src="https://user-images.githubusercontent.com/57655/113426911-1d455480-93a2-11eb-98e2-5a328ebd9d97.png">
<img width="1010" alt="Screen Shot 2021-04-02 at 9 20 45 AM" src="https://user-images.githubusercontent.com/57655/113426912-1d455480-93a2-11eb-92f3-7036d9e95f0c.png">

<blockquote>Choosing a bulk action should filter out / not include any agents that are enrolled in a hosted agent policy.</blockquote>
<img width="529" alt="Screen Shot 2021-04-02 at 10 58 43 AM" src="https://user-images.githubusercontent.com/57655/113427313-cb50fe80-93a2-11eb-948a-68dc165e567b.png">
<img width="593" alt="Screen Shot 2021-04-02 at 11 00 44 AM" src="https://user-images.githubusercontent.com/57655/113427317-cbe99500-93a2-11eb-9701-48a598350d4b.png">
<img width="1021" alt="Screen Shot 2021-04-02 at 10 59 27 AM" src="https://user-images.githubusercontent.com/57655/113427315-cb50fe80-93a2-11eb-8af3-822a23b91940.png">
<em>There are 7 rows, but only 6 were attempted because 1 is managed</em>
</details>

<details>
  <summary>When users have selected everything on all pages, the title can just say "all selected agents" -> i.e. "upgrade all selected agents"</summary>
<img width="843" alt="Screen Shot 2021-04-01 at 11 35 06 AM" src="https://user-images.githubusercontent.com/57655/113344391-04379780-92ff-11eb-86f8-62cdc0cde69d.png">
<em>the text inside the modal was also updated per the screenshots</em>

<h4>Single agent case</h4>
<img width="796" alt="Screen Shot 2021-04-01 at 11 35 18 AM" src="https://user-images.githubusercontent.com/57655/113344393-04d02e00-92ff-11eb-8b7e-1992a1ac695e.png">

<h4>Multiple items but not "all"</h4>
<img width="786" alt="Screen Shot 2021-04-01 at 11 35 33 AM" src="https://user-images.githubusercontent.com/57655/113344394-04d02e00-92ff-11eb-8f67-2f03fe8014c3.png">

</details>


<details>
  <summary>If the result of a bulk action has mixed results, as in some percentage of agents are successful but others fail, show a warning toast that indicates how many succeeded and how many failed</summary>

<h4>Mixed success & failure: show warning</h4>

<img width="1021" alt="Screen Shot 2021-04-02 at 10 59 27 AM" src="https://user-images.githubusercontent.com/57655/113427315-cb50fe80-93a2-11eb-8af3-822a23b91940.png">

<h4>All succeed. Variants for multiple vs all selected</h4>

<img width="376" alt="Screen Shot 2021-04-02 at 11 26 46 AM" src="https://user-images.githubusercontent.com/57655/113432299-2129a480-93ab-11eb-93f1-9a3edf2f1a2d.png">
<img width="342" alt="Screen Shot 2021-04-02 at 11 59 44 AM" src="https://user-images.githubusercontent.com/57655/113432300-21c23b00-93ab-11eb-85a8-222cef29a941.png">

<h4>All fail. Variants for multiple vs all selected</h4>

<img width="381" alt="Screen Shot 2021-04-02 at 11 14 48 AM" src="https://user-images.githubusercontent.com/57655/113428661-2daafe80-93a5-11eb-86b4-1993ebf9d2fa.png">

<img width="351" alt="Screen Shot 2021-04-02 at 11 19 17 AM" src="https://user-images.githubusercontent.com/57655/113428746-592de900-93a5-11eb-9cc0-5d919afd6d59.png">

</details>
<details>
  <summary>Change the "experimental" badge for the upgrade agent action modal to be an icon only badge. You can use the `beaker` icon. The badge should use the same tooltip description that we use today indicating that this action is experimental.</summary>
<img width="843" alt="Screen Shot 2021-04-01 at 11 35 06 AM" src="https://user-images.githubusercontent.com/57655/113344391-04379780-92ff-11eb-86f8-62cdc0cde69d.png">

</details>


Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-06 10:20:43 -04:00
..
actions Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
alerting Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
apm Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
banners Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
beats_management Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
canvas skip flaky suite (#95899) 2021-04-06 02:29:43 +01:00
cases
cloud Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
console_extensions Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
cross_cluster_replication Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
dashboard_enhanced Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
dashboard_mode Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
data_enhanced Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
discover_enhanced Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
drilldowns Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
embeddable_enhanced Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
encrypted_saved_objects Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
enterprise_search [App Search] API logs: Add log detail flyout (#96162) 2021-04-05 16:48:00 -04:00
event_log Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
features Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
file_upload [file upload] document file upload privileges and provide actionable UI when failures occur (#95883) 2021-04-05 13:39:15 -06:00
fleet [Fleet] Can't select managed agent. Bulk upgrade agent UI changes (#96087) 2021-04-06 10:20:43 -04:00
global_search Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
global_search_bar Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
global_search_providers Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
graph Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
grokdebugger Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
index_lifecycle_management Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
index_management Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
infra Change top_hits aggregation to top_metrics for snapshot api (#95644) 2021-04-06 14:32:16 +02:00
ingest_pipelines Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
lens [Lens] don't use eui variables for zindex (#96117) 2021-04-06 10:31:56 +02:00
license_management Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
licensing Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
lists [Security Solution][Exceptions] - Moves ExceptionItem component to lists plugin (#95246) 2021-03-26 20:59:49 -07:00
logstash Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
maps Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
ml [ML] Data Frame Analytics: Fix color assertion with risk of percentage being rounded to 0. (#95797) 2021-04-06 15:21:23 +02:00
monitoring Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
observability [Uptime] Simplift rtl test (#96296) 2021-04-06 15:59:46 +02:00
osquery Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
painless_lab Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
remote_clusters Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
reporting Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
rollup Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
runtime_fields Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
saved_objects_tagging Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
searchprofiler Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
security fixes a skipped management x-pack test (#96178) 2021-04-05 15:24:22 -07:00
security_solution [Security Solution] Remove graphQL host (#94592) 2021-04-06 13:47:55 +01:00
snapshot_restore fix bug and a test to check that users cannot navigate if a step is invalid (#95939) 2021-04-06 14:41:10 +02:00
spaces Remove /src/legacy (#95510) 2021-04-06 09:25:36 +02:00
stack_alerts Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
task_manager Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
telemetry_collection_xpack Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
timelines [Security Solution][RAC][Timeline] Timeline plugin skeleton and test plugin harness (#95683) 2021-03-31 15:33:19 -04:00
transform Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
translations [Fleet] Can't select managed agent. Bulk upgrade agent UI changes (#96087) 2021-04-06 10:20:43 -04:00
triggers_actions_ui Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
ui_actions_enhanced Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
upgrade_assistant Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
uptime Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
watcher Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00
xpack_legacy Revert "TS Incremental build exclude test files (#95610)" (#96223) 2021-04-05 11:59:26 -07:00