mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixes #536. More fixes and optimizations on the various functions and status pages used for gateways [groups].
This commit is contained in:
parent
fe22a89b4e
commit
01207fd848
@ -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 = "";
|
||||
|
||||
@ -74,9 +74,9 @@ $counter = 1;
|
||||
<table border="0" cellpadding="0" cellspacing="2">
|
||||
<?php
|
||||
$monitor = $gateway['monitor'];
|
||||
if(empty($monitor)) {
|
||||
$monitor = $gateway['gateway'];
|
||||
}
|
||||
if(empty($monitor)) {
|
||||
$monitor = $gateway['gateway'];
|
||||
}
|
||||
switch($gateways_status[$monitor]['status']) {
|
||||
case "None":
|
||||
$online = "Online";
|
||||
@ -94,11 +94,11 @@ $counter = 1;
|
||||
$online = "Warning, Packetloss";
|
||||
$bgcolor = "khaki";
|
||||
break;
|
||||
default:
|
||||
$online = "Gathering data";
|
||||
}
|
||||
echo "<tr><td bgcolor=\"$bgcolor\" > $online </td>";
|
||||
$counter++;
|
||||
default:
|
||||
$online = "Gathering data";
|
||||
}
|
||||
echo "<tr><td bgcolor=\"$bgcolor\" > $online </td>";
|
||||
$counter++;
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user