fix(ui): отличать неизвестный RTT от отсутствия ответов Ping
This commit is contained in:
1 parent
30cc99c68e
commit
9680a6422b
6 files changed
+55
-10
No files matched your search
@@ -2279,7 +2279,7 @@ function UptimePageContent({ selectedProbeId, allProbesHref }: { selectedProbeId
|
||||
)}
|
||||
style={{
|
||||
width: viewAfterBtPing.rttMs == null
|
||||
? "100%"
|
||||
? "0%"
|
||||
: `${Math.max(Math.min((viewAfterBtPing.rttMs / 120) * 100, 100), 4)}%`,
|
||||
}}
|
||||
/>
|
||||
@@ -2290,7 +2290,7 @@ function UptimePageContent({ selectedProbeId, allProbesHref }: { selectedProbeId
|
||||
? "text-amber-600 dark:text-amber-400"
|
||||
: "text-violet-600 dark:text-violet-400",
|
||||
)}>
|
||||
{viewAfterBtPing.rttMs == null ? "timeout" : `${viewAfterBtPing.rttMs} мс`}
|
||||
{viewAfterBtPing.rttMs == null ? (viewAfterBtPing.lossPct === 100 ? "Нет ответов" : "RTT неизвестен") : `${viewAfterBtPing.rttMs} мс`}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
@@ -2581,7 +2581,7 @@ function UptimePageContent({ selectedProbeId, allProbesHref }: { selectedProbeId
|
||||
</span>
|
||||
) : linkedSp.lastPingAt ? (
|
||||
<span className="text-[10px] text-amber-600 dark:text-amber-400 truncate">
|
||||
ping timeout
|
||||
{linkedSp.lastPingLossPct === 100 ? "ping: нет ответов" : "ping: RTT неизвестен"}
|
||||
{linkedSp.lastPingLossPct != null && <span> · {linkedSp.lastPingLossPct}%</span>}
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
Reference in new issue
Block a user