andymchugh / andrewbmchugh-flow-panel

Apache License 2.0
34 stars 2 forks source link

Feature Request: Variables and concatenation in Site and Panel config #49

Closed micaelgg closed 3 months ago

micaelgg commented 4 months ago

An example of use. Define a base URL in SiteConfig and be able to use it as a variable in Panel Config. Concatenating this variable with its own string for each cell.

It's just an idea. Your plugin is great :)

xkilian commented 4 months ago

We would also see a lot of value in a generic way to reference variables to build the URLs. Ex. Add name of the metric in a cell or name of the cell as a variable to a URL. This way If you have ten diffrent cells pointing to the same dashboard which accepts an input variable, we no longer need to define a unique URL for each cell. Something like $cell.name.

andymchugh commented 4 months ago

ok, will have a think.

andymchugh commented 3 months ago

I've added linkVariables to the siteConfig and panelConfig, so you can now do simple token substitution in link urls. This will be in the next build. I haven't added any special tokens though such as cell name as I'm assuming that can be the specific part.

Say if you have a usecase you think isn't supported by this.

example use

xkilian commented 3 months ago

This is a nice addition, but does not help for $cell.dataRef (or at minimum $dataRef of the current cell) use case, which is 99% of my URLs of which I may have 60 to 120 per page. ugh. Where $cell.dataRef is the name of the metric I am interested in.

andymchugh commented 3 months ago

ok, have added ${cell.name} and ${cell.dataRef} as reserved tokens that will also be substituted in urls. That should improve it's usability.

Say if you think anything still remains in this issue.

xkilian commented 3 months ago

No, this should meet all my requirements.

xkilian commented 3 months ago

The only improvement would be on the usability side, support crtl-space, which opens a modal and shows the available variables, but I think that is a bit orthogonal to this here as it concerns more dashboard variables and panel variables. Very useful when building data-links. I can open a different issue to discuss it and explore. I believe this issue can be closed. Thank you for all the hard work you have put in, we now have an real viable alternative(even better) to Flowcharting and Canvas.

andymchugh commented 3 months ago

published in version 1.14.0

micaelgg commented 3 months ago

Thank you so much <3