You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2023. It is now read-only.
When we render Jsonnet for adding panels to dashboards, we add a panel to a list. In Jsonnet, this makes it difficult to later interact with those dashboards.
There's a simple trick that can solve this: have the addPanel method add the panel to a hidden map, and add its name to a hidden field order list. Then, render the actual panel list from these with a simple for loop.
This way, the dashboard can later be amended by patching the panel map without the need for iteration as would be needed if it were a list.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When we render Jsonnet for adding panels to dashboards, we add a panel to a list. In Jsonnet, this makes it difficult to later interact with those dashboards.
There's a simple trick that can solve this: have the
addPanel
method add the panel to a hidden map, and add its name to a hidden field order list. Then, render the actual panel list from these with a simple for loop.This way, the dashboard can later be amended by patching the panel map without the need for iteration as would be needed if it were a list.
The text was updated successfully, but these errors were encountered: