fix(ui): отличать неизвестный RTT от отсутствия ответов Ping
This commit is contained in:
1 parent
30cc99c68e
commit
9680a6422b
6 files changed
+55
-10
No files matched your search
@@ -191,7 +191,8 @@ function UptimeSpeedHistoryDataGrid({ runs, servers }: UptimeSpeedHistoryDataGri
|
||||
cell: ({ row }) => {
|
||||
const run = row.original
|
||||
if (run.status !== "done") return <span className="text-xs">—</span>
|
||||
if (run.afterBtPing?.error) {
|
||||
if (!run.afterBtPing) return <span className="text-xs text-muted-foreground">Нет данных</span>
|
||||
if (run.afterBtPing.error) {
|
||||
return (
|
||||
<span className="text-[var(--status-offline-fg)] text-xs font-mono" title={run.afterBtPing.error}>
|
||||
ошибка
|
||||
@@ -210,7 +211,7 @@ function UptimeSpeedHistoryDataGrid({ runs, servers }: UptimeSpeedHistoryDataGri
|
||||
}
|
||||
return (
|
||||
<span className="font-mono tabular-nums whitespace-nowrap text-xs text-amber-600 dark:text-amber-400">
|
||||
timeout
|
||||
{run.afterBtPing.lossPct === 100 ? "Нет ответов" : "RTT неизвестен"}
|
||||
{run.afterBtPing?.lossPct != null && <span> · {run.afterBtPing.lossPct}%</span>}
|
||||
</span>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user