marcuscalidus-svg-panel icon indicating copy to clipboard operation
marcuscalidus-svg-panel copied to clipboard

Trigger onInit in onHandleMetric and vice-versa ( or listener for dashboard host selection ), which one?

Open msilveirabr opened this issue 1 year ago • 0 comments

Is there any way to trigger "onInit" inside the "onHandleMetric" and vice-versa?

Why I need this?

I have a code that inits as many selected dashboard variable "switches", but, when I choose a different set of switches, I need to reload the page to force a new onInit.

Eg: Screenshot from 2023-03-03 22-40-17

Then I choose all units and the panel is not updated. Screenshot from 2023-03-03 22-41-14

Nothing works except entering edit mode then exit back to the dashboard or hitting F5 after changed selection.

Just wondering what the best approach is and if this should be handled directly by the plugin with some sort of listener for dashboard variable selection change...

I was hpoing to see this populated when I changed my "Edge Switch" selection: Screenshot from 2023-03-03 22-54-35

Any instructions on how to do this the best possible way is appreciated.

msilveirabr avatar Mar 04 '23 01:03 msilveirabr