I’m trying to create 2 customs panels for a dashboard. The first panel will list a sub-section of previously defined library panels. It may just be a collection of buttons with each button referring to a specific library panel. The second panel will be populated by the panel selected in the first plugin. I want to be able to quickly display a panel after a user selects the panel from the list.
I tried something similar to using iFrames and having the second panel load an iFrame while having the first panel select the target of the iFrame. The iFrame value was set to something like “/d-solo//?panelId=1”. With this method I was able to load the second panel with whatever panel I set the iFrame value to but it seemed quite slow. It generally took ~1-2 seconds to load the page then some more times to finish the queries to populate the panel.
Another method I tried using was to utilize the “MetricsPanelCtrl” object. From there I found access to method called “updatePanels” which does what I want it to do. With this method I can provide the library panel data from the API (with some modification to what is returned from the API). Using that method I was able to load library panels quickly. Although this method is marked at internal and experimental, and I can only access through the deprecated grafana-sdk-mocks interface. Using this tool doesn’t sound like the correct solution.
Is there a solution that can be done by creating 1 or 2 custom Grafana plugins? Or some other method within Grafana I’m not familiar with?