Skip to content

APPZ-955 Math queries support#56

Merged
OrReuben merged 7 commits intomain-logziofrom
APPZ-955-math-on-queries-formulas
Feb 3, 2026
Merged

APPZ-955 Math queries support#56
OrReuben merged 7 commits intomain-logziofrom
APPZ-955-math-on-queries-formulas

Conversation

@OrReuben
Copy link

@OrReuben OrReuben commented Feb 2, 2026

Description

Connected to https://github.com/logzio/gaia-hermes-ws/pull/15953

  • Extended TimeSeriesQueryPluginDependencies with queries?: number[] to declare dependencies on other queries
  • Extended TimeSeriesQueryContext with resolvedQueryResults and queryIndex for plugins to access resolved data
  • Added hidden?: boolean to QuerySpec to hide queries from chart visualization while still executing them
  • Implemented dynamic dependency resolution in useTimeSeriesQueries supporting unlimited chaining depth
  • Added fingerprinting for cache invalidation when dependency data changes
  • Extracted query utilities to time-series-queries-utils.ts
  • Added visibility toggle (eye icon) in QueryEditorContainer
  • Updated PanelContent to filter hidden queries and show "no data" when all visible queries are hidden
  • Added Reload Query and Run Query button

Note

Medium Risk
Touches core query execution and caching behavior (dependency gating, query keys, cycle detection), which can impact data loading and performance across dashboards despite being mostly additive and covered by new unit tests.

Overview
Enables math/derived queries by letting TimeSeries query plugins declare inter-query dependencies (dependsOn.queries) and by passing resolvedQueryResults + queryIndex into TimeSeriesQueryContext; useTimeSeriesQueries now dynamically gates execution until dependencies are resolved, fingerprints dependency data into the React Query key, and detects/throws on circular dependencies (refactored into time-series-queries-utils.ts with tests).

Adds a hidden flag to QuerySpec/schema and threads it through DataQueriesProvider/dashboard panel wiring so queries can execute but be excluded from chart rendering; PanelContent filters hidden results and treats “all queries hidden” as a valid render state.

Updates the query editing UI to support this workflow: adds a per-query visibility toggle (eye icon), passes index through PluginEditor/PluginSpecEditor, and re-enables an explicit Run/Reload button with synced-state styling (also used in variable editor), with tests updated accordingly.

Written by Cursor Bugbot for commit 50bb43c. This will update automatically on new commits. Configure here.

Signed-off-by: OrReuben <orreuven1243@gmail.com>
Signed-off-by: OrReuben <orreuven1243@gmail.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@OrReuben OrReuben merged commit 9a74736 into main-logzio Feb 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants