diff --git a/public/app/features/panel/metrics_panel_ctrl.ts b/public/app/features/panel/metrics_panel_ctrl.ts index ce65d11b3a1..c7468216881 100644 --- a/public/app/features/panel/metrics_panel_ctrl.ts +++ b/public/app/features/panel/metrics_panel_ctrl.ts @@ -56,7 +56,7 @@ class MetricsPanelCtrl extends PanelCtrl { } private onInitMetricsPanelEditMode() { - this.addEditorTab('Time range', 'public/app/features/panel/partials/panelTime.html'); + // this.addCommonTab('Time range', 'public/app/features/panel/partials/panelTime.html'); } private onMetricsPanelRefresh() { diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index 82a4a116f89..fbef69bc42a 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -100,11 +100,12 @@ export class PanelCtrl { this.optionTabs = []; this.addCommonTab('Queries', metricsTabDirective, 0, 'fa fa-database'); this.addCommonTab('Visualization', vizTabDirective, 1, 'fa fa-line-chart'); - this.addCommonTab('General', 'public/app/partials/panelgeneral.html'); this.editModeInitiated = true; this.events.emit('init-edit-mode', null); + // this.addEditorTab('General', 'public/app/partials/panelgeneral.html'); + const urlTab = (this.$injector.get('$routeParams').tab || '').toLowerCase(); if (urlTab) { this.editorTabs.forEach((tab, i) => { diff --git a/public/app/features/panel/panel_editor_tab.ts b/public/app/features/panel/panel_editor_tab.ts index d16bab3dc55..f7e1c48a323 100644 --- a/public/app/features/panel/panel_editor_tab.ts +++ b/public/app/features/panel/panel_editor_tab.ts @@ -13,9 +13,8 @@ function panelEditorTab(dynamicDirectiveSrv) { }, directive: scope => { const pluginId = scope.ctrl.pluginId; - const tabName = scope.editorTab.title.toLowerCase(); + const tabName = scope.editorTab.title.toLowerCase().replace(' ', '-'); - console.log('panelEditorTab', pluginId, tabName); if (directiveCache[pluginId]) { if (directiveCache[pluginId][tabName]) { return directiveCache[pluginId][tabName]; diff --git a/public/app/features/panel/partials/metrics_tab.html b/public/app/features/panel/partials/metrics_tab.html index 0ee1f81b0c3..815a99d6b74 100644 --- a/public/app/features/panel/partials/metrics_tab.html +++ b/public/app/features/panel/partials/metrics_tab.html @@ -1,11 +1,7 @@
- - -
- -
-
-
-
{{tab.title}}
- -
-
-
-`; +
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
`; /** @ngInject */ export function vizTabDirective() { @@ -46,5 +70,4 @@ export function vizTabDirective() { } react2AngularDirective('vizTypePicker', VizTypePicker, ['currentType', ['onTypeChanged', { watchDepth: 'reference' }]]); - coreModule.directive('vizTab', vizTabDirective); diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index f0751ddd816..d9d67f11b6c 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -134,12 +134,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, 5); + this.addCommonTab('Alert', alertTab, 5); } this.subTabIndex = 0;