detect postgres version for saved datasources

This commit is contained in:
Sven Klemm
2018-08-15 09:48:06 +02:00
parent 2606f6e715
commit 2d12801186
3 changed files with 55 additions and 19 deletions

View File

@ -1,24 +1,6 @@
import { PostgresDatasource } from './datasource';
import { PostgresQueryCtrl } from './query_ctrl';
class PostgresConfigCtrl {
static templateUrl = 'partials/config.html';
current: any;
/** @ngInject **/
constructor($scope) {
this.current.jsonData.sslmode = this.current.jsonData.sslmode || 'verify-full';
}
// the value portion is derived from postgres server_version_num/100
postgresVersions = [
{ name: '9.3.x', value: 903 },
{ name: '9.4.x', value: 904 },
{ name: '9.5.x', value: 905 },
{ name: '9.6.x', value: 906 },
];
}
import { PostgresConfigCtrl } from './config_ctrl';
const defaultQuery = `SELECT
extract(epoch from time_column) AS time,