Ordered range options for the dropdown, each with its i18n label key. Ordered
widest-to-narrowest so the default (all) sits first.
Health verdict for one supplier over the selected range.
The per-supplier counters the classifier reads.
Formats a date as the YYYY-MM-DD key used by the stats store, in the
viewer's local time. These buckets are user-facing — "today" and the daily
chart's axis have to mean the user's day, not UTC's — so the store keys off
this too, keeping recording and filtering on the same calendar.
Narrows recorded stats to the days falling inside a range. Because the store
keys days as zero-padded YYYY-MM-DD, lexicographic comparison is equivalent
to chronological comparison, so no date parsing is needed per key.
Returns the i18n key for a health status label.
Classifies a supplier's connection and parsing health from its totals.
Failure share at or above which a category counts as "excessive". Below this a supplier is treated as healthy — occasional failures are normal. Total failure (a ratio of 1) escalates to the critical status for that category.
Selectable window for the stats views.