AngularPanels: Fixes issue with angular panels caused by reason babel upgrade (#32738)

This commit is contained in:
Torkel Ödegaard 2021-04-07 09:34:30 +02:00 committed by GitHub
parent fbabed203f
commit 2c8728a2a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

@ -19,9 +19,7 @@ import { PanelModel } from 'app/features/dashboard/state';
import { PanelQueryRunner } from '../query/state/PanelQueryRunner'; import { PanelQueryRunner } from '../query/state/PanelQueryRunner';
class MetricsPanelCtrl extends PanelCtrl { class MetricsPanelCtrl extends PanelCtrl {
scope: any;
datasource: DataSourceApi; datasource: DataSourceApi;
$timeout: any;
contextSrv: ContextSrv; contextSrv: ContextSrv;
datasourceSrv: any; datasourceSrv: any;
timeSrv: any; timeSrv: any;
@ -44,7 +42,6 @@ class MetricsPanelCtrl extends PanelCtrl {
this.datasourceSrv = $injector.get('datasourceSrv'); this.datasourceSrv = $injector.get('datasourceSrv');
this.timeSrv = $injector.get('timeSrv'); this.timeSrv = $injector.get('timeSrv');
this.templateSrv = $injector.get('templateSrv'); this.templateSrv = $injector.get('templateSrv');
this.scope = $scope;
this.panel.datasource = this.panel.datasource || null; this.panel.datasource = this.panel.datasource || null;
this.events.on(PanelEvents.refresh, this.onMetricsPanelRefresh.bind(this)); this.events.on(PanelEvents.refresh, this.onMetricsPanelRefresh.bind(this));

View File

@ -51,13 +51,10 @@ class SingleStatCtrl extends MetricsPanelCtrl {
static templateUrl = 'module.html'; static templateUrl = 'module.html';
data: Partial<ShowData> = {}; data: Partial<ShowData> = {};
fontSizes: any[] = []; fontSizes: any[] = [];
fieldNames: string[] = []; fieldNames: string[] = [];
invalidGaugeRange = false; invalidGaugeRange = false;
panel: any;
events: any;
valueNameOptions: any[] = [ valueNameOptions: any[] = [
{ value: 'min', text: 'Min' }, { value: 'min', text: 'Min' },
{ value: 'max', text: 'Max' }, { value: 'max', text: 'Max' },