Fix handling of offline interface status in NetworkDevices widget
This commit is contained in:
parent
44689ada2c
commit
0b992a6a11
@ -30,7 +30,7 @@ func createNetworkDevicesList(ctx context.Context, _ terminalapi.Terminal, _ int
|
|||||||
list.Reset()
|
list.Reset()
|
||||||
for _, iface := range sortedInterfaces(interfaces) {
|
for _, iface := range sortedInterfaces(interfaces) {
|
||||||
status := cell.ColorGreen
|
status := cell.ColorGreen
|
||||||
if iface == "offline" {
|
if iface == "_offline_" {
|
||||||
status = cell.ColorGray
|
status = cell.ColorGray
|
||||||
}
|
}
|
||||||
if err := list.Write(fmt.Sprintf("=== %s ===\n", iface)); err != nil {
|
if err := list.Write(fmt.Sprintf("=== %s ===\n", iface)); err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user