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

"Template variable Service failed" on empty Kusto queries #134

Open
mcmon-dev opened this issue Nov 24, 2020 · 1 comment
Open

"Template variable Service failed" on empty Kusto queries #134

mcmon-dev opened this issue Nov 24, 2020 · 1 comment

Comments

@mcmon-dev
Copy link

mcmon-dev commented Nov 24, 2020

Steps to reproduce the bug

  1. Create a new panel with Azure Monitor as data source
  2. Create a new query where Service is set to Azure Log Analytics
  3. Write a Kusto query where valid results are returned
  4. Add another Kusto query where no results are returned

Resulting and expected behaviour
As a result I get the following error message. It is popping up on every refresh of the panel.
image

The expected behaviour would be to not have this error message. It would also be convenient to have an option to either show the label name in the legend or hide labels with no data.

System information

  • Grafana: v7.3.1
  • Discrete Panel: 0.1.0
@mcmon-dev
Copy link
Author

I managed to fix this problem by changing line 360 in src/module.ts from if (time) { to if (time && frame.length > 0) {. frame.length > 0 filters out all frames which don't contain values.

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

No branches or pull requests

1 participant