From e455a5327161728e87d8b214c0b31d9007d5e90a Mon Sep 17 00:00:00 2001 From: thompsa Date: Fri, 12 Mar 2010 17:43:00 +1300 Subject: Remove the 'status' from the backend pool and just show it disabled if no listeners are using it. --- config/haproxy-dev/haproxy.inc | 2 +- config/haproxy-dev/haproxy_pool_edit.php | 11 ----------- config/haproxy-dev/haproxy_pools.php | 33 +++++++++++++++++--------------- 3 files changed, 19 insertions(+), 27 deletions(-) (limited to 'config') diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc index 97a20faa..ed8da06d 100644 --- a/config/haproxy-dev/haproxy.inc +++ b/config/haproxy-dev/haproxy.inc @@ -245,7 +245,7 @@ function haproxy_find_acl($name) { } function write_backend($fd, $name, $pool, $frontend) { - if($pool['status'] != 'active' || !is_array($pool['ha_servers']['item'])) + if(!is_array($pool['ha_servers']['item'])) continue; fwrite ($fd, "backend " . $name . "\n"); diff --git a/config/haproxy-dev/haproxy_pool_edit.php b/config/haproxy-dev/haproxy_pool_edit.php index 6087e9d7..d25f0675 100755 --- a/config/haproxy-dev/haproxy_pool_edit.php +++ b/config/haproxy-dev/haproxy_pool_edit.php @@ -52,7 +52,6 @@ if (isset($id) && $a_pools[$id]) { $pconfig['checkinter'] = $a_pools[$id]['checkinter']; $pconfig['monitor_uri'] = $a_pools[$id]['monitor_uri']; $pconfig['cookie'] = $a_pools[$id]['cookie']; - $pconfig['status'] = $a_pools[$id]['status']; $pconfig['advanced'] = base64_decode($a_pools[$id]['advanced']); $pconfig['a_servers']=&$a_pools[$id]['ha_servers']['item']; } @@ -145,7 +144,6 @@ if ($_POST) { $pool['ha_servers']['item']=$a_servers; update_if_changed("name", $pool['name'], $_POST['name']); - update_if_changed("status", $pool['status'], $_POST['status']); update_if_changed("cookie", $pool['cookie'], $_POST['cookie']); update_if_changed("advanced", $pool['advanced'], base64_encode($_POST['advanced'])); update_if_changed("checkinter", $pool['checkinter'], $_POST['checkinter']); @@ -230,15 +228,6 @@ function clearcombo(){ size="16" maxlength="16"> - - Status - - - - Cookie 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"); - - + + "; $textse = ""; } + if (is_array($pool['ha_servers']['item'])) + $count = count($pool['ha_servers']['item']); + else + $count = 0; ?>
NameStatusListenerServersListener
- + - + -- cgit v1.2.3