From 5f53260a2da559c71a5de91dc5c6a332e664b24e Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 30 Apr 2010 14:32:25 +0000 Subject: 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. --- usr/local/www/system_gateway_groups_edit.php | 4 ++-- usr/local/www/system_gateways_edit.php | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'usr/local') 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 " {$name} - {$gateway['descr']}
"; + echo " {$name} - {$gateway['descr']}
"; } ?>
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) { + Weight + + + Weight for this gateway when used in a Gateway Group.
+ + + Description -- cgit v1.1