From 9b590dd08fe845d34e0d00b1f49419e1bb4cbdc0 Mon Sep 17 00:00:00 2001 From: openclaw Date: Fri, 6 Mar 2026 15:50:32 +0800 Subject: [PATCH] feat: mark offline nodes in sdwan mapping --- web/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index 735a149..5b840f5 100644 --- a/web/index.html +++ b/web/index.html @@ -144,7 +144,8 @@
@@ -370,6 +371,8 @@ createApp({ if (!k) return nodes.value; return nodes.value.filter(n => (n.name||'').toLowerCase().includes(k) || (n.publicIP||'').toLowerCase().includes(k)); }); + const onlineMap = computed(() => new Set((nodes.value || []).map(n => n.name))); + const nodeStatus = (name) => (name && onlineMap.value.has(name)) ? '在线' : '离线'; const toast = (text, t='ok') => { msg.value = text; msgType.value = t; setTimeout(() => { if (msg.value === text) msg.value = ''; }, 2500); }; const bearer = () => ({ Authorization: 'Bearer ' + (localStorage.getItem('t') || '') }); @@ -668,6 +671,7 @@ createApp({ health, stats, nodes, nodeKeyword, filteredNodes, sd, connectForm, tenants, activeTenant, keys, users, enrolls, tenantForm, keyForm, userForm, settings, audit, auditTenant, + onlineMap, nodeStatus, natText, uptime, fmtTime, login, logout, refreshAll, saveSDWAN, addSDWANNode, removeSDWANNode, addSubnetProxy, removeSubnetProxy, autoAssignIPs, kickNode, renameNode, changeNodeIP, openAppManager, pushAppConfigs, openConnect, doConnect,