Dashboard Navigation from GeoMap locations

I am trying to build a GeoMap panel with my customer’s locations visualized with one (or 2?) PKI.

And I trying to figure out if I can get a “click” on a location to navigate to a particular Dashboard, which will bring the user to the relevant data to investigate further.

Is this possible? Or do I need to fork+modify the GeoMap plugin?

2 Likes

@niclash, I am unsure if it’s possible to do with GeoMap. We recently did it with the Apache ECharts plugin. You can pick any example (Examples - Apache ECharts) to start with and modify to your needs in Grafana’s plugin.

Sorry for not responding. I have been busy with the ‘datasource’ side of things. Looked at your ECharts plugin and it can work very well for both this and another thing I have in mind. Thanks!

1 Like

Except… It seems that geo maps are not actually provided by ECharts, and one needs to use additional stuff (leaflet seems to be the thing). Using SVG maps are simply not good enough for us, since it might also be used to zoom down to actual map to inspect where things are located at the site.

I will probably fork your plugin and add OpenStreetMap support.

1 Like

@niclash ECharts plugins include World and USA maps (volkovlabs-echarts-panel/src/maps at main · VolkovLabs/volkovlabs-echarts-panel · GitHub) in JSON files, they are probably SVG, as you mentioned.

Leaflet extension for ECharts is old, OpenStreetMap may be an option. You are welcome to submit PR to share with the community if you make it work.

As I mentioned, the world map is SVG and simply not enough resolution nor details nor nor nor…

Other people has requested Open Street Map support in EChart are Superset, but seems to be wishful thinking beyond leaflet.

I am also digging in the official GeoMap plugin in grafana/grafana. Since there is a popup with the values of the query table row, it should be possible to get ‘click’ working in a similar way. So, checking that as well.

Fork and modify or create a feature request

Are there any guides to work on Grafana application codebase? For instance, Explanations on how certain advanced mechanism work, the architectural structure, how low-level components are supposed to be used, and so on?

Immediate question that popped up is; Can I even navigate to another Dashboard from a plugin? Do I really need to do my own REST calls, which I think need to be /api/search?type=dash-db to find a list, pick the url and then another call, or is there (I suspect so) an API to handle this more elegantly, maybe in an abstract/genericized form?

You can navigate, not from a plugin, but from a dashboard to another one.

For codebase analysis, you can clone grafana locally from github

I have been hacking at the Grafana codebase for a few years and have my own slight variation and build my own .deb package out of it.

You can navigate, not from a plugin, but from a dashboard to another one.

I can not make sense out of that statement. All components on a Dashboard are panels with plugins driving the content of the panel.
Investigated the “DashList Panel Plugin”, and it seems that because it is part of grafana/grafana it has access to app/features/dashboard/services/DashboardSrv which external plugins don’t (IIUIC).
And it seems to do the same/similar “work” as the built-in functionality elsewhere, so I think that answers the general question; Plugins are expected to do the work against the Rest API rather than any comprehensive library support.

1 Like