Types: Adds type safety to appEvents (#19418)

* Types: Add type safety to appEvents
This commit is contained in:
kay delaney
2019-10-14 09:27:47 +01:00
committed by GitHub
parent e7c37cc316
commit 99411bf37a
138 changed files with 991 additions and 508 deletions

View File

@@ -8,6 +8,7 @@ import kbn from 'app/core/utils/kbn';
import { TemplateSrv } from 'app/features/templating/template_srv';
import { auto, IPromise } from 'angular';
import { DataFrame } from '@grafana/data';
import { PanelEvents } from '@grafana/ui';
export interface ResultFormat {
text: string;
@@ -136,8 +137,8 @@ export class AzureMonitorQueryCtrl extends QueryCtrl {
this.migrateApplicationInsightsKeys();
this.panelCtrl.events.on('data-received', this.onDataReceived.bind(this), $scope);
this.panelCtrl.events.on('data-error', this.onDataError.bind(this), $scope);
this.panelCtrl.events.on(PanelEvents.dataReceived, this.onDataReceived.bind(this), $scope);
this.panelCtrl.events.on(PanelEvents.dataError, this.onDataError.bind(this), $scope);
this.resultFormats = [{ text: 'Time series', value: 'time_series' }, { text: 'Table', value: 'table' }];
this.getSubscriptions();
if (this.target.queryType === 'Azure Log Analytics') {