|
|
@ -158,13 +158,19 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bindDKey() { |
|
|
|
rebindDKey() { |
|
|
|
this.keybindingSrv.bind('d', this.onDKey.bind(this)); |
|
|
|
$(document).off('keydown.hasticDKey'); |
|
|
|
|
|
|
|
$(document).on('keydown.hasticDKey', (e) => { |
|
|
|
|
|
|
|
// 68 is 'd' key kode
|
|
|
|
|
|
|
|
if(e.keyCode === 68) { |
|
|
|
|
|
|
|
this.onDKey(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
editPanel() { |
|
|
|
editPanel() { |
|
|
|
super.editPanel(); |
|
|
|
super.editPanel(); |
|
|
|
this.bindDKey(); |
|
|
|
this.rebindDKey(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async getBackendURL(): Promise<string> { |
|
|
|
async getBackendURL(): Promise<string> { |
|
|
@ -244,7 +250,7 @@ class GraphCtrl extends MetricsPanelCtrl { |
|
|
|
|
|
|
|
|
|
|
|
this.analyticsController = new AnalyticController(this.panel, this.analyticService, this.events); |
|
|
|
this.analyticsController = new AnalyticController(this.panel, this.analyticService, this.events); |
|
|
|
|
|
|
|
|
|
|
|
this.bindDKey(); |
|
|
|
this.rebindDKey(); |
|
|
|
|
|
|
|
|
|
|
|
this.events.on('render', this.onRender.bind(this)); |
|
|
|
this.events.on('render', this.onRender.bind(this)); |
|
|
|
this.events.on('data-received', this.onDataReceived.bind(this)); |
|
|
|
this.events.on('data-received', this.onDataReceived.bind(this)); |
|
|
|