aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfig/haproxy-dev/haproxy_listeners.php20
-rwxr-xr-xconfig/haproxy-dev/haproxy_pools.php33
2 files changed, 23 insertions, 30 deletions
diff --git a/config/haproxy-dev/haproxy_listeners.php b/config/haproxy-dev/haproxy_listeners.php
index 3a8d6701..5ffe0a09 100755
--- a/config/haproxy-dev/haproxy_listeners.php
+++ b/config/haproxy-dev/haproxy_listeners.php
@@ -100,11 +100,12 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">Name</td>
- <td width="40%" class="listhdrr">Description</td>
+ <td width="20%" class="listhdrr">Name</td>
+ <td width="30%" class="listhdrr">Description</td>
+ <td width="20%" class="listhdrr">Address</td>
<td width="10%" class="listhdrr">Type</td>
- <td width="10%" class="listhdrr">Server pool</td>
- <td width="10%" class="list"></td>
+ <td width="10%" class="listhdrr">Server&nbsp;pool</td>
+ <td width="5%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_backend as $backend): ?>
<tr>
@@ -115,6 +116,17 @@ include("head.inc");
<?=$backend['desc'];?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
+<?php
+ if($backend['extaddr'] == "any")
+ echo "0.0.0.0";
+ elseif($backend['extaddr'])
+ echo $backend['extaddr'];
+ else
+ echo get_current_wan_address('wan');
+ echo ":" . $backend['port'];
+?>
+ </td>
+ <td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
<?=$backend['type'];?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
diff --git a/config/haproxy-dev/haproxy_pools.php b/config/haproxy-dev/haproxy_pools.php
index fbbb05b0..ede6aea8 100755
--- a/config/haproxy-dev/haproxy_pools.php
+++ b/config/haproxy-dev/haproxy_pools.php
@@ -103,45 +103,26 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30%" class="listhdrr">Name</td>
- <td width="30%" class="listhdrr">Server</td>
<td width="20%" class="listhdrr">Status</td>
<td width="30%" class="listhdrr">Listener</td>
<td width="10%" class="list"></td>
</tr>
- <?php $i = 0; foreach ($a_pools as $pool):
-
- foreach ($a_backends as $backend) {
- unset($listener);
- if($backend['pool'] == $pool['name']) {
- $listener = $backend;
- }
- }
- ?>
+ <?php $i = 0; foreach ($a_pools as $pool): ?>
<tr>
<td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';">
<?=$pool['name'];?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';">
-<?php
- if (is_array($listener)) {
- if ($listener['extaddr'])
- echo $listener['extaddr'];
- else
- echo "any";
- if ($listener['port'])
- echo ":" . $listener['port'];
- } else
- echo '-';
-?>
-
- </td>
- <td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';">
<?=$pool['status'];?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';">
<?php
- if (is_array($listener)) {
- echo $listener['name'];
+ $sep = "";
+ foreach ($a_backends as $backend) {
+ if($backend['pool'] == $pool['name']) {
+ echo $sep . $backend['name'];
+ $sep = ", ";
+ }
}
?>
</td>