diff options
author | thompsa <andy@fud.org.nz> | 2010-03-12 17:43:00 +1300 |
---|---|---|
committer | thompsa <andy@fud.org.nz> | 2010-03-12 17:43:00 +1300 |
commit | e455a5327161728e87d8b214c0b31d9007d5e90a (patch) | |
tree | c56adb074409cf917d0822c6c8ae437ec02e78ac /config/haproxy-dev/haproxy_pools.php | |
parent | 155c3634e0e4e6a4fc7b3488bdf032a1661e8779 (diff) | |
download | pfsense-packages-e455a5327161728e87d8b214c0b31d9007d5e90a.tar.gz pfsense-packages-e455a5327161728e87d8b214c0b31d9007d5e90a.tar.bz2 pfsense-packages-e455a5327161728e87d8b214c0b31d9007d5e90a.zip |
Remove the 'status' from the backend pool and just show it disabled if
no listeners are using it.
Diffstat (limited to 'config/haproxy-dev/haproxy_pools.php')
-rwxr-xr-x | config/haproxy-dev/haproxy_pools.php | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/config/haproxy-dev/haproxy_pools.php b/config/haproxy-dev/haproxy_pools.php index 78a1fdff..c5adc70b 100755 --- a/config/haproxy-dev/haproxy_pools.php +++ b/config/haproxy-dev/haproxy_pools.php @@ -103,38 +103,41 @@ include("head.inc"); <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="30%" class="listhdrr">Name</td> - <td width="20%" class="listhdrr">Status</td> - <td width="30%" class="listhdrr">Listener</td> + <td width="10%" class="listhdrr">Servers</td> + <td width="40%" class="listhdrr">Listener</td> <td width="10%" class="list"></td> </tr> <?php $i = 0; foreach ($a_pools as $pool): + + $fe_list = ""; + $sep = ""; + foreach ($a_backends as $backend) { + if($backend['pool'] == $pool['name']) { + $fe_list .= $sep . $backend['name']; + $sep = ", "; + } + } $textss = $textse = ""; - if ($pool['status'] != 'active') { + if ($fe_list == "") { $textss = "<span class=\"gray\">"; $textse = "</span>"; } + if (is_array($pool['ha_servers']['item'])) + $count = count($pool['ha_servers']['item']); + else + $count = 0; ?> <tr> <td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';"> <?=$textss . $pool['name'] . $textse;?> </td> <td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';"> - <?=$textss . $pool['status'] . $textse;?> + <?=$textss . $count . $textse;?> </td> <td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';"> -<?php - echo $textss; - $sep = ""; - foreach ($a_backends as $backend) { - if($backend['pool'] == $pool['name']) { - echo $sep . $backend['name']; - $sep = ", "; - } - } - echo $textse; -?> + <?=$textss . $fe_list . $textse;?> </td> <td class="list" nowrap> <table border="0" cellspacing="0" cellpadding="1"> |