mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
azuremonitor: don't go back to dashboard if escape pressed in the editor
This commit is contained in:
@@ -139,6 +139,10 @@ export class KeybindingSrv {
|
||||
);
|
||||
}
|
||||
|
||||
unbind(keyArg: string, keyType?: string) {
|
||||
Mousetrap.unbind(keyArg, keyType);
|
||||
}
|
||||
|
||||
showDashEditView() {
|
||||
const search = _.extend(this.$location.search(), { editview: 'settings' });
|
||||
this.$location.search(search);
|
||||
@@ -293,3 +297,17 @@ export class KeybindingSrv {
|
||||
}
|
||||
|
||||
coreModule.service('keybindingSrv', KeybindingSrv);
|
||||
|
||||
/**
|
||||
* Code below exports the service to react components
|
||||
*/
|
||||
|
||||
let singletonInstance: KeybindingSrv;
|
||||
|
||||
export function setKeybindingSrv(instance: KeybindingSrv) {
|
||||
singletonInstance = instance;
|
||||
}
|
||||
|
||||
export function getKeybindingSrv(): KeybindingSrv {
|
||||
return singletonInstance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user