Skip to content

feat: (sceneQueryRunner) - allow manual timerange override, pass props to useQueryRunner #1098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

L2D2Grafana
Copy link
Contributor

POC💡 original thread

  • Allow timeRange prop to override
  • Expose props to scenes-react

@@ -75,6 +75,8 @@ export interface QueryRunnerState extends SceneObjectState {
dataLayerFilter?: DataLayerFilter;
// Private runtime state
_hasFetchedData?: boolean;
// Optional timeRange to use instead of sceneGraph timeRange
timeRange?: SceneTimeRangeLike;
Copy link
Member

Choose a reason for hiding this comment

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

not sure this makes sense, all scene objects can already have local time range via $timeRange

Comment on lines +14 to +16
// Optional timeRange to use instead of sceneGraph timeRange
runQueriesMode?: 'auto' | 'manual';
timeRange?: SceneTimeRangeLike;
Copy link
Member

Choose a reason for hiding this comment

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

  1. the comment is on the wrong prop
  2. Feels like passing a SceneTimeRangeLike is wrong here vs a plain TimeRange prop. Also would need to add diffing so when prop changes query is executed (when runQueriesMode is auto)
  3. VizPanel uses sceneGraph.getTimeRange as well to change time range, for zoom in on graphs so that will not work with this approach.

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.

2 participants