aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy/haproxy_servers.php
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-15 09:19:17 -0500
committersullrich <sullrich@pfsense.org>2009-12-15 09:19:17 -0500
commit690ab2bd6b5974977f7067472ad1ceac5c9e61cd (patch)
treeabc3945058d805706b045b9323e7e109088c9bf0 /config/haproxy/haproxy_servers.php
parentdcef4b5ba15e3c157f4c3b0b6b6ca33ab78a554a (diff)
downloadpfsense-packages-690ab2bd6b5974977f7067472ad1ceac5c9e61cd.tar.gz
pfsense-packages-690ab2bd6b5974977f7067472ad1ceac5c9e61cd.tar.bz2
pfsense-packages-690ab2bd6b5974977f7067472ad1ceac5c9e61cd.zip
Show frontend port if not defined
Diffstat (limited to 'config/haproxy/haproxy_servers.php')
-rwxr-xr-xconfig/haproxy/haproxy_servers.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/config/haproxy/haproxy_servers.php b/config/haproxy/haproxy_servers.php
index ed4e0736..cacf995a 100755
--- a/config/haproxy/haproxy_servers.php
+++ b/config/haproxy/haproxy_servers.php
@@ -37,7 +37,9 @@ $d_haproxyconfdirty_path = $g['varrun_path'] . "/haproxy.conf.dirty";
if (!is_array($config['installedpackages']['haproxy']['ha_servers']['item'])) {
$config['installedpackages']['haproxy']['ha_servers']['item'] = array();
}
+
$a_server = &$config['installedpackages']['haproxy']['ha_servers']['item'];
+$a_backends = &$config['installedpackages']['haproxy']['ha_backends']['item'];
if ($_POST) {
$pconfig = $_POST;
@@ -113,7 +115,18 @@ include("head.inc");
<?=$server['name'];?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_servers_edit.php?id=<?=$i;?>';">
- <?=$server['address'] . ":". $server['port'];?>
+ <?=$server['address'] . ":"?>
+<?php
+ if($server['port']) {
+ echo $server['port'];
+ } else {
+ foreach ($a_backends as $backend) {
+ if($backend['name'] == $server['backend']) {
+ echo $backend['port'];
+ }
+ }
+ }
+?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_servers_edit.php?id=<?=$i;?>';">
<?=$server['status'];?>