chore: remove `strict_date_optional_time` (#117)
Co-authored-by: yaojiping <yaojiping@infini.ltd>
This commit is contained in:
parent
d2a3ec0e7a
commit
3adfc77466
|
@ -72,7 +72,7 @@ function createTimeRangeFilter(
|
||||||
{
|
{
|
||||||
...(bounds.min && { gte: bounds.min.toISOString() }),
|
...(bounds.min && { gte: bounds.min.toISOString() }),
|
||||||
...(bounds.max && { lte: bounds.max.toISOString() }),
|
...(bounds.max && { lte: bounds.max.toISOString() }),
|
||||||
format: 'strict_date_optional_time',
|
// format: 'strict_date_optional_time',
|
||||||
},
|
},
|
||||||
indexPattern
|
indexPattern
|
||||||
);
|
);
|
||||||
|
|
|
@ -33,7 +33,7 @@ export const createFilterDateHistogram = (
|
||||||
{
|
{
|
||||||
gte: start.toISOString(),
|
gte: start.toISOString(),
|
||||||
lt: start.add(interval).toISOString(),
|
lt: start.add(interval).toISOString(),
|
||||||
format: 'strict_date_optional_time',
|
// format: 'strict_date_optional_time',
|
||||||
},
|
},
|
||||||
agg.getIndexPattern()
|
agg.getIndexPattern()
|
||||||
);
|
);
|
||||||
|
|
|
@ -26,7 +26,7 @@ export const createFilterDateRange = (agg: IBucketAggConfig, { from, to }: DateR
|
||||||
const filter: RangeFilterParams = {};
|
const filter: RangeFilterParams = {};
|
||||||
if (from) filter.gte = moment(from).toISOString();
|
if (from) filter.gte = moment(from).toISOString();
|
||||||
if (to) filter.lt = moment(to).toISOString();
|
if (to) filter.lt = moment(to).toISOString();
|
||||||
if (to && from) filter.format = 'strict_date_optional_time';
|
// if (to && from) filter.format = 'strict_date_optional_time';
|
||||||
|
|
||||||
return buildRangeFilter(agg.params.field, filter, agg.getIndexPattern());
|
return buildRangeFilter(agg.params.field, filter, agg.getIndexPattern());
|
||||||
};
|
};
|
||||||
|
|
|
@ -56,9 +56,9 @@ export async function createFiltersFromRangeSelectAction(event: RangeSelectConte
|
||||||
lt: isDate ? moment(max).toISOString() : max,
|
lt: isDate ? moment(max).toISOString() : max,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isDate) {
|
// if (isDate) {
|
||||||
range.format = 'strict_date_optional_time';
|
// range.format = 'strict_date_optional_time';
|
||||||
}
|
// }
|
||||||
|
|
||||||
return esFilters.mapAndFlattenFilters([esFilters.buildRangeFilter(field, range, indexPattern)]);
|
return esFilters.mapAndFlattenFilters([esFilters.buildRangeFilter(field, range, indexPattern)]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,7 +285,7 @@ export default (props) => {
|
||||||
[timeFieldName] : {
|
[timeFieldName] : {
|
||||||
...(bounds.min && { gte: bounds.min.toISOString() }),
|
...(bounds.min && { gte: bounds.min.toISOString() }),
|
||||||
...(bounds.max && { lte: bounds.max.toISOString() }),
|
...(bounds.max && { lte: bounds.max.toISOString() }),
|
||||||
format: 'strict_date_optional_time',
|
// format: 'strict_date_optional_time',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue