grafana/public/app/plugins/datasource/cloud-monitoring/annotations_query_ctrl.ts
kay delaney 185442115c
Chore: Remove angular dependency from data sources (#27735)
* Chore: Remove angular dependency from data sources

* Removes default export for time and template srvs
Also uses @grafana/runtime versions of the interfaces where possible

* Replace usage of internal templateSrv where possible

* Use runtime templateSrv in a couple more places
2020-10-01 18:51:23 +01:00

16 lines
414 B
TypeScript

import { AnnotationTarget } from './types';
export class CloudMonitoringAnnotationsQueryCtrl {
static templateUrl = 'partials/annotations.editor.html';
annotation: any;
constructor() {
this.annotation.target = this.annotation.target || {};
this.onQueryChange = this.onQueryChange.bind(this);
}
onQueryChange(target: AnnotationTarget) {
Object.assign(this.annotation.target, target);
}
}