From 8ce1cc2d52d7d6a8aa1cf6807e2df981f264d7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 15 Nov 2018 17:33:55 +0100 Subject: [PATCH 1/2] fixed alert tab order and fixed some console logging issues --- public/app/core/services/dynamic_directive_srv.ts | 1 - public/app/core/services/keybindingSrv.ts | 4 ++-- public/app/plugins/panel/graph/module.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/app/core/services/dynamic_directive_srv.ts b/public/app/core/services/dynamic_directive_srv.ts index 9b7ede59853..c27842ab54f 100644 --- a/public/app/core/services/dynamic_directive_srv.ts +++ b/public/app/core/services/dynamic_directive_srv.ts @@ -21,7 +21,6 @@ class DynamicDirectiveSrv { } if (!directiveInfo.fn.registered) { - console.log('register panel tab'); coreModule.directive(attrs.$normalize(directiveInfo.name), directiveInfo.fn); directiveInfo.fn.registered = true; } diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 6fe57dfa77a..c02f6850e8b 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -32,8 +32,8 @@ export class KeybindingSrv { this.setupGlobal(); appEvents.on('show-modal', () => (this.modalOpen = true)); - $rootScope.onAppEvent('timepickerOpen', () => (this.timepickerOpen = true)); - $rootScope.onAppEvent('timepickerClosed', () => (this.timepickerOpen = false)); + appEvents.on('timepickerOpen', () => (this.timepickerOpen = true)); + appEvents.on('timepickerClosed', () => (this.timepickerOpen = false)); } setupGlobal() { diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index a6c5190d937..68bd242a39f 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -138,7 +138,7 @@ class GraphCtrl extends MetricsPanelCtrl { this.addEditorTab('Legend', 'public/app/plugins/panel/graph/tab_legend.html', 3); if (config.alertingEnabled) { - this.addEditorTab('Alert', alertTab, 5); + this.addEditorTab('Alert', alertTab, 6); } this.subTabIndex = 0; From 905ef220756a17f89ef75a2dd72c53dfb1ecff5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 16 Nov 2018 06:53:54 +0100 Subject: [PATCH 2/2] fixed order of time range tab --- public/app/plugins/panel/graph/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index 68bd242a39f..fc335e07545 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -133,12 +133,12 @@ class GraphCtrl extends MetricsPanelCtrl { } onInitEditMode() { - this.addEditorTab('Display', 'public/app/plugins/panel/graph/tab_display.html', 4); this.addEditorTab('Axes', axesEditorComponent, 2); this.addEditorTab('Legend', 'public/app/plugins/panel/graph/tab_legend.html', 3); + this.addEditorTab('Display', 'public/app/plugins/panel/graph/tab_display.html', 4); if (config.alertingEnabled) { - this.addEditorTab('Alert', alertTab, 6); + this.addEditorTab('Alert', alertTab, 5); } this.subTabIndex = 0;