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

Add Manage agent policies action #182112

Closed
8 tasks done
Tracked by #75867
juliaElastic opened this issue Apr 30, 2024 · 2 comments · Fixed by #186987
Closed
8 tasks done
Tracked by #75867

Add Manage agent policies action #182112

juliaElastic opened this issue Apr 30, 2024 · 2 comments · Fixed by #186987
Assignees
Labels
QA:Needs Validation Issue needs to be validated by QA Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@juliaElastic
Copy link
Contributor

juliaElastic commented Apr 30, 2024

Part of reusable integration policies work.

  • Add a new modal Manage agent policies that opens when clicking on agent policies count popover added here Show multiple agent policies on integration policies list UI #182111
  • The modal window should display a searchable multiselect component of agent policies (could be reused from the new integration page)
  • When agent policies are selected, and the action is submitted, an API request should be made to save the agent policy ids in the integration policy
  • The multiselect should display agent policies already linked to the integration
  • The action should allow removing existing linkage to agent policies
  • When removing an agent policy linkage, a warning should pop up to say “This integration will now be removed from these policies: ” ask the user to agree to proceed or cancel.
  • The action should prevent removing the last agent policy linkage until Support integration policies without agent policy references #182220 is completed
  • The minimum privileges required to take the action should be Integrations:All and Fleet: Agent policies:All
image image
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 30, 2024
@juliaElastic juliaElastic added the Team:Fleet Team label for Observability Data Collection Fleet team label Apr 30, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 30, 2024
@juliaElastic juliaElastic changed the title Add integration policy action to link with more agent policies Add Reuse integration to integration policy actions May 1, 2024
@juliaElastic
Copy link
Contributor Author

@nimarezainia Updated this issue with a consideration to RBAC:

  • The minimum privileges required to take the action should be Integrations:All and Fleet: Agent policies:All

Similarly updated the visibility of Shared column and Agent policies count column to require minimum Integrations:Read and Fleet: Agent policies:Read

@juliaElastic juliaElastic changed the title Add Reuse integration to integration policy actions Add Manage agent policies action May 29, 2024
@kpollich kpollich added the QA:Needs Validation Issue needs to be validated by QA label Jun 6, 2024
juliaElastic added a commit that referenced this issue Jul 2, 2024
…#186987)

## Summary

Closes #182112

Added modal to manage agent policies.

To verify:
- go to an integration where the integration policies are listed
- click on the `+` button in the agent policies column
- click on `Manage agent policies` in the popover
- add/remove agent policies in the modal
- click submit, the integration policy should be updated to be linked to
the updated agent policies



<img width="1614" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/33101f7e-8563-4990-9a52-74e5448c21da">

Made a change to the table column display to show a `+` button even if
there is only one policy. Previously the popover could only be accessed
if there are at least 2 agent policies.
Also restored the agent policy link, lock icon and revision display
(instead of a badge) if there are multiple agent policies.
@simosilvestri Let me know if you have any UX recommendation as it
differs slightly from the prototype.

<img width="982" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/51aff39c-3f84-4861-8614-c0e16b64f4bf">

<img width="1533" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/f08de084-d4c2-47c6-b532-f875ceaf10ef">

EDIT: after discussing with Simona, removed the + button in case of a
single agent policy assigned to the integration policy.
<img width="1391" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/9ce5e98a-3ea2-4b79-a073-62047012db03">


Disabling `Manage agent policies` button if the current user doesn't
have at least write integration policies and write agent policies
privilege.
This is how it looks with read privileges:
<img width="2294" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/625843fb-8a50-4a06-b3a3-dc95a9fc2654">



### Checklist

- [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/main/packages/kbn-i18n/README.md)
- [x] [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA:Needs Validation Issue needs to be validated by QA Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants