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 1
1
# Changelog
2
2
3
3
## development
4
+ - Add compatibility with Grafana 8
4
5
5
6
- Add Makefile to assist in packaging and publishing
6
7
- 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.
15
15
``` shell
16
16
# Run with Grafana 7
17
17
docker 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
18
21
```
19
22
20
23
Because 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 {
62
62
* - https://github.com/daq-tools/grafanimate/blob/0.5.5/grafanimate/grafana-studio.js
63
63
*
64
64
*/
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
+ }
66
70
}
67
71
68
72
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
+ }
70
78
}
71
79
72
80
getKeybindingSrv ( ) {
Original file line number Diff line number Diff line change @@ -298,8 +298,10 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
298
298
this . panel . snapshotLocationData = this . locations ;
299
299
}
300
300
301
+ console . info ( 'Processing data' ) ;
301
302
this . processData ( dataList ) ;
302
303
304
+ console . info ( 'Updating color mode' ) ;
303
305
this . updateColorMode ( ) ;
304
306
305
307
const autoCenterMap =
@@ -504,6 +506,8 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
504
506
505
507
resetData ( ) {
506
508
this . data = [ ] ;
509
+ this . data . categories = [ ] ;
510
+ this . data . thresholds = [ ] ;
507
511
//this.mapCenterMoved = true;
508
512
}
509
513
You can’t perform that action at this time.
0 commit comments