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

@ -124,6 +124,10 @@ export class PostgresDatasource {
.then(data => this.responseParser.parseMetricFindQueryResult(refId, data));
}
getVersion() {
return this.metricFindQuery("SELECT current_setting('server_version_num')::int/100", {});
}
testDatasource() {
return this.metricFindQuery('SELECT 1', {})
.then(res => {