Add health status to debug

This commit is contained in:
Viktor Liu
2026-02-08 21:04:14 +08:00
parent 99e6b1eda4
commit 51e63c246b
5 changed files with 117 additions and 11 deletions

View File

@@ -6,8 +6,33 @@
<style>{{template "style"}}</style>
</head>
<body>
<h1>OK</h1>
<h1>{{.Status}}</h1>
<p>Uptime: {{.Uptime}}</p>
<p>Management Connected: {{.ManagementReady}}</p>
<p>All Clients Healthy: {{.AllClientsHealthy}}</p>
{{if .Clients}}
<h2>Clients</h2>
<table>
<tr>
<th>Account ID</th>
<th>Healthy</th>
<th>Management</th>
<th>Signal</th>
<th>Relays</th>
<th>Error</th>
</tr>
{{range $id, $c := .Clients}}
<tr>
<td>{{$id}}</td>
<td>{{$c.Healthy}}</td>
<td>{{$c.ManagementConnected}}</td>
<td>{{$c.SignalConnected}}</td>
<td>{{$c.RelaysConnected}}/{{$c.RelaysTotal}}</td>
<td>{{$c.Error}}</td>
</tr>
{{end}}
</table>
{{end}}
<p><a href="/debug">&larr; Back</a></p>
</body>
</html>