React edit mode for angular panels progress

This commit is contained in:
Torkel Ödegaard
2018-11-16 08:31:29 +01:00
parent ad3e683739
commit dac02d3d73
6 changed files with 37 additions and 19 deletions

View File

@@ -5,7 +5,6 @@ import config from 'app/core/config';
import { PanelCtrl } from 'app/features/panel/panel_ctrl';
import { getExploreUrl } from 'app/core/utils/explore';
import { metricsTabDirective } from './metrics_tab';
import { applyPanelTimeOverrides, getResolution } from 'app/features/dashboard/utils/panel';
class MetricsPanelCtrl extends PanelCtrl {
@@ -42,7 +41,6 @@ class MetricsPanelCtrl extends PanelCtrl {
this.panel.datasource = this.panel.datasource || null;
this.events.on('refresh', this.onMetricsPanelRefresh.bind(this));
this.events.on('init-edit-mode', this.onInitMetricsPanelEditMode.bind(this));
this.events.on('panel-teardown', this.onPanelTearDown.bind(this));
}
@@ -53,11 +51,6 @@ class MetricsPanelCtrl extends PanelCtrl {
}
}
private onInitMetricsPanelEditMode() {
this.addEditorTab('Metrics', metricsTabDirective, 1, 'fa fa-database');
this.addEditorTab('Time range', 'public/app/features/panel/partials/panelTime.html');
}
private onMetricsPanelRefresh() {
// ignore fetching data if another panel is in fullscreen
if (this.otherPanelInFullscreenMode()) {

View File

@@ -12,8 +12,6 @@ import {
sharePanel as sharePanelUtil,
} from 'app/features/dashboard/utils/panel';
import { generalTab } from './GeneralTabCtrl';
import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, PANEL_HEADER_HEIGHT, PANEL_BORDER } from 'app/core/constants';
export class PanelCtrl {
@@ -93,7 +91,6 @@ export class PanelCtrl {
initEditMode() {
this.editorTabs = [];
this.addEditorTab('General', generalTab);
this.editModeInitiated = true;
this.events.emit('init-edit-mode', null);