Hey,
I build several dashboards where each dashboard shows similar graphs based on different data. So the code (flux) for each graph/panel is the same, I only change some configuration variables I define on top of the code (queries). Currently, I define the same functions to compute the graphs in every panel, so if I find a mistake in one panel, I have to copy the updated code to all other panels.
It would be quite nice if somehow I could define my functions once and then use them in all panels (at least all panels in the dashboard would be nice), this code duplication is painful.
It seems I cannot define variables that contain code. I can define shared panels and probably drive these through variables defined in the dashboard to configure things but then I cannot use the same panel (with different config) in the same dashboard as variables are per dashboard and I have some lambda functions defined on the config which I am not sure I can even store in a dashboard variable.
I am pretty sure I do no want to start developing a plugin, I really just want to share some code between different panels.
Any pointers would be greatly appreciated.