-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Logs UI] Make URL syncing optional in the Log View state machine (#1…
…54061) ## Summary This fixes #154030 (and other uses of the Log Stream embeddable component). The embeddable component calls `useLogView()` directly, and this causes issues with context dependencies for URL syncing from the consumers. This PR makes the URL actions / services optional within the machine. Uses: - `<LogViewProvider />` used for all main Logs pages (stream, anomalies, categories) has full URL syncing ✅ - `<LogViewProvider />` used within our Logs alert editor does not have URL syncing (not needed) ❌ - `useLogView()` as used by the embeddable component does not have URL syncing ❌ - `useLogView()` as used by `RedirectToNodeLogs` does not have URL syncing (not needed, URL syncing kicks in after redirect) ❌ The default / pure implementation of `initializeFromUrl` just does a `send({ type: 'INITIALIZED_FROM_URL', logViewReference: null })` as the state machine needs to transition to it's `initialized` state and is already set up to use the initial context reference if there's no reference obtained from the URL. Examples: ![Screenshot 2023-03-30 at 15 23 48](https://user-images.githubusercontent.com/471693/228867868-b526c4b2-bec8-47cb-8e7c-c3da2dd6c803.png) ![Screenshot 2023-03-30 at 15 24 39](https://user-images.githubusercontent.com/471693/228867889-c7451f84-415c-45f9-ae96-e6908d60409c.png)
- Loading branch information
Showing
4 changed files
with
67 additions
and
27 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