chore: remove `strict_date_optional_time` (#117)

Co-authored-by: yaojiping <yaojiping@infini.ltd>
This commit is contained in:
yaojp123 2025-02-12 08:20:34 +08:00 committed by GitHub
parent d2a3ec0e7a
commit 3adfc77466
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 7 deletions

View File

@ -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
);

View File

@ -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()
);

View File

@ -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());
};

View File

@ -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)]);
}

View File

@ -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',
}
}
}