grafana icon indicating copy to clipboard operation
grafana copied to clipboard

Geomap: Add dynamic initial view options

Open drew08t opened this issue 2 years ago • 11 comments

What this PR does / why we need it: For dynamic data that changes, setting up map view to "fit data layers" does not update upon data change. As an extension to this support, minimum control options should also be included:

  • [x] - Max zoom
  • [x] - Padding (%)
  • [x] - Last data point only (boolean)
  • [x] - Handle single layer bug

After: Aug-31-2022 13-06-22

Closes #40496

drew08t avatar Aug 30 '22 00:08 drew08t

Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/31533

grafanabot avatar Aug 30 '22 00:08 grafanabot

Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/31777

grafanabot avatar Aug 31 '22 16:08 grafanabot

Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/31795

grafanabot avatar Aug 31 '22 17:08 grafanabot

Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/32161

grafanabot avatar Sep 02 '22 18:09 grafanabot

New options controls for data fit:

  1. All layers: all data from all layers
  2. Layer: all data from a selected layer
  3. Last value: last data point from a selected layer

Sep-14-2022 09-46-28

drew08t avatar Sep 14 '22 16:09 drew08t

Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/33866

grafanabot avatar Sep 16 '22 17:09 grafanabot

Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/34084

grafanabot avatar Sep 20 '22 03:09 grafanabot

Looked this over with Ryan and came to following conclusions: For now heat map is a little hard to address given the nature of how heat map works, for now we can push this off

As for re-initializing view on layer type change, we can also hold off on that as well. Also, we probably will want to do some exploration for how initial view actually works (whether or not local storage is utilized) etc.

Streaming was a local issue -> It appears the live-service-web-worker feature flag seems to break streaming right now (current solution is to just disable / remove this feature flag and streaming works as expected)

nmarrs avatar Sep 20 '22 23:09 nmarrs

Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/34339

grafanabot avatar Sep 21 '22 01:09 grafanabot

This is looking good to me as a first implementation of this feature - I did make a number of refactors so it might be good if @drew08t / @ryantxu look them over to ensure I didn't miss something / test things locally to verify before merging in 👍

Streaming even works :)

Fit.data.streaming.demo.mov

That streaming video is awesome!

drew08t avatar Sep 21 '22 19:09 drew08t

Refactoring and clean-up LGTM! Tested locally and works as expected!

drew08t avatar Sep 21 '22 19:09 drew08t