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: ''}); - } - starDashboard() { this.dashboardSrv.starDashboard(this.dashboard.id, this.dashboard.meta.isStarred) .then(newState => { diff --git a/public/app/features/dashboard/partials/settings.html b/public/app/features/dashboard/partials/settings.html index 6a8f4792f72..6d141e1319a 100644 --- a/public/app/features/dashboard/partials/settings.html +++ b/public/app/features/dashboard/partials/settings.html @@ -1,96 +1,67 @@ -
-

- Settings -

+

General

- +
+
+ + +
+
+ + +
+
+ + + +
- + +
-
-
- -
-
Details
-
- - +
+
Options
+
+
+ +
+
-
- - -
-
- - - -
- - -
- -
-
Options
-
-
- -
- -
-
- - - - -
-
- -
-
Panel Options
-
- -
- -
-
-
+ + + +
- -
- -
- -
- -
-
+ +
+
Panel Options
+
+ +
+ +
+
+
+ + + + + + + + + + diff --git a/public/app/features/dashboard/settings/settings.html b/public/app/features/dashboard/settings/settings.html index 81508c6ec68..ba30a1697cc 100644 --- a/public/app/features/dashboard/settings/settings.html +++ b/public/app/features/dashboard/settings/settings.html @@ -1,6 +1,5 @@ - -
-