diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts
index 062eea3506a..348e44fe6ce 100644
--- a/public/app/core/services/keybindingSrv.ts
+++ b/public/app/core/services/keybindingSrv.ts
@@ -72,8 +72,8 @@ export class KeybindingSrv {
}, 'keydown');
}
- showDashEditView(view) {
- var search = _.extend(this.$location.search(), {editview: view});
+ showDashEditView() {
+ var search = _.extend(this.$location.search(), {editview: 'settings'});
this.$location.search(search);
}
@@ -197,7 +197,7 @@ export class KeybindingSrv {
});
this.bind('d s', () => {
- this.showDashEditView('settings');
+ this.showDashEditView();
});
this.bind('d k', () => {
@@ -215,8 +215,14 @@ export class KeybindingSrv {
}
scope.appEvent('hide-modal');
- scope.appEvent('hide-dash-editor');
scope.appEvent('panel-change-view', {fullscreen: false, edit: false});
+
+ // close settings view
+ var search = this.$location.search();
+ if (search.editview) {
+ delete search.editview;
+ this.$location.search(search);
+ }
});
}
}
diff --git a/public/app/features/dashboard/dashnav/dashnav.ts b/public/app/features/dashboard/dashnav/dashnav.ts
index 2b174e2c301..9d8c0e149cc 100644
--- a/public/app/features/dashboard/dashnav/dashnav.ts
+++ b/public/app/features/dashboard/dashnav/dashnav.ts
@@ -32,15 +32,16 @@ export class DashNavCtrl {
}
}
- openEditView(editview) {
- var search = _.extend(this.$location.search(), {editview: editview});
+ openSettings() {
+ let search = this.$location.search();
+ if (search.editview) {
+ delete search.editview;
+ } else {
+ search.editview = 'settings';
+ }
this.$location.search(search);
}
- showHelpModal() {
- appEvents.emit('show-modal', {templateHtml: '