diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-07-18 10:33:45 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-07-18 10:33:45 -0300 |
commit | d806061cb4e5fd8f1b0f4d72019f7137d935e61d (patch) | |
tree | 6c1e21caca61ef82c968d7f9fd225a044c166074 | |
parent | f4b759123931a4891e4557d44d74e0bb0cb5bfaa (diff) | |
parent | 061ac3f364c342a433c0adf44b6dd77e0ccec8a9 (diff) | |
download | pfsense-d806061cb4e5fd8f1b0f4d72019f7137d935e61d.zip pfsense-d806061cb4e5fd8f1b0f4d72019f7137d935e61d.tar.gz |
Merge pull request #1232 from N0YB/Widget_Gateways
-rw-r--r-- | usr/local/www/includes/functions.inc.php | 2 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/gateways.widget.php | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 48bc408..1c1fa9f 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -72,7 +72,7 @@ function get_gatewaystats() { $bgcolor = "#ADD8E6"; // lightblue } $data .= ($online == "Pending") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},"; - $data .= "<table><tr><td bgcolor=\"$bgcolor\"> $online </td></td></tr></table>"; + $data .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" style=\"table-layout: fixed;\" summary=\"status\"><tr><td bgcolor=\"$bgcolor\"> $online </td></tr></table>"; } return $data; } diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index 50011e5..24b8afd 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -71,14 +71,17 @@ $counter = 1; <td class="vncellt ellipsis" width="100%"> <div id="gateway<?php echo $counter; ?>" style="display:inline"> <?php + $if_gw = ''; if (is_ipaddr($gateway['gateway'])) - echo htmlspecialchars($gateway['gateway']); + $if_gw = htmlspecialchars($gateway['gateway']); else { if($gateway['ipprotocol'] == "inet") - echo htmlspecialchars(get_interface_gateway($gateway['friendlyiface'])); + $if_gw = htmlspecialchars(get_interface_gateway($gateway['friendlyiface'])); if($gateway['ipprotocol'] == "inet6") - echo htmlspecialchars(get_interface_gateway_v6($gateway['friendlyiface'])); + $if_gw = htmlspecialchars(get_interface_gateway_v6($gateway['friendlyiface'])); } + echo ($if_gw == '' ? '~' : $if_gw); + unset ($if_gw); $counter++; ?> </div> |