Support duplicated views via named view instances (#292) - #294
Merged
Conversation
Prepares for several instances of one view type (#292): events are dispatched to the view name they carry instead of a hardcoded widget name, per-view event channels, and view names/action owners become Arc<str> so they can be non-'static. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A 'views:' entry with a 'view:' field defines a named instance of that view type; the key becomes the instance name, referenceable from 'layout.panes' and 'layout.focus'. The same base type may now appear in the layout several times via instances. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ViewProvider::show() gets the instance name; queries, server_logs and flamegraph views name their widget after it, so several instances of one view type can be shown side by side, each with its own settings (filter/start/end/limit/level) and '/'-filter state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Restricts a queries view to the given query_kind values (a single value or a list), e.g. 'query_kind: [Create, Drop, Alter]' for a DDL pane. Filters the initial query's kind in the query_log views; needs 23.2+ for the live queries view (system.processes.query_kind). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
They shared one enum_key each, and the deferred slot keeps only the newest same-key event: with three flamegraph panes in a layout the middle request was dropped and its pane stayed a stub forever (live refreshes could starve a pane the same way). UpdateFlameGraph's slot has no name, so its key uses the Arc identity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
An instance so named would receive the filtered-logs popup's updates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
views:entry with aview:field defines a named instance of a view type, referenceable from the layout — so the same view can be opened in several panes with different settings. Also adds aquery_kindper-view setting.Fixes: #292