API: the "Last apply" check is now "Kernel in sync"

GET /api/v1/status names the check Kernel in sync, the same as the
health row in the web interface, which now reads the new name directly.
The detail is unchanged: "applied <time>" or the kernel's error.
This commit is contained in:
Daniel Redetzke
2026-10-05 22:29:47 +03:00
parent 1bfede250c
commit aa4ca20296
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -353,7 +353,7 @@ func (a *App) status(w http.ResponseWriter, r *http.Request) {
d30, u30 := sumPoints(a.stats.series(nil, "30d")) d30, u30 := sumPoints(a.stats.series(nil, "30d"))
checks := a.kernel.Checks(cfg) checks := a.kernel.Checks(cfg)
last, applyErr := a.recon.Status() last, applyErr := a.recon.Status()
ac := Check{Name: "Last apply", OK: applyErr == nil, Detail: "applied " + last.Format(time.RFC3339)} ac := Check{Name: "Kernel in sync", OK: applyErr == nil, Detail: "applied " + last.Format(time.RFC3339)}
if applyErr != nil { if applyErr != nil {
ac.Detail = applyErr.Error() ac.Detail = applyErr.Error()
} }
+1 -2
View File
@@ -1855,8 +1855,7 @@
t.status = c.ok ? 'Present' : 'Missing'; t.status = c.ok ? 'Present' : 'Missing';
if (/^table /.test(c.detail)) { t.raw = c.detail.replace(/ (present|missing)$/, ''); t.problem = null; } if (/^table /.test(c.detail)) { t.raw = c.detail.replace(/ (present|missing)$/, ''); t.problem = null; }
break; break;
case 'Last apply': case 'Kernel in sync':
t.label = 'Kernel in sync';
if (c.ok) { const iso = c.detail.replace(/^applied /, ''); t.status = ago(iso); t.title = fmtStamp(iso); } else t.status = 'Out of sync'; if (c.ok) { const iso = c.detail.replace(/^applied /, ''); t.status = ago(iso); t.title = fmtStamp(iso); } else t.status = 'Out of sync';
break; break;
case 'Latency check': t.status = c.ok ? 'Tunnel ping works' : 'Failing'; break; case 'Latency check': t.status = c.ok ? 'Tunnel ping works' : 'Failing'; break;