File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33## development
4+ - Add compatibility with Grafana 8
45
56- Add Makefile to assist in packaging and publishing
67- Overlay image can now be refreshed with the dashboard. Thanks, @jreyesr !
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ The easiest way to invoke a development sandbox is by using Docker.
1515``` shell
1616# Run with Grafana 7
1717docker run --publish=3000:3000 --volume=$PWD /dist:/var/lib/grafana/plugins/grafana-map-panel grafana/grafana:7.5.7
18+
19+ # Run with Grafana 8
20+ docker run --publish=3000:3000 --volume=$PWD /dist:/var/lib/grafana/plugins/grafana-map-panel --env=GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=grafana-map-panel grafana/grafana:8.0.0
1821```
1922
2023Because the version of ` node-sass ` used as transitive dependency is apparently
Original file line number Diff line number Diff line change @@ -62,11 +62,19 @@ export class WorldmapChrome {
6262 * - https://github.com/daq-tools/grafanimate/blob/0.5.5/grafanimate/grafana-studio.js
6363 *
6464 */
65- this . getKeybindingSrv ( ) . unbind ( 'esc' , 'keydown' ) ;
65+ try {
66+ this . getKeybindingSrv ( ) . unbind ( 'esc' , 'keydown' ) ;
67+ } catch ( err ) {
68+ console . error ( `Accessing KeybindingSrv not implemented for Grafana 8 yet.\n${ err } ` ) ;
69+ }
6670 }
6771
6872 restoreEscapeKeyBinding ( ) {
69- this . getKeybindingSrv ( ) . setupGlobal ( ) ;
73+ try {
74+ this . getKeybindingSrv ( ) . setupGlobal ( ) ;
75+ } catch ( err ) {
76+ console . error ( `Accessing KeybindingSrv not implemented for Grafana 8 yet.\n${ err } ` ) ;
77+ }
7078 }
7179
7280 getKeybindingSrv ( ) {
Original file line number Diff line number Diff line change @@ -298,8 +298,10 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
298298 this . panel . snapshotLocationData = this . locations ;
299299 }
300300
301+ console . info ( 'Processing data' ) ;
301302 this . processData ( dataList ) ;
302303
304+ console . info ( 'Updating color mode' ) ;
303305 this . updateColorMode ( ) ;
304306
305307 const autoCenterMap =
@@ -504,6 +506,8 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
504506
505507 resetData ( ) {
506508 this . data = [ ] ;
509+ this . data . categories = [ ] ;
510+ this . data . thresholds = [ ] ;
507511 //this.mapCenterMoved = true;
508512 }
509513
You can’t perform that action at this time.
0 commit comments