-
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] Create shared package policy #185916
[Fleet] Create shared package policy #185916
Conversation
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
...ctions/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx
Outdated
Show resolved
Hide resolved
…policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx Co-authored-by: Kyle Pollich <kpollich1@gmail.com>
..._policy/create_package_policy_page/components/steps/components/agent_policy_multi_select.tsx
Outdated
Show resolved
Hide resolved
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.
Followed the test instructions and it worked as expected LGTM 🚀
}, [agentPolicyMultiOptions, selectedPolicyIds]); | ||
|
||
const [selected, setSelected] = React.useState<any>(selectedOptions); |
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.
Do we need that state cannot we use selectedOptions
directly? changing selectedPolicyIds
should update it no?
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.
You are right, it's not necessary, updated.
💛 Build succeeded, but was flaky
Failed CI StepsThe CI Stats report is too large to be displayed here, check out the CI build annotation for this information. History
To update your PR or re-run it, just comment with: |
Closes #182111 ## Summary Show multiple agent policies in integrations table. ## Testing - Enable feature flag `enableReusableIntegrationPolicies` - Install an integration that has more than one agent policies associated with it (instructions are [here](#185916)) - Navigate to integrations table and verify that the policy displays a badge with the number of associated policies -1 and that it opens up a popover, like in below screenshots. **NOTE** the button "Manage agent policies" does not work for now, as the feature is under development and it's hidden with a feature flag! ### With feature flag enabled, when integration has multiple agent policies ![Screenshot 2024-06-12 at 15 49 34](https://github.com/elastic/kibana/assets/16084106/bd8a4e6a-a752-46bb-8003-a4e875d0fa93) ![Screenshot 2024-06-12 at 15 46 38](https://github.com/elastic/kibana/assets/16084106/f93a91bc-bae7-40a0-8425-ac2dbbcaeae4) When one of the policies is managed: ![Screenshot 2024-06-13 at 11 30 01](https://github.com/elastic/kibana/assets/16084106/3ba0d5cb-4af1-46e5-875a-d4391c79ad6d) ### When feature flag not enabled or integration has only one agent policy The UI remains as it is today: ![Screenshot 2024-06-12 at 15 48 56](https://github.com/elastic/kibana/assets/16084106/14122ad3-d4f8-448a-b4b3-6f08900ba833) ### Checklist - [ ] 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) - [ ] [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 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Closes https://github.com/elastic/ingest-dev/issues/3263
Added multi-select agent policy component to Add integration policy page.
Steps to verify
To verify:
xpack.fleet.enableExperimental: ['enableReusableIntegrationPolicies']
tokibana.dev.yml
locallyPreview API Request
button)Logstash output restriction
There are a few scenarios where agent policy selection is restricted.
EuiComboBox
component doesn't support a multiline custom option rendering, so added a warning icon with a tooltip instead.Existing UI with
EuiSuperSelect
:Limited packages restriction
The other restrictions don't allow limited packages to be added twice to an agent policy: endpoint, osquery.
Test by adding osquery_manager to one agent policy, and then try to add another integration policy to the same agent policy. It should be disabled.
Agent policies used by agents
The UI shows the sum of agents enrolled to the selected agent policies
The
Preview API Request
feature should keep thepolicy_ids
list in sync when adding/removing agent policies.The confirmation modal should also show a sum of enrolled agents and list of selected agent policies.
Checklist