diff --git a/usr/local/www/widgets/widgets/interfaces.widget.php b/usr/local/www/widgets/widgets/interfaces.widget.php index dd65b0e252..fae51a40de 100644 --- a/usr/local/www/widgets/widgets/interfaces.widget.php +++ b/usr/local/www/widgets/widgets/interfaces.widget.php @@ -55,6 +55,21 @@ foreach ($ifdescrs as $ifdescr => $ifname): $icon = 'wlan_d'; } else $icon = 'cablenic'; + + if ($ifinfo['status'] == "up" || $ifinfo['status'] == "associated") { + $status = '-up'; + $status_text = 'up'; + $status_icon = 'icon_interface_up.gif'; + } elseif ($ifinfo['status'] == "no carrier") { + $status = '-down'; + $status_text = 'down'; + $status_icon = 'icon_interface_down.gif'; + } elseif ($ifinfo['status'] == "down") { + $status = '-block'; + $status_text = 'disabled'; + $status_icon = 'icon_block.gif'; + } else + $status = ''; ?> @@ -71,32 +86,16 @@ foreach ($ifdescrs as $ifdescr => $ifname): ?> - -
- up -
- - - -
- down -
- - - -
- disabled -
- - + +
+ <?=$status;?> +
+ +