-
[OPIK-5755] [FE] Remove All time option from v2 logs table time selector (#6155)
发布于
2026-04-09 14:20:45 +00:00 - [OPIK-5755] [FE] Remove All time option from v2 logs table time selector
Hides the "All time" preset from MetricDateRangeSelect in the v2 LogsPage
(TracesSpansTab and ThreadsTab). Also adds excludePresets support to
useMetricDateRangeWithQueryAndStorage so persisted "alltime" state
gracefully falls back to the default (past30 days) on next visit.- Revision 2: Fix setValue sync and add unit tests for excludePresets
- Add useEffect to write DEFAULT_DATE_PRESET back to URL/localStorage
when the stored value is in excludePresets, so state is clean after
the migration (not just visually overridden on each render) - Fix prettier formatting on the import and ternary expression
- Add 5 unit tests covering excludePresets coercion and backward
compatibility when excludePresets is absent or empty
- Revision 3: Replace useEffect state sync with computed value
Use a pure derived value for excluded preset coercion instead of a
useEffect that writes back to URL/localStorage.下载附件