Commit 9d022766 by Sven Klemm

add postgres version to datasource config

parent c90eb45c
......@@ -10,6 +10,14 @@ class PostgresConfigCtrl {
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 },
];
}
const defaultQuery = `SELECT
......
......@@ -42,6 +42,17 @@
<div class="gf-form-group">
<div class="gf-form">
<span class="gf-form-label width-9">
Version
<info-popover mode="right-normal" position="top center">
This option controls what functions are available in the PostgreSQL query builder.
</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 class="gf-form">
<gf-form-switch class="gf-form" label="TimescaleDB" tooltip="Use TimescaleDB features (e.g., time_bucket) in Grafana" label-class="width-9" checked="ctrl.current.jsonData.timescaledb" switch-class="max-width-6"></gf-form-switch>
</div>
</div>
......
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