knightss27 / grafana-network-weathermap

A fully featured and customizable network weathermap plugin for Grafana (9.0+).
https://grafana.com/grafana/plugins/knightss27-weathermap-panel/
Apache License 2.0
139 stars 7 forks source link

Javascript TypeError: "r.startsWith is not a function" #3

Closed bodothebest closed 2 years ago

bodothebest commented 2 years ago

Hi, I'm trying this plugin on my own Grafana install. I installed it via CLI, directly unzipping the latest release into the plugins dir and enabling the "allow unsigned" option in the config file. Now I am able to create an empty weathermap and add some nodes to it, but whenever i click on the dropdown lists "Nodes" or "Links" in the right column I get this error

An unexpected error happened TypeError: r.startsWith is not a function

and a long list of paths of .js files follows. This does not happen if the dropdown lists are empty, but as soon as there is an element (usually the default "Test Label") the error occurs and I get stuck until I refresh the page and lose all the changes.

I don't think this is a bug strictly of this plugin, it seems to me that it is something in Grafana that this plugin triggers, but it never happened to me before, so I ask here if someone else noticed this behaviour.

My Grafana is version 8.3.6 and Grafana-Network-Weathermap is version 0.0.9

Thank you

Marco

knightss27 commented 2 years ago

Hi Marco!

Yes this is something I've been aware of and am hoping to fix soon. You're correct in that it is an issue with something Grafana changed between the version I was originally developing on (8.1) and the 8.3 version.

Unfortunately it isn't super clear to me what it is that causes this error, as I can confirm it is reproducible for me when using the dropdown components, but I haven't yet identified how I might be using them differently from what Grafana suggests, and am not exactly sure what version it was that broke it. I'm hoping to do some more testing this weekend to track it down, so I'll reply here with what I can find, and thanks for this issue!

knightss27 commented 2 years ago

@bodothebest Looks to me to be fixed, you should be able to use the latest release (0.1.0) now.

Cheers, Seth

bodothebest commented 2 years ago

Now it works, great job! I will follow the development of this plugin with great interest, thank you.