fix: align columns and colorize numbers in drawIface function

This commit is contained in:
2025-05-16 05:13:30 -07:00
parent 25dca3f857
commit 67a5a0d545
+2 -1
View File
@@ -239,7 +239,7 @@ func ifaceHealthy(st *InterfaceStatus) bool {
} }
const ( const (
hostW = 23 hostW = 30 // Increased width for host column
numW = 7 numW = 7
stdW = 8 stdW = 8
nW = 6 nW = 6
@@ -342,6 +342,7 @@ func drawIface(scr tcell.Screen, y, w int, st *InterfaceStatus) int {
put(scr, hostW+1+numW+1, y, fmt.Sprintf("%*s", numW, fmt.Sprintf("%.0fms", mi)), styleLatency(mi)) put(scr, hostW+1+numW+1, y, fmt.Sprintf("%*s", numW, fmt.Sprintf("%.0fms", mi)), styleLatency(mi))
put(scr, hostW+1+numW*2+2, y, fmt.Sprintf("%*s", numW, fmt.Sprintf("%.0fms", av)), styleLatency(av)) put(scr, hostW+1+numW*2+2, y, fmt.Sprintf("%*s", numW, fmt.Sprintf("%.0fms", av)), styleLatency(av))
put(scr, hostW+1+numW*3+3, y, fmt.Sprintf("%*s", numW, fmt.Sprintf("%.0fms", ma)), styleLatency(ma)) put(scr, hostW+1+numW*3+3, y, fmt.Sprintf("%*s", numW, fmt.Sprintf("%.0fms", ma)), styleLatency(ma))
put(scr, hostW+1+numW*4+4, y, fmt.Sprintf("%*s", stdW, fmt.Sprintf("%.0fms", sd)), styleLatency(sd))
y++ y++
} }
y++ y++