2017-03-29 20:43:20 +02:00
|
|
|
///<reference path="../../../headers/common.d.ts" />
|
|
|
|
|
|
|
|
|
|
import angular from 'angular';
|
|
|
|
|
import {MysqlDatasource} from './datasource';
|
|
|
|
|
import {QueryCtrl} from 'app/plugins/sdk';
|
|
|
|
|
|
|
|
|
|
class MysqlQueryCtrl extends QueryCtrl {
|
|
|
|
|
static templateUrl = 'partials/query.editor.html';
|
2017-03-31 11:45:25 +02:00
|
|
|
|
|
|
|
|
resultFormats: any;
|
|
|
|
|
target: any;
|
|
|
|
|
|
|
|
|
|
constructor($scope, $injector) {
|
|
|
|
|
super($scope, $injector);
|
|
|
|
|
|
|
|
|
|
this.target.resultFormat = 'time_series';
|
2017-04-20 11:59:11 +02:00
|
|
|
this.target.alias = "";
|
2017-03-31 11:45:25 +02:00
|
|
|
this.resultFormats = [
|
|
|
|
|
{text: 'Time series', value: 'time_series'},
|
|
|
|
|
{text: 'Table', value: 'table'},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
}
|
2017-03-29 20:43:20 +02:00
|
|
|
}
|
|
|
|
|
|
2017-03-30 13:46:46 +02:00
|
|
|
class MysqlConfigCtrl {
|
2017-03-29 22:54:07 +02:00
|
|
|
static templateUrl = 'partials/config.html';
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-29 20:43:20 +02:00
|
|
|
export {
|
|
|
|
|
MysqlDatasource,
|
|
|
|
|
MysqlDatasource as Datasource,
|
|
|
|
|
MysqlQueryCtrl as QueryCtrl,
|
2017-03-30 13:46:46 +02:00
|
|
|
MysqlConfigCtrl as ConfigCtrl,
|
2017-03-29 20:43:20 +02:00
|
|
|
};
|
|
|
|
|
|