summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2008-06-16 04:08:13 +0000
committerBill Marquette <billm@pfsense.org>2008-06-16 04:08:13 +0000
commit9c34711b785f9c1002f06c2848ff0530c4ca34f9 (patch)
tree43feac1dad1e6e56e4aec927dd593f3f2c94120d /usr
parentfcfd5f4ddeaf18a7171ed84858927f0c3bd9f449 (diff)
downloadpfsense-9c34711b785f9c1002f06c2848ff0530c4ca34f9.zip
pfsense-9c34711b785f9c1002f06c2848ff0530c4ca34f9.tar.gz
Backup pools should be drop downs now.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 88ee349..16737a9 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -72,12 +72,6 @@ if ($_POST) {
if(!is_ipaddr($_POST['ipaddr']))
$input_errors[] = "{$_POST['ipaddr']} is not a valid IP address.";
- if(!isset($_POST['sitedown']) || $_POST['sitedown'] == "")
- $input_errors[] = "Pool Down Server is required.";
-
- if(($_POST['sitedown'] != "") && (!is_ipaddr($_POST['sitedown'])))
- $input_errors[] = "{$_POST['sitedown']} is not a valid IP address.";
-
if (!$input_errors) {
$vsent = array();
if(isset($id) && $a_vs[$id])
@@ -170,8 +164,20 @@ include("head.inc");
<tr align="left">
<td width="22%" valign="top" class="vncellreq">Pool Down Server</td>
<td width="78%" class="vtable" colspan="2">
- <input name="sitedown" type="text" <?if(isset($pconfig['sitedown'])) echo "value=\"{$pconfig['sitedown']}\"";?> size="16" maxlength="16">
- <br><b>NOTE:</b> This is the server that clients will be redirected to if *ALL* servers in the pool are offline.
+ <select id="sitedown" name="sitedown">
+ <option value=""<?="selected" ? $pconfig['sitedown'] == '' : ''?>>none</option>
+ <?php
+ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
+ if ($config['load_balancer']['lbpool'][$i]['type'] == "server") {
+ $selected = "";
+ if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['sitedown'] )
+ $selected = " SELECTED";
+ echo "<option value=\"{$config['load_balancer']['lbpool'][$i]['name']}\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
+ }
+ }
+ ?>
+ </select>
+ <br><b>NOTE:</b> This is the server that clients will be redirected to if *ALL* servers in the pool are offline.
</td>
</tr>
<tr align="left">
OpenPOWER on IntegriCloud