LokiAnnotationsQueryCtrl.tsx 450 B

1234567891011121314151617
  1. /**
  2. * Just a simple wrapper for a react component that is actually implementing the query editor.
  3. */
  4. export class LokiAnnotationsQueryCtrl {
  5. static templateUrl = 'partials/annotations.editor.html';
  6. annotation: any;
  7. /** @ngInject */
  8. constructor() {
  9. this.annotation.target = this.annotation.target || {};
  10. this.onQueryChange = this.onQueryChange.bind(this);
  11. }
  12. onQueryChange(expr: string) {
  13. this.annotation.expr = expr;
  14. }
  15. }