diff options
author | smos <seth.mos@dds.nl> | 2012-06-04 12:44:48 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-06-04 12:44:48 +0200 |
commit | 9847b940a3af50057ea236df8227f38352c8acad (patch) | |
tree | 0fa4f56c807bdcef82a2f6626246287f00c7d285 /usr/local/www/widgets | |
parent | 603f19f007149348639c9e09366881ea95b28aa4 (diff) | |
download | pfsense-9847b940a3af50057ea236df8227f38352c8acad.zip pfsense-9847b940a3af50057ea236df8227f38352c8acad.tar.gz |
Enhance the gateways status widget. Show Pending when it's not ready yet, show unknown when it really isn't online.
Diffstat (limited to 'usr/local/www/widgets')
-rw-r--r-- | usr/local/www/widgets/widgets/gateways.widget.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index 119ca23..6a57892 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -57,8 +57,12 @@ $counter = 1; <td class="listr" align="center" id="gateway<?= $counter; ?>"> <?php if (is_ipaddr($gateway['gateway'])) echo $gateway['gateway']; - else - echo get_interface_gateway($gateway['friendlyiface']); + else { + if($gateway['ipprotocol'] == "inet") + echo get_interface_gateway($gateway['friendlyiface']); + if($gateway['ipprotocol'] == "inet6") + echo get_interface_gateway_v6($gateway['friendlyiface']); + } ?> <?php $counter++; ?> </td> @@ -85,18 +89,21 @@ $counter = 1; $online = "Offline"; $bgcolor = "lightcoral"; } elseif (stristr($gateways_status[$gname]['status'], "loss")) { - $online = "Warning, Packetloss"; + $online = "Packetloss"; $bgcolor = "khaki"; } elseif (stristr($gateways_status[$gname]['status'], "delay")) { - $online = "Warning, Latency"; + $online = "Latency"; $bgcolor = "khaki"; } elseif ($gateways_status[$gname]['status'] == "none") { $online = "Online"; $bgcolor = "lightgreen"; + } elseif ($gateways_status[$gname]['status'] == "") { + $online = "Pending"; + $bgcolor = "lightgray"; } } else { - $online = gettext("Pending"); - $bgcolor = "lightgray"; + $online = gettext("Unknown"); + $bgcolor = "lightblue"; } echo "<tr><td bgcolor=\"$bgcolor\" > $online </td>"; $counter++; |