Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet] Can't select managed agent. Bulk upgrade agent UI changes #96087

Merged
merged 6 commits into from
Apr 6, 2021

Conversation

jfsiii
Copy link
Contributor

@jfsiii jfsiii commented Apr 1, 2021

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.

  • 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.
  • 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.
  • 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"
  • 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.
  • 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.

Per feature details & screenshots

Disable the checkbox for agents enrolled in a hosted agent policy. Screen Shot 2021-04-02 at 10 35 38 AM
We don't need to provide a tooltip description since the Agent policy "lock" icon appears in the table row.
I left the description in until we implement the "lock" icon.
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" Screen Shot 2021-04-02 at 9 20 28 AM Screen Shot 2021-04-02 at 9 20 45 AM
Choosing a bulk action should filter out / not include any agents that are enrolled in a hosted agent policy.
Screen Shot 2021-04-02 at 10 58 43 AM Screen Shot 2021-04-02 at 11 00 44 AM Screen Shot 2021-04-02 at 10 59 27 AM There are 7 rows, but only 6 were attempted because 1 is managed
When users have selected everything on all pages, the title can just say "all selected agents" -> i.e. "upgrade all selected agents" Screen Shot 2021-04-01 at 11 35 06 AM the text inside the modal was also updated per the screenshots

Single agent case

Screen Shot 2021-04-01 at 11 35 18 AM

Multiple items but not "all"

Screen Shot 2021-04-01 at 11 35 33 AM
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

Mixed success & failure: show warning

Screen Shot 2021-04-02 at 10 59 27 AM

All succeed. Variants for multiple vs all selected

Screen Shot 2021-04-02 at 11 26 46 AM Screen Shot 2021-04-02 at 11 59 44 AM

All fail. Variants for multiple vs all selected

Screen Shot 2021-04-02 at 11 14 48 AM Screen Shot 2021-04-02 at 11 19 17 AM
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. Screen Shot 2021-04-01 at 11 35 06 AM

@jfsiii jfsiii added Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0 labels Apr 1, 2021
@jfsiii
Copy link
Contributor Author

jfsiii commented Apr 2, 2021

@elasticmachine merge upstream

@jfsiii jfsiii requested a review from hbharding April 2, 2021 16:18
@jfsiii jfsiii marked this pull request as ready for review April 2, 2021 16:18
@jfsiii jfsiii requested a review from a team as a code owner April 2, 2021 16:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jfsiii jfsiii added the release_note:skip Skip the PR/issue when compiling release notes label Apr 2, 2021
@jfsiii
Copy link
Contributor Author

jfsiii commented Apr 5, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

user doesn't have permission to update head repository

@jfsiii jfsiii self-assigned this Apr 5, 2021
@jfsiii
Copy link
Contributor Author

jfsiii commented Apr 5, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

user doesn't have permission to update head repository

@jfsiii
Copy link
Contributor Author

jfsiii commented Apr 5, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

user doesn't have permission to update head repository

@jfsiii
Copy link
Contributor Author

jfsiii commented Apr 5, 2021

@elasticmachine merge upstream

Copy link
Contributor

@hbharding hbharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @jfsiii

@jfsiii jfsiii added the auto-backport Deprecated - use backport:version if exact versions are needed label Apr 5, 2021
@jfsiii jfsiii enabled auto-merge (squash) April 5, 2021 18:17
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 707.7KB 709.5KB +1.8KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jfsiii

@@ -148,12 +148,21 @@ export const AgentBulkActions: React.FunctionComponent<{
},
];

const showSelectEverything =
selectionMode === 'manual' &&
selectedAgents.length === selectableAgents &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectableAgents is only on the current page right? so you can select everything but have non selectable agents on other page?

Copy link
Contributor Author

@jfsiii jfsiii Apr 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's correct. The current behavior shouldn't change. This expression was just moved from lower and named.

@jfsiii jfsiii merged commit 357c4a5 into elastic:master Apr 6, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 6, 2021
…astic#96087)

## Summary

This PR implements several items from point 8 in elastic/observability-design#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>
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #96312

This backport PR will be merged automatically after passing CI.

@jfsiii jfsiii deleted the 90437-bulk-upgrade-ui-changes branch April 6, 2021 17:09
kibanamachine added a commit that referenced this pull request Apr 6, 2021
…6087) (#96312)

## Summary

This PR implements several items from point 8 in elastic/observability-design#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>

Co-authored-by: John Schulz <john.schulz@elastic.co>
@EricDavisX EricDavisX mentioned this pull request Apr 7, 2021
17 tasks
@dikshachauhan-qasource
Copy link

Hi @EricDavisX

We have validated above merges on latest 8.0 snapshot environment and found below changes working fine.

After converting a user created policy under which agent was installed to Managed policy using API, we have observed following changes working fine.

Validation completed on :

  1. Check box for managed host is disabled on Agent list page. hence unable to select using bulk options.

  2. bulk actions button changed to "all agents selected", When everything selected, using modal title "select everything on all pages", from '*agents selected'
    image

  3. For bulk action, we observed action modal to upgrade agents wrt confirmation pop up working fine as per mocks provided.

  4. The beaker icon is displayed for "experimental" badge on upgrade agent action modal.

Testing in-progress on:
5. Further, we have validated pop messages for bulk upgrade actions. Please refer below screenshots:

image

We are in middle of validating these pop-ups for now and will confirm complete testing once done on this.

image

Thanks
QAS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants