Browse Source

small refactoring

master
Coin de Gamma 5 years ago
parent
commit
6ba3c4cbe0
  1. 1
      src/panel/graph_panel/data_processor.ts
  2. 3
      src/panel/graph_panel/graph_ctrl.ts
  3. 5
      src/panel/graph_panel/graph_legend.ts

1
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) {}

3
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;

5
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) {

Loading…
Cancel
Save