Completly hide a panel/row from the grafana dashboard

Background:
We have a dashboard, where we are using the datasource --dashboard-- functionality of grafana with group by transformation to send the output of source panels to all other panels(Destination panels). We would like to hide the source panels from the dashboard and only the show the destination panels. We tried the rows colapse feature but it won’t hide the complete row from the dashboard.

Question:
Do we have a solution to completly hide the panels/row from the grafana dashboard?

Looking forward to your responses.

Thanks!!

2 Likes

Same problem here [from a non-expert user point of view]. Dashboard variables have the limitation of producing just lists of discrete values. For a resource-oriented dashboard, we need to query a couple of resources from a database as JSON objects and then parse and pick the properties for different panels. Having a hidden panel would conceivably provide a viable route (though as a somewhat of a workaround for not having variables of JSON type). We’d use the ‘Extract fields’ transform to pick & parse the JSON properties of interest for different panels.

Any better way to share partial queries or JSON objects as a source for different panels?

Good question. You can’t do this in a Dashboard that I know of, but there is something of a workaround / alternative though, which I would like to share. At Grafana we’ve been developing a new framework for building out Grafana App-plugins, called Scenes. The docs are here: Set up Scenes | Grafana Scenes

For me the power of scenes is:

  • You can build an app using all the components that are typically available in a dashboard:
    • Variables
    • Queries
    • Panels & Visualisation
    • Transforms
  • You assemble it together in Javascript / React, meaning you always have JS as an “escape hatch”, if you ever need to build out custom behaviour that isn’t possible in Dashboards yet.

Scenes has first-class support for the case you are describing here. Quoting a colleague:
“you can model it differently if u want to reuse data from a panel. add the queries to a wrapping scene object (i.e. layout object that creates data scope), and then you don’t need a dashboard data source”
“here’s transformations demo : scenes/packages/scenes-app/src/demos/transformations.tsx at main · grafana/scenes · GitHub
“the gist of it is that the queries are defined globally for a given scene scenes/packages/scenes-app/src/demos/transformations.tsx at main · grafana/scenes · GitHub, but down the path they are transformed when needed (scenes/packages/scenes-app/src/demos/transformations.tsx at main · grafana/scenes · GitHub)”

I used this and found it worked great. Scenes is super powerful, and worth checking out, even if you choose not to use it for your particular case this time around. Good luck!