From 9e7b1f25efc11fb2054504a4ddcbb7fcd23b8b23 Mon Sep 17 00:00:00 2001 From: Apple Date: Mon, 1 Dec 2025 07:08:36 -0800 Subject: [PATCH] fix: add node button visibility, fix node-guardian swapper health check, fix banner URL transform --- apps/web/src/app/microdao/[slug]/page.tsx | 2 +- apps/web/src/app/nodes/page.tsx | 38 +++++++++++++++++------ scripts/node-guardian-loop.py | 4 ++- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/apps/web/src/app/microdao/[slug]/page.tsx b/apps/web/src/app/microdao/[slug]/page.tsx index d4ae07a3..f560a159 100644 --- a/apps/web/src/app/microdao/[slug]/page.tsx +++ b/apps/web/src/app/microdao/[slug]/page.tsx @@ -94,7 +94,7 @@ export default function MicrodaoDetailPage() {
@@ -196,7 +198,7 @@ export default function NodesPage() { Node Directory - {canAddNode && ( + {canAddNode ? ( + ) : ( + + + Як додати ноду + )}

@@ -263,7 +273,7 @@ export default function NodesPage() {

Наразі немає жодної зареєстрованої ноди.

- {canAddNode && ( + {canAddNode ? ( + ) : ( + + + Як додати ноду + )} ) : ( diff --git a/scripts/node-guardian-loop.py b/scripts/node-guardian-loop.py index e255014d..71580ad3 100755 --- a/scripts/node-guardian-loop.py +++ b/scripts/node-guardian-loop.py @@ -205,7 +205,9 @@ class NodeGuardian: r = await self.client.get(f"{swapper_url}/health", timeout=3.0) if r.status_code == 200: health_data = r.json() - metrics["swapper_healthy"] = health_data.get("status") == "healthy" + # Swapper can return "status": "healthy" or "ok" + status = health_data.get("status", "").lower() + metrics["swapper_healthy"] = status in ("healthy", "ok") else: metrics["swapper_healthy"] = False except Exception: