[Fleet] Support granular integrations in policy editor#101531
[Fleet] Support granular integrations in policy editor#101531jen-huang merged 19 commits intoelastic:masterfrom
Conversation
…ration-policy-editor
…ration-policy-editor
|
@elasticmachine merge upstream |
|
Pinging @elastic/fleet (Team:Fleet) |
kpollich
left a comment
There was a problem hiding this comment.
Haven't pulled down to test locally, but code looks great! Had one very minor comment. Awesome work.
There was a problem hiding this comment.
Rather than coerce this to a boolean, it might make more sense to use .some to directly return a boolean based on this condition.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some
…ration-policy-editor
2c9902d to
60ef874
Compare
| ? (packageInfo.policy_templates || []).filter( | ||
| (policyTemplate) => policyTemplate.name === showOnlyIntegration | ||
| ) || [] |
There was a problem hiding this comment.
nitpick but there is probably a useless || [] here (if it can simplify that expression )
| ? (packageInfo.policy_templates || []).filter( | |
| (policyTemplate) => policyTemplate.name === showOnlyIntegration | |
| ) || [] | |
| ? (packageInfo.policy_templates || []).filter( | |
| (policyTemplate) => policyTemplate.name === showOnlyIntegration | |
| ) |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: cc @jen-huang |
* Adjust packageToPackagePolicy to support multiple policy_templates * Adjust validatePackagePolicy to support multiple policy templates * Create input for every policy template input instead of grouping * Related adjustments for previous commit * Don't key by policy template when package doesn't have integrations * Adjust limited package check to support multiple policy templates * First pass at UI support * Fix imports, add missing schema * Fix finding input agent templates, adjust tests * Only enable specific integrations by default in the UI * Fix import * Make breadcrumbs and create package policy page title reflect integration, not package * Only show specific integration inputs when adding integration to a policy * Change predicate * Simplify condition
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…1848) * Adjust packageToPackagePolicy to support multiple policy_templates * Adjust validatePackagePolicy to support multiple policy templates * Create input for every policy template input instead of grouping * Related adjustments for previous commit * Don't key by policy template when package doesn't have integrations * Adjust limited package check to support multiple policy templates * First pass at UI support * Fix imports, add missing schema * Fix finding input agent templates, adjust tests * Only enable specific integrations by default in the UI * Fix import * Make breadcrumbs and create package policy page title reflect integration, not package * Only show specific integration inputs when adding integration to a policy * Change predicate * Simplify condition Co-authored-by: Jen Huang <its.jenetic@gmail.com>
…add-agent-flyout * 'master' of github.com:elastic/kibana: (35 commits) [Cases] Improve connectors mapping (elastic#101145) [ML] Fixes display of job group badges in recognizer wizard (elastic#101775) Fix es_archives path (elastic#101737) [kbnArchiver] convert archive names to root-relative paths (elastic#101839) [Reporting] Make "ScreenCapturePanel" shareable for Canvas (elastic#100623) [Alerting UI] Converted Rules and Connectors management pages to new layout. (elastic#101697) [Fleet] Support granular integrations in policy editor (elastic#101531) [Security Solution][Detections] Update detection alert mappings to ECS v1.10.0 (elastic#101680) [Fleet] Integrations UI: Adjust policies list UI (elastic#101600) chore(NA): moving @kbn/server-route-repository into bazel (elastic#101484) Support owner and description attributes inside the Manifest file, use in API docs (elastic#101786) [Security Solution] fix security empty overview links (elastic#101536) Unskips migration tests now that elastic search is fixed (elastic#101682) Fix endpoint -> integrations onboarding link (elastic#101804) [Alerting] Log warning when rules are not rescheduled due to Saved Object not found error (elastic#101591) Update datafeed_high_count_network_denies.json (elastic#101681) [Index patterns] Field editor example app (elastic#100524) [DOCS] Adding file upload to add data page (elastic#101674) [Security Solution][Endpoint] Adds Endpoint Host Isolation Status common component (elastic#101782) Upgrade ws v7.3.1->v7.4.2 and v6.2.1->v6.2.2 (elastic#101402) ... # Conflicts: # x-pack/plugins/fleet/public/components/agent_enrollment_flyout/agent_policy_selection.tsx # x-pack/plugins/fleet/public/components/agent_enrollment_flyout/index.tsx # x-pack/plugins/fleet/public/components/agent_enrollment_flyout/managed_instructions.tsx # x-pack/plugins/fleet/public/components/agent_enrollment_flyout/standalone_instructions.tsx
…add-integrations-redirect * 'master' of github.com:elastic/kibana: (44 commits) Allow navigating discover flyout via arrow keys (elastic#101772) [Cases] Improve connectors mapping (elastic#101145) [ML] Fixes display of job group badges in recognizer wizard (elastic#101775) Fix es_archives path (elastic#101737) [kbnArchiver] convert archive names to root-relative paths (elastic#101839) [Reporting] Make "ScreenCapturePanel" shareable for Canvas (elastic#100623) [Alerting UI] Converted Rules and Connectors management pages to new layout. (elastic#101697) [Fleet] Support granular integrations in policy editor (elastic#101531) [Security Solution][Detections] Update detection alert mappings to ECS v1.10.0 (elastic#101680) [Fleet] Integrations UI: Adjust policies list UI (elastic#101600) chore(NA): moving @kbn/server-route-repository into bazel (elastic#101484) Support owner and description attributes inside the Manifest file, use in API docs (elastic#101786) [Security Solution] fix security empty overview links (elastic#101536) Unskips migration tests now that elastic search is fixed (elastic#101682) Fix endpoint -> integrations onboarding link (elastic#101804) [Alerting] Log warning when rules are not rescheduled due to Saved Object not found error (elastic#101591) Update datafeed_high_count_network_denies.json (elastic#101681) [Index patterns] Field editor example app (elastic#100524) [DOCS] Adding file upload to add data page (elastic#101674) [Security Solution][Endpoint] Adds Endpoint Host Isolation Status common component (elastic#101782) ... # Conflicts: # x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx # x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx
* Adjust packageToPackagePolicy to support multiple policy_templates * Adjust validatePackagePolicy to support multiple policy templates * Create input for every policy template input instead of grouping * Related adjustments for previous commit * Don't key by policy template when package doesn't have integrations * Adjust limited package check to support multiple policy templates * First pass at UI support * Fix imports, add missing schema * Fix finding input agent templates, adjust tests * Only enable specific integrations by default in the UI * Fix import * Make breadcrumbs and create package policy page title reflect integration, not package * Only show specific integration inputs when adding integration to a policy * Change predicate * Simplify condition
Summary
Resolves #93315. This PR completes the second part of integration granularity support (follow up to #99866) by adding support for multiple
policy_templatesto the integration policy editor.Screenshots
Add integration page

Edit integration page

Agent YAML with more input blocks

How to test
TLDR Build in-flight AWS package and load it into your local package registry
elastic-packagehttps://github.com/elastic/elastic-package<integrations>packages/awselastic-package build, make note of the builtaws/0.6.1package at<integrations>/buildpackage-registryhttps://github.com/elastic/package-registry0.6.0package to<package-registry>/build/package-storage/packages/awsgo run .kibana.dev.ymlto use your local package registry by adding:xpack.fleet.registryUrl: http://localhost:8080