forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Advanced Settings] Integrate new Settings application into stateful …
…Kibana (elastic#175255) Closes elastic#172922 ## Summary This PR: - Integrates the new Settings application (`packages/kbn-management/settings/application`) into stateful Kibana and removes the old `management_app` from the `src/plugins/advanced_settings` plugin. - Adds support for section registry in the new Settings application, so that other plugins can add their own sections to the Advanced settings app. - Adds functionality for disabling saving of settings based on the provided capabilities of the current user. <img width="1352" alt="Screenshot 2024-01-23 at 16 46 03" src="https://github.com/elastic/kibana/assets/59341489/1f3b7088-58e2-46e8-a7dd-ae0fc346b4ba"> <br><br> "Usage collection" section in Global settings: <img width="1099" alt="Screenshot 2024-01-23 at 16 48 24" src="https://github.com/elastic/kibana/assets/59341489/ebc54ad5-348b-46dd-a047-b418ddc7ba4f"> ### How to test **Testing Advanced settings in stateful Kibana:** 1. Start Es with `yarn es snapshot` and Kibana with `yarn start` 2. Go to Stack Management -> Advanced Settings 3. Verify that the app functions correctly. Both tabs (for space and global settings) should be displayed, setting fields should be editable and saveable, etc. **Testing the section registry** Currently, `telemetry_management_section` is the only plugin that registers a section - the "Usage collection" section under the "Global settings" tab. This should work correctly in stateful Kibana. 1. Start Es with `yarn es snapshot --license=trial` and Kibana with `yarn start` 2. Go to Stack Management -> Advanced Settings and select the "Global settings" tab 3. Scroll down and verify that the "Usage collection" section is displayed and works as expected. **Testing with different capabilities:** 1. Start Es with `yarn es snapshot` and Kibana with `yarn start` 2. Go to Stack Management -> Roles 3. Create a role that has "Read" access to Advanced settings and one that doesn't have any access. 4. Create users with each of these two roles. 5. Log in with these users and verify that the user with "Read" access can see the app but cannot edit it, and the user with no privileges cannot access the app. **Testing Advanced settings in serverless Kibana:** The Advanced settings app in serverless shouldn't be affected by these changes. 1. Start Es with `yarn es serverless` and Kibana with `yarn serverless-{es/oblt/security}` 2. Go to Management -> Advanced Settings 3. Verify that the app functions correctly. There shouldn't be any tabs as there are no spaces. <!-- ### Checklist Delete any items that are not applicable to this PR. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --> --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
015d710
commit 4eb3578
Showing
77 changed files
with
242 additions
and
10,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,6 @@ | |
"@kbn/analytics", | ||
"@kbn/core", | ||
"@kbn/core-ui-settings-common", | ||
"@kbn/management-settings-section-registry", | ||
] | ||
} |
Oops, something went wrong.