annotations_query_ctrl.ts 510 B

123456789101112131415161718
  1. import { TemplateSrv } from 'app/features/templating/template_srv';
  2. export class StackdriverAnnotationsQueryCtrl {
  3. static templateUrl = 'partials/annotations.editor.html';
  4. annotation: any;
  5. templateSrv: TemplateSrv;
  6. /** @ngInject */
  7. constructor(templateSrv) {
  8. this.templateSrv = templateSrv;
  9. this.annotation.target = this.annotation.target || {};
  10. this.onQueryChange = this.onQueryChange.bind(this);
  11. }
  12. onQueryChange(target) {
  13. Object.assign(this.annotation.target, target);
  14. }
  15. }