feat(dashboard): support per-target multi-datasource queries - #2238
Draft
jsers wants to merge 5 commits into
Draft
feat(dashboard): support per-target multi-datasource queries#2238jsers wants to merge 5 commits into
jsers wants to merge 5 commits into
Conversation
Allow each panel query target to carry its own datasource so a single panel can mix datasources. Mixed panels render via SingleTargetQueryEditor reusing each datasource's existing QueryBuilder; single-datasource panels keep the existing per-plugin builder path. - Add ITarget.datasource and a v4 migrator that normalizes legacy __mode__/expr targets to kind-based targets on dashboard load. - Introduce datasource registry/contract/service/requestState for the new /api/n9e/v2/query-batch rendering path with expression dependency resolution. - Unify expression detection on isExpressionTarget across plugin builders so migrated targets keep rendering after save/reload. - Omit field.key when spreading onto nested Form.Items to fix React duplicate-key warnings; add query.mixed_datasource i18n key.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Spread elasticsearch/opensearch query.values into one backend query per value, preserving the first value's RefID and allocating unique sub RefIDs for the rest. Normalize responses back to the originating target while letting an exact-match RefID win over a value-query prefix match. Also port each datasource's legacy isQueryReady short-circuit so unprepared targets are silently skipped without triggering validation.
… usage - migrate Menu.Item children to Menu items prop in DashboardLinks, Detail/Title, Renderer/Main - add hidden input child to hidden Form.Item in ES QueryPanel/Values, OrganizeFields, TransformationsEditorNG - reset fields before setFieldsValue in DataLinks FormModal - move setTableFields side effect from useMemo to useEffect in TableNG
…datasource-query # Conflicts: # src/pages/dashboard/Editor/index.tsx # src/pages/dashboard/Renderer/Renderer/Main.tsx # src/pages/dashboard/Renderer/Renderer/TableNG/index.tsx # src/pages/dashboard/Renderer/Renderer/Timeseries/index.tsx
Strip the `key` field before spreading Form.List field props onto Form.Item / Form.List to silence the React key-spread warning across the Elasticsearch query editor and plugin AdvancedSettings components.
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.
Allow each panel query target to carry its own datasource so a single panel can mix datasources. Mixed panels render via SingleTargetQueryEditor reusing each datasource's existing QueryBuilder; single-datasource panels keep the existing per-plugin builder path.