Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.x`: - [[UII] Support content packages in UI (#195831)](#195831) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jen Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-15T17:18:41Z","message":"[UII] Support content packages in UI (#195831)\n\n## Summary\r\n\r\nResolves #192484. This PR adds support for content packages in UI. When\r\na package is of `type: content`:\r\n\r\n- `Content only` badge is shown on its card in Integrations list, and on\r\nheader of its details page\r\n- `Add integration` button is replaced by `Install assets` button in\r\nheader\r\n- References to agent policies are hidden\r\n- Package policy service throws error if attempting to create or bulk\r\ncreate policies for content packages\r\n\r\n<img width=\"1403\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a82c310a-f849-4b68-b56c-ff6bb31cd6bf\">\r\n\r\n<img width=\"1401\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/63eb3982-9ec9-494f-a95a-2b8992a408ba\">\r\n\r\n## How to test\r\nThe only current content package is `kubernetes_otel`. You will need to\r\nbump up the max allowed spec version and search with beta (prerelease)\r\npackages enabled to find it:\r\n```\r\nxpack.fleet.internal.registry.spec.max: '3.4'\r\n```\r\n\r\nTest UI scenarios as above. The API can be tested by running:\r\n```\r\nPOST kbn:/api/fleet/package_policies\r\n{\r\n \"policy_ids\": [\r\n \"\"\r\n ],\r\n \"package\": {\r\n \"name\": \"kubernetes_otel\",\r\n \"version\": \"0.0.2\"\r\n },\r\n \"name\": \"kubernetes_otel-1\",\r\n \"description\": \"\",\r\n \"namespace\": \"\",\r\n \"inputs\": {}\r\n}\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"9512f6c26fbac59b8b8d7390dc28da930e42f181","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Fleet","v9.0.0","release_note:feature","backport:prev-minor"],"number":195831,"url":"https://github.com/elastic/kibana/pull/195831","mergeCommit":{"message":"[UII] Support content packages in UI (#195831)\n\n## Summary\r\n\r\nResolves #192484. This PR adds support for content packages in UI. When\r\na package is of `type: content`:\r\n\r\n- `Content only` badge is shown on its card in Integrations list, and on\r\nheader of its details page\r\n- `Add integration` button is replaced by `Install assets` button in\r\nheader\r\n- References to agent policies are hidden\r\n- Package policy service throws error if attempting to create or bulk\r\ncreate policies for content packages\r\n\r\n<img width=\"1403\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a82c310a-f849-4b68-b56c-ff6bb31cd6bf\">\r\n\r\n<img width=\"1401\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/63eb3982-9ec9-494f-a95a-2b8992a408ba\">\r\n\r\n## How to test\r\nThe only current content package is `kubernetes_otel`. You will need to\r\nbump up the max allowed spec version and search with beta (prerelease)\r\npackages enabled to find it:\r\n```\r\nxpack.fleet.internal.registry.spec.max: '3.4'\r\n```\r\n\r\nTest UI scenarios as above. The API can be tested by running:\r\n```\r\nPOST kbn:/api/fleet/package_policies\r\n{\r\n \"policy_ids\": [\r\n \"\"\r\n ],\r\n \"package\": {\r\n \"name\": \"kubernetes_otel\",\r\n \"version\": \"0.0.2\"\r\n },\r\n \"name\": \"kubernetes_otel-1\",\r\n \"description\": \"\",\r\n \"namespace\": \"\",\r\n \"inputs\": {}\r\n}\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"9512f6c26fbac59b8b8d7390dc28da930e42f181"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195831","number":195831,"mergeCommit":{"message":"[UII] Support content packages in UI (#195831)\n\n## Summary\r\n\r\nResolves #192484. This PR adds support for content packages in UI. When\r\na package is of `type: content`:\r\n\r\n- `Content only` badge is shown on its card in Integrations list, and on\r\nheader of its details page\r\n- `Add integration` button is replaced by `Install assets` button in\r\nheader\r\n- References to agent policies are hidden\r\n- Package policy service throws error if attempting to create or bulk\r\ncreate policies for content packages\r\n\r\n<img width=\"1403\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a82c310a-f849-4b68-b56c-ff6bb31cd6bf\">\r\n\r\n<img width=\"1401\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/63eb3982-9ec9-494f-a95a-2b8992a408ba\">\r\n\r\n## How to test\r\nThe only current content package is `kubernetes_otel`. You will need to\r\nbump up the max allowed spec version and search with beta (prerelease)\r\npackages enabled to find it:\r\n```\r\nxpack.fleet.internal.registry.spec.max: '3.4'\r\n```\r\n\r\nTest UI scenarios as above. The API can be tested by running:\r\n```\r\nPOST kbn:/api/fleet/package_policies\r\n{\r\n \"policy_ids\": [\r\n \"\"\r\n ],\r\n \"package\": {\r\n \"name\": \"kubernetes_otel\",\r\n \"version\": \"0.0.2\"\r\n },\r\n \"name\": \"kubernetes_otel-1\",\r\n \"description\": \"\",\r\n \"namespace\": \"\",\r\n \"inputs\": {}\r\n}\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"9512f6c26fbac59b8b8d7390dc28da930e42f181"}}]}] BACKPORT-->
- Loading branch information