ACE-IoT-Solutions / ace-svg-react

Grafana SVG Rendering Panel using the 7+ Plugin Framework
https://grafana.com/grafana/plugins/aceiot-svg-panel/
MIT License
40 stars 14 forks source link

Support the Field, Override tabs #15

Closed jkmnt closed 3 years ago

jkmnt commented 3 years ago

I'm using the plugin to render live P&ID diagram. So far so good, the code-based approach is great !

The stock grafana panels allows to assign attibutes to metrics via Field and Override tabs (names, colors, thresholds, units etc).

My code in User JS Render section wants to use the enhanced dataframe with the attibutes assigned, but it can't, since the ace-svg lacks these tabs and there is no user-friendly way to manipulate the attributes.

Adding these tabs to the plugin should break nothing and bring some benefits.

Please consider composing plugin like this (adding .useFieldConfig):

export const plugin = new PanelPlugin<ACESVGOptions>(ACESVGPanel).useFieldConfig({ useCustomConfig: (builder) => builder .addBooleanSwitch({}) .addCustomEditor({}) ... )}

acedrew commented 3 years ago

We'd love a pull request :) If this is as simple as it looks we'll get it in the next version, we need to get a signed version in the registry anyway.