mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 10:03:11 +08:00
improve description for timescaledb option
This commit is contained in:
@ -5,12 +5,14 @@ export class PostgresConfigCtrl {
|
||||
|
||||
current: any;
|
||||
datasourceSrv: any;
|
||||
showTimescaleDBHelp: boolean;
|
||||
|
||||
/** @ngInject **/
|
||||
constructor($scope, datasourceSrv) {
|
||||
this.datasourceSrv = datasourceSrv;
|
||||
this.current.jsonData.sslmode = this.current.jsonData.sslmode || 'verify-full';
|
||||
this.current.jsonData.postgresVersion = this.current.jsonData.postgresVersion || 903;
|
||||
this.showTimescaleDBHelp = false;
|
||||
this.autoDetectFeatures();
|
||||
}
|
||||
|
||||
@ -46,6 +48,10 @@ export class PostgresConfigCtrl {
|
||||
});
|
||||
}
|
||||
|
||||
toggleTimescaleDBHelp() {
|
||||
this.showTimescaleDBHelp = !this.showTimescaleDBHelp;
|
||||
}
|
||||
|
||||
// the value portion is derived from postgres server_version_num/100
|
||||
postgresVersions = [
|
||||
{ name: '9.3', value: 903 },
|
||||
|
@ -65,10 +65,25 @@
|
||||
</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>
|
||||
<gf-form-switch class="gf-form" label="TimescaleDB" label-class="width-9" checked="ctrl.current.jsonData.timescaledb" switch-class="max-width-6"></gf-form-switch>
|
||||
<label class="gf-form-label query-keyword pointer" ng-click="ctrl.toggleTimescaleDBHelp()">
|
||||
Help
|
||||
<i class="fa fa-caret-down" ng-show="ctrl.showTimescaleDBHelp"></i>
|
||||
<i class="fa fa-caret-right" ng-hide="ctrl.showTimescaleDBHelp"> </i>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="grafana-info-box alert alert-info" ng-show="ctrl.showTimescaleDBHelp">
|
||||
<div class="alert-body">
|
||||
<p>
|
||||
<a href="https://www.timescale.com/" class="pointer" target="_blank">TimescaleDB</a> is a time-series database built as a PostgreSQL extension. If enabled, Grafana will use <code>time_bucket</code> in the <code>$__timeGroup</code> macro and display TimescaleDB specific aggregate functions in the query builder.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="gf-form-group">
|
||||
<div class="grafana-info-box">
|
||||
<h5>User Permission</h5>
|
||||
|
Reference in New Issue
Block a user