summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-19 07:34:51 -0200
committerRenato Botelho <renato@netgate.com>2015-11-19 07:34:51 -0200
commitb8ecbcb46eba338787d7bede16d00ba50c8bc6f3 (patch)
treec72889cf127868e7f839984d5a91d97107319cc8 /src/usr
parent2deccdd5263d0c16ac25a3b0547c1c281362a32c (diff)
parenta68539caa194c724f82d3ac01536b15b4583533e (diff)
downloadpfsense-b8ecbcb46eba338787d7bede16d00ba50c8bc6f3.zip
pfsense-b8ecbcb46eba338787d7bede16d00ba50c8bc6f3.tar.gz
Merge pull request #2086 from phil-davis/patch-13
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/widgets/widgets/gateways.widget.php26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/usr/local/www/widgets/widgets/gateways.widget.php b/src/usr/local/www/widgets/widgets/gateways.widget.php
index 46cb105..a5b5d1c 100644
--- a/src/usr/local/www/widgets/widgets/gateways.widget.php
+++ b/src/usr/local/www/widgets/widgets/gateways.widget.php
@@ -68,6 +68,12 @@ $a_gateways = return_gateways_array();
$gateways_status = array();
$gateways_status = return_gateways_status(true);
+if (isset($config["widgets"]["gateways_widget"]["display_type"])) {
+ $display_type = $config["widgets"]["gateways_widget"]["display_type"];
+} else {
+ $display_type = "gw_ip";
+}
+
// Compose the table contents and pass it back to the ajax caller
if($_REQUEST && $_REQUEST['ajax']) {
global $a_gateways, $gateways_status;
@@ -85,19 +91,7 @@ if($_REQUEST && $_REQUEST['ajax']) {
foreach ($a_gateways as $gname => $gateway) {
print("<tr>\n");
print( "<td>\n");
-
- $if_gw = '';
- if (is_ipaddr($gateway['gateway']))
- $if_gw = $gateway['gateway'];
- else {
- if($gateway['ipprotocol'] == "inet")
- $if_gw = get_interface_gateway($gateway['friendlyiface']);
- if($gateway['ipprotocol'] == "inet6")
- $if_gw = get_interface_gateway_v6($gateway['friendlyiface']);
- }
-
print(htmlspecialchars($gateway['name']) . "<br />");
-
print('<div id="gateway' . $counter . '" style="display:inline"><b>');
$monitor_address = "";
@@ -191,12 +185,6 @@ if ($_POST) {
header("Location: /");
exit(0);
}
-
-if (isset($config["widgets"]["gateways_widget"]["display_type"])) {
- $display_type = $config["widgets"]["gateways_widget"]["display_type"];
-} else {
- $display_type = "gw_ip";
-}
?>
<table id="gwtbl" class="table table-hover">
@@ -266,4 +254,4 @@ if (isset($config["widgets"]["gateways_widget"]["display_type"])) {
<br /><br />
<input id="submit_settings" name="submit_settings" type="submit" onclick="return updatePref();" class="formbtn" value="Save Settings" />
</form>
-</div> \ No newline at end of file
+</div>
OpenPOWER on IntegriCloud