fix: node detail wrongly shows 'offline' #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/node-detail-online-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The per-node header on the dashboard showed a red dot + "node offline" even though the tabs (same page) showed the node online with a green dot.
Cause:
GET /api/nodes/:idreturned the raw DB row via#find, which has noonlinefield. The node list (/api/nodes) decorates each row with a computedonline(last_seen withinheartbeat_interval * 2), but the single-node detail didn't — so the frontend readonlineas falsy → offline.Fix: add
NodeRepository#find_with_status(decorates with the same online logic) and use it in the detail endpoint. Now the header agrees with the tabs.Full suite green — 1133 examples.
🤖 Generated with Claude Code