fix: clarify blocked source status
This commit is contained in:
@@ -27,3 +27,11 @@ export function freshnessStatus(value: string | null | undefined, now = Date.now
|
||||
if (!Number.isFinite(timestamp)) return "unknown";
|
||||
return now - timestamp > 48 * 60 * 60 * 1000 ? "stale" : "fresh";
|
||||
}
|
||||
|
||||
export function sourceStatusLabel(status: string) {
|
||||
const labels: Record<string, string> = {
|
||||
healthy: "Актуален", stale: "Данные устарели", temporarily_limited: "Источник временно ограничен",
|
||||
source_changed: "Источник изменился", waiting: "Ожидает запуска", disabled: "Выключен",
|
||||
};
|
||||
return labels[status] ?? "Состояние не определено";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user