aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-12-22 15:11:40 -0500
committerScott Ullrich <sullrich@pfsense.org>2009-12-22 15:11:57 -0500
commit86ede4fa40adc1ab0d502d74f5dbb7db8f04e273 (patch)
tree2225d73f078f486e76025caf18c67016ffa32b99
parent60145048a3f9fc1aaf983a9bec4637896763298e (diff)
downloadpfsense-packages-86ede4fa40adc1ab0d502d74f5dbb7db8f04e273.tar.gz
pfsense-packages-86ede4fa40adc1ab0d502d74f5dbb7db8f04e273.tar.bz2
pfsense-packages-86ede4fa40adc1ab0d502d74f5dbb7db8f04e273.zip
Adding advanced pass thru box for server entries
-rw-r--r--config/haproxy/haproxy.inc6
-rwxr-xr-xconfig/haproxy/haproxy_servers_edit.php10
2 files changed, 15 insertions, 1 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 6bb3242b..f8b5efbf 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -227,8 +227,12 @@ function haproxy_configure() {
} else {
$server_ports[] = $server['port'];
}
+ if($server['advanced'])
+ $advanced_txt = " " . $server['advanced'];
+ else
+ $advanced_txt = "";
foreach($server_ports as $pport)
- fwrite ($fd, "\tserver\t\t\t" . $server['name'] . " " . $server['address'].":" . $pport . " $cookie " . " check inter 1000 weight " . $server['weight'] . "\n");
+ fwrite ($fd, "\tserver\t\t\t" . $server['name'] . " " . $server['address'].":" . $pport . " $cookie " . " check inter 1000 weight " . $server['weight'] . "{$advanced_txt}\n");
}
}
}
diff --git a/config/haproxy/haproxy_servers_edit.php b/config/haproxy/haproxy_servers_edit.php
index 8125bf6b..db44dc72 100755
--- a/config/haproxy/haproxy_servers_edit.php
+++ b/config/haproxy/haproxy_servers_edit.php
@@ -53,6 +53,7 @@ if (isset($id) && $a_server[$id]) {
$pconfig['weight'] = $a_server[$id]['weight'];
$pconfig['cookie'] = $a_server[$id]['cookie'];
$pconfig['status'] = $a_server[$id]['status'];
+ $pconfig['advanced'] = $a_server[$id]['advanced'];
}
$changedesc = "Services: HAProxy: Servers: ";
@@ -122,6 +123,7 @@ if ($_POST) {
update_if_changed("weight", $server['weight'], $_POST['weight']);
update_if_changed("status", $server['status'], $_POST['status']);
update_if_changed("address", $server['address'], $_POST['address']);
+ update_if_changed("advanced", $server['advanced'], $_POST['advanced']);
if (isset($id) && $a_server[$id]) {
$a_server[$id] = $server;
@@ -297,6 +299,14 @@ function clearcombo(){
</td>
</tr>
<tr align="left">
+ <td width="22%" valign="top" class="vncellreq">Advanced pass thru</td>
+ <td width="78%" class="vtable" colspan="2">
+ <textarea name='advanced' rows="4" cols="70" id='advanced'><?php echo $pconfig['advanced']; ?></textarea>
+ <br/>
+ NOTE: paste text into this box that you would like to pass thru.
+ </td>
+ </tr>
+ <tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="Submit" type="submit" class="formbtn" value="Save">