aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-02-08 14:13:32 +1300
committerthompsa <andy@fud.org.nz>2010-02-08 14:13:32 +1300
commitc41399737ada9c52a25161dc35df3a66e3f32eb1 (patch)
treec72f360f6bda0cecb48ba4369e01f7711e8c427c
parentc24b5f93d9cc42d4529c58b59246ed71d83f1602 (diff)
downloadpfsense-packages-c41399737ada9c52a25161dc35df3a66e3f32eb1.tar.gz
pfsense-packages-c41399737ada9c52a25161dc35df3a66e3f32eb1.tar.bz2
pfsense-packages-c41399737ada9c52a25161dc35df3a66e3f32eb1.zip
Grey out disabled items.
-rwxr-xr-xconfig/haproxy-dev/haproxy_listeners.php22
-rwxr-xr-xconfig/haproxy-dev/haproxy_pools.php16
2 files changed, 29 insertions, 9 deletions
diff --git a/config/haproxy-dev/haproxy_listeners.php b/config/haproxy-dev/haproxy_listeners.php
index 5ffe0a09..f66b51bf 100755
--- a/config/haproxy-dev/haproxy_listeners.php
+++ b/config/haproxy-dev/haproxy_listeners.php
@@ -106,17 +106,26 @@ include("head.inc");
<td width="10%" class="listhdrr">Type</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>
+<?php
+ $i = 0;
+ foreach ($a_backend as $backend):
+ $textss = $textse = "";
+ if ($backend['status'] != 'active') {
+ $textss = "<span class=\"gray\">";
+ $textse = "</span>";
+ }
+?>
<tr>
<td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
- <?=$backend['name'];?>
+ <?=$textss . $backend['name'] . $textse;?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
- <?=$backend['desc'];?>
+ <?=$textss . $backend['desc'] . $textse;?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
<?php
+ echo $textss;
if($backend['extaddr'] == "any")
echo "0.0.0.0";
elseif($backend['extaddr'])
@@ -124,13 +133,14 @@ include("head.inc");
else
echo get_current_wan_address('wan');
echo ":" . $backend['port'];
+ echo $textse;
?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
- <?=$backend['type'];?>
+ <?=$textss . $backend['type'] . $textse;?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_listeners_edit.php?id=<?=$i;?>';">
- <?=$backend['pool'];?>
+ <?=$textss . $backend['pool'] . $textse;?>
</td>
<td class="list" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
diff --git a/config/haproxy-dev/haproxy_pools.php b/config/haproxy-dev/haproxy_pools.php
index ede6aea8..61e85273 100755
--- a/config/haproxy-dev/haproxy_pools.php
+++ b/config/haproxy-dev/haproxy_pools.php
@@ -107,16 +107,25 @@ include("head.inc");
<td width="30%" class="listhdrr">Listener</td>
<td width="10%" class="list"></td>
</tr>
- <?php $i = 0; foreach ($a_pools as $pool): ?>
+<?php
+ $i = 0;
+ foreach ($a_pools as $pool):
+ $textss = $textse = "";
+ if ($pool['status'] != 'active') {
+ $textss = "<span class=\"gray\">";
+ $textse = "</span>";
+ }
+?>
<tr>
<td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';">
- <?=$pool['name'];?>
+ <?=$textss . $pool['name'] . $textse;?>
</td>
<td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';">
- <?=$pool['status'];?>
+ <?=$textss . $pool['status'] . $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']) {
@@ -124,6 +133,7 @@ include("head.inc");
$sep = ", ";
}
}
+ echo $textse;
?>
</td>
<td class="list" nowrap>