-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquery_ctrl.js
41 lines (41 loc) · 1.74 KB
/
query_ctrl.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
System.register([], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var RestSQLQueryCtrl;
return {
setters:[],
execute: function() {
RestSQLQueryCtrl = (function () {
function RestSQLQueryCtrl($scope, $injector, uiSegmentSrv, templateSrv) {
this.uiSegmentSrv = uiSegmentSrv;
this.templateSrv = templateSrv;
this.panel = this.panelCtrl.panel;
this.segmentSrv = uiSegmentSrv;
this.refreshResources();
}
RestSQLQueryCtrl.prototype.refreshResources = function () {
var t = this.target;
this.datasource.getResources().then(function (result) {
t.resourceList = result;
});
};
RestSQLQueryCtrl.prototype.switchResource = function (newResource) {
var t = this.target;
console.log("Switching resource to " + newResource);
this.datasource.getResourceColumns(newResource).then(function (result) {
t.columnList = result;
});
};
RestSQLQueryCtrl.prototype.onChangeInternal = function () {
console.log("onChangeInternal");
};
RestSQLQueryCtrl.prototype.refresh = function () {
this.panelCtrl.refresh();
};
RestSQLQueryCtrl.templateUrl = 'partials/query.editor.html';
return RestSQLQueryCtrl;
}());
exports_1("RestSQLQueryCtrl", RestSQLQueryCtrl);
}
}
});