-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
Explore: Add range option to internal data links #64063
Conversation
sounds reasonable to me 👍 |
@@ -451,7 +451,7 @@ export const getLinksSupplier = | |||
internalLink: link.internal, | |||
scopedVars: variables, | |||
field, | |||
range: {} as any, | |||
range: link.internal.range ?? ({} as any), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the same range as in the panel? If yes, could we pass the range from PanelQueryRunner
? e.g.:
series: applyFieldOverrides({
+ timeRange: data.timeRange,
timeZone: data.request?.timezone ?? 'browser',
data: processedData.series,
...fieldConfig!,
}),
And later pass the range to getLinksSupplier
.
This way it could work for any data link, without a need to pass the range in the config. Not sure if that would work for your use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is the same time range although the plugin uses the PanelRenderer
which calls useFieldOverrides
and doesn't run PanelQueryRunner
, so I don't think that'd work for our situation. Maybe scenes will fix this out of the box.
What is this feature?
Adds an optional range to internal data links and uses it in field overrides if present.
Why do we need this feature?
The app o11y plugin links from a dashboard in the plugin to logs in Explore and needs a way to keep the time range the same. This will let us add the time range to the internal link config like so:
Relates to https://github.com/grafana/app-o11y-kwl/issues/174