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
aca9d396
Commit
aca9d396
authored
Dec 14, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(elasticsearch): added unit option to derivative metric, closes #3512
parent
b63471eb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
CHANGELOG.md
+5
-0
public/app/plugins/datasource/elasticsearch/elastic_response.js
+5
-1
public/app/plugins/datasource/elasticsearch/partials/metric_agg.html
+12
-0
public/app/plugins/datasource/elasticsearch/query_def.js
+3
-1
No files found.
CHANGELOG.md
View file @
aca9d396
# 2.6.1
### New Features
*
**Elasticsearch**
: Support for derivative unit option, closes
[
#3512
](
https://github.com/grafana/grafana/issues/3512
)
# 2.6.0 (2015-12-14)
### New Features
...
...
public/app/plugins/datasource/elasticsearch/elastic_response.js
View file @
aca9d396
...
...
@@ -82,7 +82,11 @@ function (_, queryDef) {
value
=
bucket
[
metric
.
id
];
if
(
value
!==
undefined
)
{
newSeries
.
datapoints
.
push
([
value
.
value
,
bucket
.
key
]);
if
(
value
.
normalized_value
)
{
newSeries
.
datapoints
.
push
([
value
.
normalized_value
,
bucket
.
key
]);
}
else
{
newSeries
.
datapoints
.
push
([
value
.
value
,
bucket
.
key
]);
}
}
}
...
...
public/app/plugins/datasource/elasticsearch/partials/metric_agg.html
View file @
aca9d396
...
...
@@ -39,6 +39,18 @@
<div
class=
"tight-form"
ng-if=
"showOptions"
>
<div
class=
"tight-form-inner-box tight-form-container"
>
<div
class=
"tight-form"
ng-if=
"agg.type === 'derivative'"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 75px;"
>
Unit
</li>
<li>
<input
type=
"text"
class=
"input-medium tight-form-input last"
ng-model=
"agg.settings.unit"
ng-blur=
"onChangeInternal()"
spellcheck=
'false'
>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form"
ng-if=
"agg.type === 'moving_avg'"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 75px;"
>
...
...
public/app/plugins/datasource/elasticsearch/query_def.js
View file @
aca9d396
...
...
@@ -73,7 +73,9 @@ function (_) {
{
text
:
'window'
,
default
:
5
},
{
text
:
'model'
,
default
:
'simple'
}
],
'derivative'
:
[]
'derivative'
:
[
{
text
:
'unit'
,
default
:
undefined
},
]
},
getMetricAggTypes
:
function
(
esVersion
)
{
...
...
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