Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a9545303
Commit
a9545303
authored
Sep 05, 2018
by
Sven Klemm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add min time interval to postgres datasource
parent
7c88436a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletions
+17
-1
public/app/plugins/datasource/postgres/datasource.ts
+2
-0
public/app/plugins/datasource/postgres/partials/config.html
+10
-0
public/app/plugins/datasource/postgres/plugin.json
+5
-1
No files found.
public/app/plugins/datasource/postgres/datasource.ts
View file @
a9545303
...
...
@@ -8,6 +8,7 @@ export class PostgresDatasource {
jsonData
:
any
;
responseParser
:
ResponseParser
;
queryModel
:
PostgresQuery
;
interval
:
string
;
/** @ngInject */
constructor
(
instanceSettings
,
private
backendSrv
,
private
$q
,
private
templateSrv
,
private
timeSrv
)
{
...
...
@@ -16,6 +17,7 @@ export class PostgresDatasource {
this
.
jsonData
=
instanceSettings
.
jsonData
;
this
.
responseParser
=
new
ResponseParser
(
this
.
$q
);
this
.
queryModel
=
new
PostgresQuery
({});
this
.
interval
=
instanceSettings
.
jsonData
.
timeInterval
;
}
interpolateVariable
(
value
,
variable
)
{
...
...
public/app/plugins/datasource/postgres/partials/config.html
View file @
a9545303
...
...
@@ -61,6 +61,16 @@
</label>
</div>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-9"
>
Min time interval
</span>
<input
type=
"text"
class=
"gf-form-input width-6"
ng-model=
"ctrl.current.jsonData.timeInterval"
spellcheck=
'false'
placeholder=
"1m"
></input>
<info-popover
mode=
"right-absolute"
>
A lower limit for the auto group by time interval. Recommended to be set to write frequency,
for example
<code>
1m
</code>
if your data is written every minute.
</info-popover>
</div>
</div>
<div
class=
"grafana-info-box alert alert-info"
ng-show=
"ctrl.showTimescaleDBHelp"
>
<div
class=
"alert-body"
>
<p>
...
...
public/app/plugins/datasource/postgres/plugin.json
View file @
a9545303
...
...
@@ -18,6 +18,10 @@
"alerting"
:
true
,
"annotations"
:
true
,
"metrics"
:
true
"metrics"
:
true
,
"queryOptions"
:
{
"minInterval"
:
true
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment