grafana / worldmap-panel

Worldmap panel plugin for Grafana 3.0 that can be overlaid with circles for data points.
MIT License
309 stars 199 forks source link

Worldmap panel is not rendered in view mode when using json endpoint location data #220

Open xiaobeiyang opened 4 years ago

xiaobeiyang commented 4 years ago

Reproduce step:

  1. Setup a dashboard use worldmap panel.
  2. Set Location Data field to json endpoint.
  3. View panel.
  4. Refresh browser

Result: Can't see the dashboard. Note: I can reproduce this issue on Chrome & Edge & Safari. Can't reproduce on latest Firefox.

屏幕快照 2019-09-19 上午9 41 37

I think jsonp endpoint has the same behavior.

stevemandl commented 4 years ago

I think I am having the same issue. If the json endpoint takes longer to respond than the query, there are no map points rendered. I was able to get it to work when the query I was using took a long time to respond ( longer than the json location response), but when I optimized my query to run faster this behavior started. The workaround I am using is to hit the refresh button after the locations have had a chance to load.

amotl commented 4 years ago

Dear @xiaobeiyang and @stevemandl,

thanks for bringing this up. We might have improved this behavior already within our fork [1,2] through. Its most recent version can be installed side-by-side to Worldmap like outlined below.

Please feel free to get back to me if this doesn't help. I will be happy to open a case for looking into the issue within one of the next development iterations then.

With kind regards, Andreas.

[1] https://community.hiveeyes.org/t/grafana-map-panel-ng/1824 [2] https://github.com/panodata/grafana-map-panel


# Install most recent version side by side
grafana-cli \
  --pluginUrl https://packages.hiveeyes.org/grafana/grafana-map-panel/grafana-map-panel-0.7.0.zip \
  plugins install grafana-map-panel

# Restart Grafana to activate plugin
systemctl restart grafana-server
stevemandl commented 4 years ago

I tried this and it did not fix the problem. However, the fix in #221 does fix the problem.

amotl commented 4 years ago

Dear @stevemandl,

thanks for letting us know. We will consider integrating this update within one of the next development iterations on our fork [1].

With kind regards, Andreas.

[1] https://github.com/panodata/grafana-map-panel

xiaobeiyang commented 4 years ago

Dear @stevemandl @amotl Thanks for verification & confirmation.

amotl commented 4 years ago

Dear Steve,

If the json endpoint takes longer to respond than the query, there are no map points rendered.

Thanks again for clarifying the behavior you are observing. We are now also tracking this within https://github.com/panodata/grafana-map-panel/issues/53.

The fix in #221 does fix the problem.

As far as we can see, the essence of #221 is already integrated into the fork. However, there still might be dragons regarding timing/synchronicity.

With kind regards, Andreas.