-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Conversation
...ins/fleet/public/applications/fleet/sections/agents/components/agent_upgrade_modal/index.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
user doesn't have permission to update head repository |
@elasticmachine merge upstream |
user doesn't have permission to update head repository |
@elasticmachine merge upstream |
user doesn't have permission to update head repository |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks @jfsiii
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @jfsiii |
@@ -148,12 +148,21 @@ export const AgentBulkActions: React.FunctionComponent<{ | |||
}, | |||
]; | |||
|
|||
const showSelectEverything = | |||
selectionMode === 'manual' && | |||
selectedAgents.length === selectableAgents && |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
…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>
…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>
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 :
Testing in-progress on: We are in middle of validating these pop-ups for now and will confirm complete testing once done on this. Thanks |
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.
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.
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"
There are 7 rows, but only 6 were attempted because 1 is managedWhen users have selected everything on all pages, the title can just say "all selected agents" -> i.e. "upgrade all selected agents"
the text inside the modal was also updated per the screenshotsSingle agent case
Multiple items but not "all"
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
All succeed. Variants for multiple vs all selected
All fail. Variants for multiple vs all selected
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.