mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements - Introduces dynamic imports for built-in plugins - Uses dynamic imports for various packages (rst2html, brace) - Introduces route-based dynamic imports - Splits angular and moment into separate bundles
26 lines
767 B
TypeScript
26 lines
767 B
TypeScript
import { QueryCtrl } from 'app/plugins/sdk';
|
|
import { StackdriverQuery } from './types';
|
|
import { TemplateSrv } from 'app/features/templating/template_srv';
|
|
import { auto } from 'angular';
|
|
|
|
export class StackdriverQueryCtrl extends QueryCtrl {
|
|
static templateUrl = 'partials/query.editor.html';
|
|
templateSrv: TemplateSrv;
|
|
|
|
/** @ngInject */
|
|
constructor($scope: any, $injector: auto.IInjectorService, templateSrv: TemplateSrv) {
|
|
super($scope, $injector);
|
|
this.templateSrv = templateSrv;
|
|
this.onQueryChange = this.onQueryChange.bind(this);
|
|
this.onExecuteQuery = this.onExecuteQuery.bind(this);
|
|
}
|
|
|
|
onQueryChange(target: StackdriverQuery) {
|
|
Object.assign(this.target, target);
|
|
}
|
|
|
|
onExecuteQuery() {
|
|
this.$scope.ctrl.refresh();
|
|
}
|
|
}
|