2018-09-07 23:18:15 +08:00
|
|
|
import _ from 'lodash';
|
2018-09-04 19:21:02 +08:00
|
|
|
import { QueryCtrl } from 'app/plugins/sdk';
|
2018-09-27 20:22:20 +08:00
|
|
|
import './query_filter_ctrl';
|
2018-12-13 23:40:14 +08:00
|
|
|
import { registerAngularDirectives } from './angular_wrappers';
|
2018-12-22 06:07:46 +08:00
|
|
|
import { Target } from './types';
|
2018-09-14 07:49:39 +08:00
|
|
|
|
2018-09-04 19:21:02 +08:00
|
|
|
export class StackdriverQueryCtrl extends QueryCtrl {
|
|
|
|
|
static templateUrl = 'partials/query.editor.html';
|
2018-09-12 04:41:24 +08:00
|
|
|
|
2018-09-04 19:21:02 +08:00
|
|
|
/** @ngInject */
|
2018-12-22 06:28:21 +08:00
|
|
|
constructor($scope, $injector) {
|
2018-09-04 19:21:02 +08:00
|
|
|
super($scope, $injector);
|
2018-12-13 23:40:14 +08:00
|
|
|
registerAngularDirectives();
|
2018-12-22 06:07:46 +08:00
|
|
|
this.handleQueryChange = this.handleQueryChange.bind(this);
|
|
|
|
|
this.handleExecuteQuery = this.handleExecuteQuery.bind(this);
|
2018-12-13 07:16:48 +08:00
|
|
|
}
|
|
|
|
|
|
2018-12-19 21:19:27 +08:00
|
|
|
handleQueryChange(target: Target) {
|
|
|
|
|
Object.assign(this.target, target);
|
2018-12-13 07:16:48 +08:00
|
|
|
}
|
|
|
|
|
|
2018-12-19 21:19:27 +08:00
|
|
|
handleExecuteQuery() {
|
|
|
|
|
this.$scope.ctrl.refresh();
|
2018-09-13 17:02:31 +08:00
|
|
|
}
|
2018-09-04 19:21:02 +08:00
|
|
|
}
|