Skip to content

Commit

Permalink
deal with elastic/elasticsearch#14404 until 2.2
Browse files Browse the repository at this point in the history
Fixes #5638
  • Loading branch information
spalger authored and epixa committed Dec 11, 2015
1 parent 1f82968 commit 230555c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ui/public/index_patterns/_calculate_indices.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ define(function (require) {

let indexDetails = _(indices).map((stats, index) => {
const field = stats.fields[timeFieldName];
return { index, min: field.min_value, max: field.max_value };

// TODO: remove when we get to es 2.2, see elastic/elasticsearch#14404
let min = field.min_value;
if (typeof min === 'string') min = moment(min).valueOf();

let max = field.max_value;
if (typeof max === 'string') max = moment(max).valueOf();

return { index, min, max };
});

if (sortDirection) {
Expand Down

0 comments on commit 230555c

Please sign in to comment.