diff --git a/internal/web/ui/templates/system.html b/internal/web/ui/templates/system.html index c13288d..a133fa0 100644 --- a/internal/web/ui/templates/system.html +++ b/internal/web/ui/templates/system.html @@ -26,9 +26,9 @@

{{icon "heartbeat"}}服务状态

-
-
管理后台 检测中…
-
接口状态 检测中…
+
+
管理后台检测中…
+
接口状态检测中…
@@ -43,39 +43,39 @@ function check() { svcEl.textContent = "检测中…"; - svcEl.className = "pill"; + svcEl.style.color = ""; apiEl.textContent = "检测中…"; - apiEl.className = "pill"; + apiEl.style.color = ""; fetch("/health") .then(function(r) { return r.text(); }) .then(function(t) { if (t.indexOf("ok") !== -1) { svcEl.textContent = "运行正常"; - svcEl.className = "pill ok"; + svcEl.style.color = "var(--green)"; } else { svcEl.textContent = "异常"; - svcEl.className = "pill bad"; + svcEl.style.color = "var(--danger-soft-text)"; } }) .catch(function() { svcEl.textContent = "无法连接"; - svcEl.className = "pill bad"; + svcEl.style.color = "var(--danger-soft-text)"; }); fetch("/openapi.json") .then(function(r) { if (r.ok) { apiEl.textContent = "正常"; - apiEl.className = "pill ok"; + apiEl.style.color = "var(--green)"; } else { apiEl.textContent = "异常 (" + r.status + ")"; - apiEl.className = "pill bad"; + apiEl.style.color = "var(--danger-soft-text)"; } }) .catch(function() { apiEl.textContent = "无法连接"; - apiEl.className = "pill bad"; + apiEl.style.color = "var(--danger-soft-text)"; }); }