2016-01-14 07:37:04 -06:00
|
|
|
///<reference path="../../headers/common.d.ts" />
|
|
|
|
|
2017-12-20 05:33:33 -06:00
|
|
|
import _ from 'lodash';
|
2016-02-01 05:42:10 -06:00
|
|
|
|
2016-02-02 05:52:43 -06:00
|
|
|
export class QueryCtrl {
|
2016-02-02 02:12:58 -06:00
|
|
|
target: any;
|
|
|
|
datasource: any;
|
|
|
|
panelCtrl: any;
|
|
|
|
panel: any;
|
2016-02-02 09:32:36 -06:00
|
|
|
hasRawMode: boolean;
|
2016-02-02 15:58:37 -06:00
|
|
|
error: string;
|
2017-09-08 04:43:29 -05:00
|
|
|
isLastQuery: boolean;
|
2016-02-02 02:12:58 -06:00
|
|
|
|
2017-09-21 09:40:18 -05:00
|
|
|
constructor(public $scope, public $injector) {
|
2016-02-02 02:12:58 -06:00
|
|
|
this.panel = this.panelCtrl.panel;
|
2017-12-19 09:06:54 -06:00
|
|
|
this.isLastQuery =
|
|
|
|
_.indexOf(this.panel.targets, this.target) ===
|
|
|
|
this.panel.targets.length - 1;
|
2016-02-02 02:12:58 -06:00
|
|
|
}
|
|
|
|
|
2016-02-02 05:52:43 -06:00
|
|
|
refresh() {
|
|
|
|
this.panelCtrl.refresh();
|
|
|
|
}
|
2016-01-14 07:37:04 -06:00
|
|
|
}
|