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
d9d4e6c8
Commit
d9d4e6c8
authored
Jan 21, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3819 from bobrik/opentsdb-fill-policy
Support OpenTSDB 2.2 fill policies, closes #3802
parents
28fabade
bbfdbaf9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
public/app/plugins/datasource/opentsdb/datasource.js
+4
-0
public/app/plugins/datasource/opentsdb/partials/query.editor.html
+14
-2
public/app/plugins/datasource/opentsdb/queryCtrl.js
+5
-0
No files found.
public/app/plugins/datasource/opentsdb/datasource.js
View file @
d9d4e6c8
...
...
@@ -272,6 +272,10 @@ function (angular, _, dateMath) {
}
query
.
downsample
=
interval
+
"-"
+
target
.
downsampleAggregator
;
if
(
target
.
downsampleFillPolicy
!==
"none"
)
{
query
.
downsample
+=
"-"
+
target
.
downsampleFillPolicy
;
}
}
query
.
tags
=
angular
.
copy
(
target
.
tags
);
...
...
public/app/plugins/datasource/opentsdb/partials/query.editor.html
View file @
d9d4e6c8
...
...
@@ -104,8 +104,20 @@
</select>
</li>
<li
class=
"tight-form-item query-keyword"
>
Disable downsampling
<editor-checkbox
text=
""
model=
"target.disableDownsampling"
change=
"targetBlur()"
></editor-checkbox>
<li
class=
"tight-form-item query-keyword"
>
Fill policy
<tip>
Available since OpenTSDB 2.2
</tip>
</li>
<li>
<select
ng-model=
"target.downsampleFillPolicy"
class=
"tight-form-input input-small"
ng-options=
"agg for agg in fillPolicies"
ng-change=
"targetBlur()"
>
</select>
</li>
<li
class=
"tight-form-item query-keyword"
>
Disable downsampling
<editor-checkbox
text=
""
model=
"target.disableDownsampling"
change=
"targetBlur()"
></editor-checkbox>
</li>
</ul>
...
...
public/app/plugins/datasource/opentsdb/queryCtrl.js
View file @
d9d4e6c8
...
...
@@ -13,6 +13,7 @@ function (angular, _, kbn) {
$scope
.
init
=
function
()
{
$scope
.
target
.
errors
=
validateTarget
(
$scope
.
target
);
$scope
.
aggregators
=
[
'avg'
,
'sum'
,
'min'
,
'max'
,
'dev'
,
'zimsum'
,
'mimmin'
,
'mimmax'
];
$scope
.
fillPolicies
=
[
'none'
,
'nan'
,
'null'
,
'zero'
];
if
(
!
$scope
.
target
.
aggregator
)
{
$scope
.
target
.
aggregator
=
'sum'
;
...
...
@@ -22,6 +23,10 @@ function (angular, _, kbn) {
$scope
.
target
.
downsampleAggregator
=
'avg'
;
}
if
(
!
$scope
.
target
.
downsampleFillPolicy
)
{
$scope
.
target
.
downsampleFillPolicy
=
'none'
;
}
$scope
.
datasource
.
getAggregators
().
then
(
function
(
aggs
)
{
$scope
.
aggregators
=
aggs
;
});
...
...
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