Hide grafana panels based on selected template variable
Asked Answered
A

1

11

I am trying to develop kind of dropdown list with metrics and accordingly to selected metric specific panel supposed to appear on dashboard. And vice versa if metric unselected, panel should be hidden.
I found the link http://search-devops.com/m/k2DBF2DCJuDrRWa1&subj=Re+grafana+Hide+panels+based+on+results where 2015-10-26 it was told that it is not possible to do.
But maybe some functionality was developed until that time which allow to show/hide grafana panel?

Amberjack answered 31/8, 2016 at 18:54 Comment(1)
This is not applicable for a graph, but a table panel can be almost invisible when there is no data (this is my use case, which is close to this question): 1. set panel as transparent; 2. set no panel title; 3. add a HTML text panel with <style type="text/css">.datapoints-warning {visibility:hidden;}</style> (at least for a old table table panel, not sure with new React table panel).Bacteriostasis
A
4

Need to use Repeat Panel option for graph https://github.com/grafana/grafana/issues/1888 and configure a variable in templating options http://docs.grafana.org/reference/templating/#utilizing-template-variables-with-repeating-panels-and-repeating-rows

Amberjack answered 31/8, 2016 at 20:49 Comment(1)
It doesn't work. See the note on Grafana doc - Repeat panels or rows: "Note: Repeating panels require variables to have one or more items selected; you cannot repeat a panel zero times to hide it."Bacteriostasis

© 2022 - 2024 — McMap. All rights reserved.