Commit 1161c7bc by Sven Klemm

add postgresVersion to postgres settings

parent 52bd51f2
...@@ -8,8 +8,14 @@ class PostgresConfigCtrl { ...@@ -8,8 +8,14 @@ class PostgresConfigCtrl {
/** @ngInject **/ /** @ngInject **/
constructor($scope) { constructor($scope) {
this.current.jsonData.sslmode = this.current.jsonData.sslmode || 'require'; this.current.jsonData.sslmode = this.current.jsonData.sslmode || 'verify-full';
} }
/* the values are chosen to be equivalent to `select current_setting('server_version_num');` */
postgresVersions = [
{ name: '8.0+', value: 80000 },
{ name: '8.1+', value: 80100 },
];
} }
const defaultQuery = `SELECT const defaultQuery = `SELECT
......
...@@ -38,6 +38,22 @@ ...@@ -38,6 +38,22 @@
</div> </div>
</div> </div>
<h3 class="page-heading">PostgreSQL details</h3>
<div class="gf-form-group">
<div class="gf-form">
<span class="gf-form-label width-8">
Version
<info-popover mode="right-normal" position="top center">
This option controls what functions are used when expanding grafana macros.
</info-popover>
</span>
<span class="gf-form-select-wrapper">
<select class="gf-form-input gf-size-auto" ng-model="ctrl.current.jsonData.postgresVersion" ng-options="f.value as f.name for f in ctrl.postgresVersions"></select>
</span>
</div>
</div>
<div class="gf-form-group"> <div class="gf-form-group">
<div class="grafana-info-box"> <div class="grafana-info-box">
<h5>User Permission</h5> <h5>User Permission</h5>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment