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.max && { lte: bounds.max.toISOString() }),
|
||||
format: 'strict_date_optional_time',
|
||||
// format: 'strict_date_optional_time',
|
||||
},
|
||||
indexPattern
|
||||
);
|
||||
|
|
|
@ -33,7 +33,7 @@ export const createFilterDateHistogram = (
|
|||
{
|
||||
gte: start.toISOString(),
|
||||
lt: start.add(interval).toISOString(),
|
||||
format: 'strict_date_optional_time',
|
||||
// format: 'strict_date_optional_time',
|
||||
},
|
||||
agg.getIndexPattern()
|
||||
);
|
||||
|
|
|
@ -26,7 +26,7 @@ export const createFilterDateRange = (agg: IBucketAggConfig, { from, to }: DateR
|
|||
const filter: RangeFilterParams = {};
|
||||
if (from) filter.gte = moment(from).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());
|
||||
};
|
||||
|
|
|
@ -56,9 +56,9 @@ export async function createFiltersFromRangeSelectAction(event: RangeSelectConte
|
|||
lt: isDate ? moment(max).toISOString() : max,
|
||||
};
|
||||
|
||||
if (isDate) {
|
||||
range.format = 'strict_date_optional_time';
|
||||
}
|
||||
// if (isDate) {
|
||||
// range.format = 'strict_date_optional_time';
|
||||
// }
|
||||
|
||||
return esFilters.mapAndFlattenFilters([esFilters.buildRangeFilter(field, range, indexPattern)]);
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ export default (props) => {
|
|||
[timeFieldName] : {
|
||||
...(bounds.min && { gte: bounds.min.toISOString() }),
|
||||
...(bounds.max && { lte: bounds.max.toISOString() }),
|
||||
format: 'strict_date_optional_time',
|
||||
// format: 'strict_date_optional_time',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue