mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 14:37:37 +00:00
Show online in CLI & API when isOnline() reports so
This commit is contained in:

committed by
Kristoffer Dalby

parent
4532915be1
commit
000c02dad9
@@ -513,9 +513,7 @@ func nodesToPtables(
|
||||
}
|
||||
|
||||
var online string
|
||||
if lastSeen.After(
|
||||
time.Now().Add(-5 * time.Minute),
|
||||
) { // TODO: Find a better way to reliably show if online
|
||||
if machine.Online {
|
||||
online = pterm.LightGreen("online")
|
||||
} else {
|
||||
online = pterm.LightRed("offline")
|
||||
|
Reference in New Issue
Block a user