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

Use generic interface{} instead of string for TemplateVar.templating.… #151

Merged
merged 1 commit into from
Jun 21, 2021

Conversation

hjet
Copy link
Contributor

@hjet hjet commented Jun 15, 2021

Use generic interface{} instead of string for TemplateVar.templating.list.query

The type appears to vary depending on the Datasource and I could not track down a schema defining this type.

Fixes #130 (the Board.panels unmarshal was fixed by #141)

…list.query

Return type varies depending on datasource
@hjet
Copy link
Contributor Author

hjet commented Jun 15, 2021

cc @grafov @GiedriusS

Copy link
Collaborator

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

I double-checked and it seems OK. This seems some kind of new change. Please also update https://github.com/grafana/grafana/blob/main/docs/sources/dashboards/json-model.md if you can since it is misleading 😄

@GiedriusS GiedriusS merged commit 90d3283 into grafana-tools:master Jun 21, 2021
@hjet hjet deleted the fix_unmarshal branch June 21, 2021 21:21
@hjet
Copy link
Contributor Author

hjet commented Jun 21, 2021

Thanks @GiedriusS! I'll make a PR to update that page.

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.

Cannot unmarshal object into Go struct
2 participants