From 109d196faad7a702bb7c07688574ea26065c05c3 Mon Sep 17 00:00:00 2001 From: alyssa Date: Tue, 18 Jun 2024 18:28:30 +0900 Subject: [PATCH] fix(dash): update status page for new /private/meta format --- dashboard/src/components/status/Shard.svelte | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dashboard/src/components/status/Shard.svelte b/dashboard/src/components/status/Shard.svelte index cbcee67f..b7851ec8 100644 --- a/dashboard/src/components/status/Shard.svelte +++ b/dashboard/src/components/status/Shard.svelte @@ -3,8 +3,8 @@ export let shard = { id: 1, - status: "", - ping:0, + up:false, + latency:0, disconnection_count:0, last_connection:0, last_heartbeat:0, @@ -14,11 +14,11 @@ let color = "background-color: #fff"; // shard is down - if (shard.status != "up" || shard.heartbeat_minutes_ago > 5) color = "background-color: #000;"; + if (!shard.up || shard.heartbeat_minutes_ago > 5) color = "background-color: #000;"; // shard latency is < 250ms: OK! - else if (shard.ping < 300) color = "background-color: #00cc00;"; + else if (shard.latency < 300) color = "background-color: #00cc00;"; // shard latency is 250ms < ping < 600ms: slow, but OK - else if (shard.ping < 600) color = "background-color: #da9317;"; + else if (shard.latency < 600) color = "background-color: #da9317;"; // shard latency is >600ms, this might be problematic else color = "background-color: #cc0000;" @@ -32,8 +32,8 @@

Shard { shard.id }


- Status: { shard.status }
- Latency: { shard.ping }ms
+ Status: { shard.up ? "up" : "down" }
+ Latency: { shard.latency }ms
Disconnection count: { shard.disconnection_count }
Last connection: { shard.last_connection } UTC
Last heartbeat: { shard.last_heartbeat } UTC @@ -73,4 +73,4 @@ user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */ } - \ No newline at end of file +