From f3120dfae5bdb7a8bbb4c955094bff4925116f23 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Fri, 9 Jan 2026 09:51:47 +0000 Subject: [PATCH] improve responsiveness of monitoring page --- .../server-health.component.html | 21 ++++--- .../server-health.component.scss | 61 ++++++++++++++++++- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/frontend/src/app/components/server-health/server-health.component.html b/frontend/src/app/components/server-health/server-health.component.html index 4a222e632..7026ff848 100644 --- a/frontend/src/app/components/server-health/server-health.component.html +++ b/frontend/src/app/components/server-health/server-health.component.html @@ -15,31 +15,32 @@ Host - Updated + Updated RTT RTT Height - Hybrid - Front - Back - Electrs - SSR - Core + Hybrid + Front + Back + Electrs + SSR + Core {{ i + 1 }} {{ host.active ? '⭐️' : host.flag }} {{ host.link }} - {{ getLastUpdateSeconds(host) }} + {{ getLastUpdateSeconds(host) }} {{ (host.rtt / 1000) | number : '1.1-1' }} {{ host.rtt == null ? '' : 's'}} {{ !host.checked ? '⏳' : (host.unreachable ? '🔥' : '✅') }} {{ host.rtt | number : '1.0-0' }} {{ host.rtt == null ? '' : 'ms'}} {{ !host.checked ? '⏳' : (host.unreachable ? '🔥' : '✅') }} {{ host.latestHeight }} {{ !host.checked ? '⏳' : (host.outOfSync ? '🚫' : (host.latestHeight && host.latestHeight < maxHeight ? '🟧' : '✅')) }} - + @if (type !== 'core' && host.hashes?.[type]) { {{ host.hashes[type].slice(0, 8) || '?' }} } @else if (host.hashes?.[type]) { - {{ host.hashes[type] || '?' }} + {{ host.hashes[type] || '?' }} + {{ host.hashes[type]?.slice(9) || '?' }} } @else { ? } diff --git a/frontend/src/app/components/server-health/server-health.component.scss b/frontend/src/app/components/server-health/server-health.component.scss index 4aa58732b..883ef22dc 100644 --- a/frontend/src/app/components/server-health/server-health.component.scss +++ b/frontend/src/app/components/server-health/server-health.component.scss @@ -50,10 +50,16 @@ white-space: nowrap; } - @media (min-width: 576px) { - &.updated { - display: table-cell; + span { + &.only-small { + display: none; } + &.only-large { + display: inline; + } + } + + @media (min-width: 576px) { &.only-small { display: none; } @@ -62,5 +68,54 @@ } } } + + @media (max-width: 1080px) { + th { + font-size: 11px; + } + + td, th { + &.updated { + display: none; + } + + &.hash { + max-width: 50px; + overflow: hidden; + } + + span { + &.only-small { + display: inline; + } + &.only-large { + display: none; + } + } + } + } + + @media (max-width: 800px) { + th { + font-size: 10px; + } + td, th { + &.hash { + max-width: 38px; + overflow: hidden; + } + } + } + + @media (max-width: 670px) { + font-size: 11px; + + td, th { + &.hash { + max-width: 30px; + overflow: hidden; + } + } + } } } \ No newline at end of file