diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 9d40e1bfc8..b850a00897 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -151,15 +151,14 @@ EOD; if((is_numeric($gateway['attribute'])) && is_ipaddr($gwref['monitor'])) { $gateway['monitor'] = $gwref['monitor']; } else { - if(($gateway['gateway'] == "dynamic") && ($gateway['monitor'])) { + if ($gateway['gateway'] == "dynamic") { $gateway['monitor'] = "127.0.0.{$i}"; $i++; } - if(!is_ipaddr($gateway['monitor'])) { + if (!is_ipaddr($gateway['monitor'])) $gateway['monitor'] = $gateway['gateway']; - } } - + $apingercfg .= "target \"{$gateway['monitor']}\" {\n"; $apingercfg .= " description \"{$gateway['name']}\"\n"; $alarms = ""; diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index 51118d5607..7d675701a4 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -74,9 +74,9 @@ $counter = 1; "; - $counter++; + default: + $online = "Gathering data"; + } + echo ""; + $counter++; ?>
$online
$online