From 6ba3c4cbe0d97d4ce58e98c6552fa036dc73b3b0 Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Sat, 9 Feb 2019 16:43:03 +0300 Subject: [PATCH] small refactoring --- src/panel/graph_panel/data_processor.ts | 1 + src/panel/graph_panel/graph_ctrl.ts | 3 --- src/panel/graph_panel/graph_legend.ts | 5 ++--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/panel/graph_panel/data_processor.ts b/src/panel/graph_panel/data_processor.ts index d3ecb96..3948688 100644 --- a/src/panel/graph_panel/data_processor.ts +++ b/src/panel/graph_panel/data_processor.ts @@ -2,6 +2,7 @@ import _ from 'lodash'; import TimeSeries from './vendor/grafana/time_series2'; import colors from './vendor/grafana/colors'; + export class DataProcessor { constructor(private panel) {} diff --git a/src/panel/graph_panel/graph_ctrl.ts b/src/panel/graph_panel/graph_ctrl.ts index bc49799..642a9e1 100644 --- a/src/panel/graph_panel/graph_ctrl.ts +++ b/src/panel/graph_panel/graph_ctrl.ts @@ -18,11 +18,8 @@ import { MetricsPanelCtrl } from 'grafana/app/plugins/sdk'; import { appEvents } from 'grafana/app/core/core' import { BackendSrv } from 'grafana/app/core/services/backend_srv'; - import _ from 'lodash'; -const BACKEND_VARIABLE_NAME = 'HASTIC_SERVER_URL'; - class GraphCtrl extends MetricsPanelCtrl { static template = template; diff --git a/src/panel/graph_panel/graph_legend.ts b/src/panel/graph_panel/graph_legend.ts index 0685a56..b29dd2a 100644 --- a/src/panel/graph_panel/graph_legend.ts +++ b/src/panel/graph_panel/graph_legend.ts @@ -1,6 +1,5 @@ import PerfectScrollbar from 'perfect-scrollbar'; import _ from 'lodash'; -import 'jquery'; export class GraphLegend { @@ -34,7 +33,7 @@ export class GraphLegend { var el = $(e.currentTarget).find('.fa-minus'); var index = this.getSeriesIndexForElement(el); var series = this.seriesList[index]; - + this.popoverSrv.show({ element: el[0], position: 'bottom left', @@ -52,7 +51,7 @@ export class GraphLegend { }, }, }); - + } toggleSeries(e) {