summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-04-30 14:32:25 +0000
committerErmal <eri@pfsense.org>2010-04-30 14:32:25 +0000
commit5f53260a2da559c71a5de91dc5c6a332e664b24e (patch)
treeecc42481ed81b7349b47bdf5b45f3cfca3da08cc /usr
parent05f3ffa431cf622828d311dd9b9b8ea49f9d1006 (diff)
downloadpfsense-5f53260a2da559c71a5de91dc5c6a332e664b24e.zip
pfsense-5f53260a2da559c71a5de91dc5c6a332e664b24e.tar.gz
Allow for each gateway a weight to be choosen if the gateway has to be used in Gateway groups. This will create that many entries in the route-to statement as the weight says.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php4
-rwxr-xr-xusr/local/www/system_gateways_edit.php18
2 files changed, 20 insertions, 2 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php
index 57aaf97..6d0539b 100755
--- a/usr/local/www/system_gateway_groups_edit.php
+++ b/usr/local/www/system_gateway_groups_edit.php
@@ -168,10 +168,10 @@ include("head.inc");
$itemsplit = explode("|", $item);
if($itemsplit[0] == $name) {
$selected[$itemsplit[1]] = "selected";
+ break;
} else {
$selected[0] = "selected";
}
-
}
echo "<select name='{$name}' class='formfldselect' id='{$name}'>";
echo "<option value='0' $selected[0] >Never</option>";
@@ -180,7 +180,7 @@ include("head.inc");
echo "<option value='3' $selected[3] >Tier 3</option>";
echo "<option value='4' $selected[4] >Tier 4</option>";
echo "<option value='5' $selected[5] >Tier 5</option>";
- echo "</select> <strong>{$name} - {$gateway['descr']}</strong><br/>";
+ echo "</select> <strong>{$name} - {$gateway['descr']}</strong><br />";
}
?>
<br/><span class="vexpl">
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index daa2abf..60b8700 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -64,6 +64,7 @@ if (isset($_GET['dup'])) {
if (isset($id) && $a_gateways[$id]) {
$pconfig['name'] = $a_gateways[$id]['name'];
+ $pconfig['weight'] = $a_gateways[$id]['weight'];
$pconfig['interface'] = $a_gateways[$id]['interface'];
$pconfig['friendlyiface'] = $a_gateways[$id]['friendlyiface'];
$pconfig['gateway'] = $a_gateways[$id]['gateway'];
@@ -168,6 +169,7 @@ if ($_POST) {
$gateway = array();
$gateway['interface'] = $_POST['interface'];
$gateway['name'] = $_POST['name'];
+ $gateway['weight'] = $_POST['weight'];
$gateway['gateway'] = $_POST['gateway'];
$gateway['descr'] = $_POST['descr'];
if(is_ipaddr($_POST['monitor'])) {
@@ -308,6 +310,22 @@ function enable_change(obj) {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Weight</td>
+ <td width="78%" class="vtable">
+ <select name='weight' class='formfldselect' id='weight'>
+ <?php
+ for ($i = 1; $i < 6; $i++) {
+ $selected = "";
+ if ($pconfig['weight'] == $i)
+ $selected = "selected";
+ echo "<option value='{$i}' {$selected} >{$i}</option>";
+ }
+ ?>
+ </select>
+ <strong>Weight for this gateway when used in a Gateway Group.</strong> <br />
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell">Description</td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
OpenPOWER on IntegriCloud