mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
update es version and use extended_stats.std_deviation_bounds
This commit is contained in:
parent
876c3fd8e2
commit
e37fa32847
2 changed files with 8 additions and 13 deletions
|
@ -6,7 +6,10 @@ define(function (require) {
|
|||
|
||||
var valueProps = {
|
||||
makeLabel: function () {
|
||||
return this.key + ' of ' + this.fieldDisplayName();
|
||||
var title = 'Average';
|
||||
if (this.key === 'std_deviation_bounds.lower') title = 'Lower Standard Deviation';
|
||||
if (this.key === 'std_deviation_bounds.upper') title = 'Upper Standard Deviation';
|
||||
return title + ' of ' + this.fieldDisplayName();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -26,22 +29,14 @@ define(function (require) {
|
|||
getResponseAggs: function (agg) {
|
||||
var ValueAggConfig = getResponseAggConfig(agg, valueProps);
|
||||
return [
|
||||
new ValueAggConfig('upper_std_deviation'),
|
||||
new ValueAggConfig('std_deviation_bounds.lower'),
|
||||
new ValueAggConfig('avg'),
|
||||
new ValueAggConfig('lower_std_deviation')
|
||||
new ValueAggConfig('std_deviation_bounds.upper')
|
||||
];
|
||||
},
|
||||
|
||||
getValue: function (agg, bucket) {
|
||||
var stats = bucket[agg.parentId];
|
||||
switch (agg.key) {
|
||||
case 'upper_std_deviation':
|
||||
return stats.avg + stats.std_deviation;
|
||||
case 'lower_std_deviation':
|
||||
return stats.avg - stats.std_deviation;
|
||||
case 'avg':
|
||||
return stats.avg;
|
||||
}
|
||||
return _.get(bucket[agg.parentId], agg.key);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@ module.exports = function (grunt) {
|
|||
return {
|
||||
options: {
|
||||
directory: directory,
|
||||
version: '1.4.2',
|
||||
branch: '1.4.3',
|
||||
plugins: [
|
||||
'elasticsearch/marvel/latest'
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue