diff options
author | smos <seth.mos@dds.nl> | 2012-06-02 21:48:51 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-06-02 21:48:51 +0200 |
commit | 3e1eec5850cdd50974190146459c9361fe156ff5 (patch) | |
tree | ea98be9a8fba9ae233f70e0b7b623ce9160f8c98 | |
parent | ab1112da4c1c8dc9c22486d0d69dca9cd1216cd2 (diff) | |
download | pfsense-3e1eec5850cdd50974190146459c9361fe156ff5.zip pfsense-3e1eec5850cdd50974190146459c9361fe156ff5.tar.gz |
Allow for selection of a gateway group as a interface to monitor
Redmine ticket #1965
-rwxr-xr-x | usr/local/www/services_dyndns.php | 26 | ||||
-rw-r--r-- | usr/local/www/services_dyndns_edit.php | 20 |
2 files changed, 34 insertions, 12 deletions
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php index 7953331..14402c9 100755 --- a/usr/local/www/services_dyndns.php +++ b/usr/local/www/services_dyndns.php @@ -105,7 +105,7 @@ include("head.inc"); <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td width="5%" class="listhdrr"></td> + <td width="5%" class="listhdrr"><?=gettext("Interface");?></td> <td width="15%" class="listhdrr"><?=gettext("Service");?></td> <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td> <td width="20%" class="listhdrr"><?=gettext("Cached IP");?></td> @@ -115,13 +115,23 @@ include("head.inc"); <?php $i = 0; foreach ($a_dyndns as $dyndns): ?> <tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$i;?>'"> <td class="listlr"> - <?php $iflist = get_configured_interface_with_descr(); - foreach ($iflist as $if => $ifdesc): - if ($dyndns['interface'] == $if): ?> - <?=$ifdesc; break;?> - <?php endif; endforeach; ?> + <?php $iflist = get_configured_interface_with_descr(); + foreach ($iflist as $if => $ifdesc) { + if ($dyndns['interface'] == $if) { + echo "{$ifdesc}"; + break; + } + } + $groupslist = return_gateway_groups_array(); + foreach ($groupslist as $name => $group) { + if ($dyndns['interface'] == $name) { + echo "{$name}"; + break; + } + } + ?> </td> - <td class="listlr"> + <td class="listr"> <?php $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker, SelfHost, Route 53, Custom"); $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker selfhost route53 custom"); @@ -135,7 +145,7 @@ include("head.inc"); <td class="listr"> <?=htmlspecialchars($dyndns['host']);?> </td> - <td class="listlr"> + <td class="listr"> <?php $filename = "{$g['conf_path']}/dyndns_{$if}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache"; $ipaddr = dyndnsCheckIP($if); diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php index 596dee7..93fc744 100644 --- a/usr/local/www/services_dyndns_edit.php +++ b/usr/local/www/services_dyndns_edit.php @@ -230,10 +230,22 @@ function _onTypeChange(type){ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td> <td width="78%" class="vtable"> <select name="interface" class="formselect" id="interface"> - <?php $iflist = get_configured_interface_with_descr(); - foreach ($iflist as $if => $ifdesc):?> - <option value="<?=$if;?>" <?php if ($pconfig['interface'] == $if) echo "selected";?>><?=$ifdesc;?></option> - <?php endforeach; ?> + <?php + $iflist = get_configured_interface_with_descr(); + foreach ($iflist as $if => $ifdesc) { + echo "<option value=\"{$if}\""; + if ($pconfig['interface'] == $if) + echo "selected"; + echo ">{$ifdesc}</option>\n"; + } + $grouplist = return_gateway_groups_array(); + foreach ($grouplist as $name => $group) { + echo "<option value=\"{$name}\""; + if ($pconfig['interface'] == $name) + echo "selected"; + echo ">GW Group {$name}</option>\n"; + } + ?> </select> </td> </td> |