mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
## Summary This PR adds an "All logs" ad hoc (temporary) data view to the Discover Observability root profile based on the central log sources setting, allowing quick access to logs (with the most up to date log sources) without needing to first manually create a data view:  To support this, a new `getDefaultAdHocDataViews` extension point has been added to Discover, allowing profiles to specify an array of ad hoc data view specs would should be created by default when the profile is resolved, and automatically cleaned up when the profile changes or the user leaves Discover. Resolves #201669. Resolves #189166. ### Notes - The "All logs" ad hoc data view should only appear when using the Observability Solution view (in any deployment type). - Data view specs returned from `getDefaultAdHocDataViews` must include consistent IDs across resolutions in order for Discover to manage them correctly (e.g. to find and reload the data view after a page refresh). Situations where we'd expect a change in ID (e.g. when saving to a Discover session) are handled internally by Discover. - To avoid a breaking change, the returned ad hoc data views have no impact on the default data view shown when navigating to Discover. If any persisted data views exist, one of them will be used as the default. If no persisted data views exist, the first entry of the array returned by `getDefaultAdHocDataViews` will be used as the default. - We still want to notify users in Discover when they have no ES data at all, and prompt them to install integrations. For this reason, the "no data" page is still shown in Discover even if there are default profile ad hoc data views (unlike if there are persisted data views, in which case we use the default and hide the "no data" page). - When saving a Discover session that uses a default profile ad hoc data view, the data view will be copied on save as `{DATA_VIEW_NAME} (copy)`. This allows us to assign a unique ID to the version that gets saved with the Discover session, and avoids having to choose between the profile data view or the embedded data view when reopening the session, which has drawbacks: - If choosing the profile data view, the Discover session may display incorrectly if the log sources setting changed since it was saved, and the user would no longer be able to view the session as it was intended without first modifying the setting to the expected value. - If choosing the embedded data view, the replacement shown after opening the Discover session may not reflect the latest log sources setting until a new session is started, and there would be no way for the user to migrate the session to use the latest version of the profile data view. ### 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/src/platform/packages/shared/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 - [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 - [ ] 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 was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) |
||
---|---|---|
.. | ||
accessibility | ||
analytics | ||
api_integration | ||
common | ||
examples | ||
functional | ||
harden | ||
health_gateway | ||
interactive_setup_api_integration | ||
interactive_setup_functional | ||
interpreter_functional | ||
node_roles_functional | ||
package | ||
plugin_functional | ||
scripts | ||
server_integration | ||
ui_capabilities/newsfeed_err | ||
kibana.jsonc | ||
tsconfig.json |