Skip to content
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

sceneGraph: handle interpolations argument in interpolate #708

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

sd2k
Copy link
Contributor

@sd2k sd2k commented Apr 26, 2024

This adds the same functionality as is present in Grafana's TemplateSrv,
allowing users to pass an array as the fifth argument to interpolate and
have it populated with VariableInterpolations indicating whether the
variable was found and containing some details about the match.

This adds the same functionality as is present in Grafana's `TemplateSrv`,
allowing users to pass an array as the fifth argument to `interpolate` and
have it populated with `VariableInterpolation`s indicating whether the
variable was found and containing some details about the match.
sd2k added a commit to grafana/grafana that referenced this pull request Apr 26, 2024
TemplateSrv.replace takes an optional 'interpolations' argument which
records information about the variables which were found during the
interpolation. Until [this Scenes PR][scenes PR] this wasn't supported
by Scenes so the interpolations argument was being ignored if dashboard
scenes were enabled. This commit updates the scenes version and passes
the interpolations array along.

[scenes PR]: grafana/scenes#708
@sd2k sd2k requested a review from torkelo April 26, 2024 11:40
@torkelo torkelo added minor Increment the minor version when merged release Create a release when this pr is merged labels Apr 26, 2024
@sd2k sd2k merged commit 2fa006b into main Apr 26, 2024
3 checks passed
@sd2k sd2k deleted the variable-interpolator-interpolations-arg branch April 26, 2024 12:46
@grafanabot
Copy link
Contributor

🚀 PR was released in v4.13.0 🚀

sd2k added a commit to grafana/grafana that referenced this pull request Apr 26, 2024
TemplateSrv.replace takes an optional 'interpolations' argument which
records information about the variables which were found during the
interpolation. Until [this Scenes PR][scenes PR] this wasn't supported
by Scenes so the interpolations argument was being ignored if dashboard
scenes were enabled. This commit bumps the scenes version and passes
the interpolations array along to the scenes function.

[scenes PR]: grafana/scenes#708
sd2k added a commit to grafana/grafana that referenced this pull request Apr 26, 2024
TemplateSrv.replace takes an optional 'interpolations' argument which
records information about the variables which were found during the
interpolation. Until [this Scenes PR][scenes PR] this wasn't supported
by Scenes so the interpolations argument was being ignored if dashboard
scenes were enabled. This commit bumps the scenes version and passes
the interpolations array along to the scenes function.

[scenes PR]: grafana/scenes#708
sd2k added a commit to grafana/grafana that referenced this pull request Apr 26, 2024
TemplateSrv.replace takes an optional 'interpolations' argument which
records information about the variables which were found during the
interpolation. Until [this Scenes PR][scenes PR] this wasn't supported
by Scenes so the interpolations argument was being ignored if dashboard
scenes were enabled. This commit bumps the scenes version and passes
the interpolations array along to the scenes function.

[scenes PR]: grafana/scenes#708
sd2k added a commit to grafana/grafana that referenced this pull request Apr 26, 2024
TemplateSrv.replace takes an optional 'interpolations' argument which
records information about the variables which were found during the
interpolation. Until [this Scenes PR][scenes PR] this wasn't supported
by Scenes so the interpolations argument was being ignored if dashboard
scenes were enabled. This commit bumps the scenes version and passes
the interpolations array along to the scenes function.

[scenes PR]: grafana/scenes#708
sd2k added a commit to grafana/grafana that referenced this pull request Apr 26, 2024
TemplateSrv.replace takes an optional 'interpolations' argument which
records information about the variables which were found during the
interpolation. Until [this Scenes PR][scenes PR] this wasn't supported
by Scenes so the interpolations argument was being ignored if dashboard
scenes were enabled. This commit bumps the scenes version and passes
the interpolations array along to the scenes function.

[scenes PR]: grafana/scenes#708
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants