yggdrasilctl tweaks

This commit is contained in:
Neil Alexander 2023-05-19 20:57:14 +01:00
parent 6ac2fae845
commit a233e775eb
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 2 additions and 3 deletions

View file

@ -176,9 +176,9 @@ func run() int {
}
table.SetHeader([]string{"URI", "State", "Dir", "IP Address", "Uptime", "RX", "TX", "Pr", "Last Error"})
for _, peer := range resp.Peers {
state, lasterr, dir := "Up", "(none)", "Out"
state, lasterr, dir := "Up", "-", "Out"
if !peer.Up {
state, lasterr = "Down", fmt.Sprintf("%s (%s ago)", peer.LastError, peer.LastErrorTime.Round(time.Second))
state, lasterr = "Down", fmt.Sprintf("%s ago: %s", peer.LastErrorTime.Round(time.Second), peer.LastError)
}
if peer.Inbound {
dir = "In"