fix(scheduler): завершить локальную приёмку контекста и адаптивности
This commit is contained in:
1 parent
5df337f6d7
commit
65aeedd3b0
17 files changed
+108
-16
No files matched your search
@@ -876,9 +876,9 @@ function DataCollectionContent() {
|
||||
sub: settingsReads.traffic.error ? "Последний сбор требует обновления" : trafficCollector?.lastError ? trafficCollector.lastError : trafficCollector?.lastDurationMs != null ? `${trafficCollector.lastDurationMs} мс` : "нет данных",
|
||||
icon: trafficCollector?.lastError ? (
|
||||
<XCircleIcon className="size-4" />
|
||||
) : (
|
||||
) : trafficCollector?.lastCollectedAt ? (
|
||||
<CheckCircleIcon className="size-4" />
|
||||
),
|
||||
) : (<CalendarClockIcon className="size-4" />),
|
||||
},
|
||||
{
|
||||
label: "Журнал (в списке)",
|
||||
@@ -946,7 +946,7 @@ function DataCollectionContent() {
|
||||
{isLive && schedulerStatusReceivedAt ? <p className="text-xs text-muted-foreground">Статус получен: {new Date(schedulerStatusReceivedAt).toLocaleString("ru-RU")}</p> : null}
|
||||
{isLive && Object.entries(settingsReads).map(([key, value]) => (
|
||||
<div key={key} className="text-xs text-muted-foreground" data-testid={"settings-" + key}>
|
||||
<p role="status">{SETTINGS_LABELS[key as SettingsKey]} — {value.known ? "настройки получены" : "настройки не получены"}{value.receivedAt ? " (получены): " + new Date(value.receivedAt).toLocaleString("ru-RU") : ""}</p>
|
||||
<p role="status">{SETTINGS_LABELS[key as SettingsKey]} — {value.known ? "настройки получены" : "настройки не получены"}{value.receivedAt ? " · Получено: " + new Date(value.receivedAt).toLocaleString("ru-RU") : ""}</p>
|
||||
{value.error ? <Alert variant="warning" className="mt-1"><AlertCircleIcon aria-hidden="true" /><AlertDescription>{value.error}{value.known ? ". Сохранены последние подтверждённые данные." : ""}</AlertDescription></Alert> : null}
|
||||
</div>
|
||||
))}
|
||||
@@ -965,9 +965,9 @@ function DataCollectionContent() {
|
||||
aria-label="Сводка сбора данных"
|
||||
items={stats.map((s, i) => ({
|
||||
id: `dc-${i}`,
|
||||
label: s.label,
|
||||
label: <span className="whitespace-normal">{s.label}</span>,
|
||||
value: s.value,
|
||||
hint: s.sub,
|
||||
hint: <span className="text-xs text-muted-foreground whitespace-normal">{s.sub}</span>,
|
||||
icon: s.icon,
|
||||
iconClassName:
|
||||
s.label === "Трафик — последний сбор" && trafficCollector?.lastError
|
||||
@@ -976,7 +976,7 @@ function DataCollectionContent() {
|
||||
? "text-warning"
|
||||
: s.label === "Журнал (в списке)" && errorRunsInView
|
||||
? "text-destructive"
|
||||
: s.label === "Трафик — последний сбор"
|
||||
: s.label === "Трафик — последний сбор" && trafficCollector?.lastCollectedAt
|
||||
? "text-success"
|
||||
: "text-muted-foreground",
|
||||
variant:
|
||||
@@ -1042,11 +1042,12 @@ function DataCollectionContent() {
|
||||
</p>
|
||||
<Button
|
||||
size="sm"
|
||||
aria-label="Сохранить настройки планировщика"
|
||||
disabled={schedulerSaveBusy || dirtyCount === 0}
|
||||
onClick={() => { void persistSchedulerDrafts() }}
|
||||
>
|
||||
{schedulerSaveBusy ? <LoaderCircleIcon className="size-4 animate-spin mr-2" /> : null}
|
||||
Сохранить настройки планировщика
|
||||
Сохранить изменения
|
||||
</Button>
|
||||
<div className="text-xs text-muted-foreground flex flex-col gap-0.5 pt-1 border-t border-border/60">
|
||||
<p>
|
||||
|
||||
Reference in new issue
Block a user