From 232e6cf4aced399b627c752ff16a11a1ece14ee8 Mon Sep 17 00:00:00 2001
From: VoidValue <167689141+voidvalue-dev@users.noreply.github.com>
Date: Mon, 15 Jun 2026 01:45:03 +0200
Subject: [PATCH] Handle server maintenance status in ServerRow (#5525)
Currently, when a node is under maintenance, the server row keeps
loading indefinitely. This means that there will be no requests to the
resource API, and the user will be able to know this without directly
accessing the server.
old:
new:
(I reopened it because I decided to delete my fork to clean things up.
And use better techniques)
---
resources/scripts/components/dashboard/ServerRow.tsx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/resources/scripts/components/dashboard/ServerRow.tsx b/resources/scripts/components/dashboard/ServerRow.tsx
index 08637bfc2..aa2b5a70d 100644
--- a/resources/scripts/components/dashboard/ServerRow.tsx
+++ b/resources/scripts/components/dashboard/ServerRow.tsx
@@ -66,7 +66,7 @@ export default ({ server, className }: { server: Server; className?: string }) =
useEffect(() => {
// Don't waste a HTTP request if there is nothing important to show to the user because
// the server is suspended.
- if (isSuspended) return;
+ if (isSuspended || server.isNodeUnderMaintenance) return;
getStats().then(() => {
interval.current = setInterval(() => getStats(), 30000);
@@ -75,7 +75,7 @@ export default ({ server, className }: { server: Server; className?: string }) =
return () => {
interval.current && clearInterval(interval.current);
};
- }, [isSuspended]);
+ }, [isSuspended, server.isNodeUnderMaintenance]);
const alarms = { cpu: false, memory: false, disk: false };
if (stats) {
@@ -116,13 +116,19 @@ export default ({ server, className }: { server: Server; className?: string }) =