I have modified an existing panel plugin (Boom table) so that it can read a configuration file, and update patterns and thresholds with data from that file.
Now I would like to also update the Data Source queries and aliases to match the patterns. I am using InfluxDB. I have managed to, from my modified panel plugin, fill in the correct queries and aliases, but the problem is that I cannot manage to “apply” the alias. The query string I can apply by just making a select command from the typescript code, but this does not work on the alias input.
I am doing this by reading all input fields with document.getElementsByClassName(“gf-form-input”). From the array with HTMLInputElements that is returned, I have figured out which inputs that are queries and aliases and updated it by setting the value. I have tried both setting it with input.value = “” and input.setAttribute(‘value’, ).
Apart from “select”, I have also tried various other commands, like: “click”, “focus” and “blur”. I can see that the correct text is filled in to the correct input box, but the table with the data above is not updated. If I manually change a character it applies and the table is updated correctly. Does anyone have any idea how I could make this work? It feels like I am very close to achieve what I need, it’s just the last piece that is missing. It would be very nice if I can use the standard InfluxDB Data Source plugin and only modify the panel plugin.