aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/www
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2015-10-24 20:45:43 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2015-10-24 20:45:43 +0200
commite3d4b3b7f7ae0eeb936f734f696d3f5bbfe2c762 (patch)
treedf55e7629d63f7bd60594d72a8af44d59f8a3017 /config/haproxy-devel/www
parent0382b3aba6bef1d6f0c92109ca39a01dc2ca46a0 (diff)
downloadpfsense-packages-e3d4b3b7f7ae0eeb936f734f696d3f5bbfe2c762.tar.gz
pfsense-packages-e3d4b3b7f7ae0eeb936f734f696d3f5bbfe2c762.tar.bz2
pfsense-packages-e3d4b3b7f7ae0eeb936f734f696d3f5bbfe2c762.zip
haproxy-devel, avoid possible config upgrade error messages, add actually writhing the configured frontend errorfiles to the config
Diffstat (limited to 'config/haproxy-devel/www')
-rw-r--r--config/haproxy-devel/www/haproxy_global.php6
-rw-r--r--config/haproxy-devel/www/haproxy_pools.php29
2 files changed, 27 insertions, 8 deletions
diff --git a/config/haproxy-devel/www/haproxy_global.php b/config/haproxy-devel/www/haproxy_global.php
index ff021be0..4902b966 100644
--- a/config/haproxy-devel/www/haproxy_global.php
+++ b/config/haproxy-devel/www/haproxy_global.php
@@ -143,7 +143,13 @@ if ($_POST) {
}
$a_mailers = $config['installedpackages']['haproxy']['email_mailers']['item'];
+if (!is_array($a_mailers)) {
+ $a_mailers = array();
+}
$a_resolvers = $config['installedpackages']['haproxy']['dns_resolvers']['item'];
+if (!is_array($a_resolvers)) {
+ $a_resolvers = array();
+}
$pconfig['enable'] = isset($config['installedpackages']['haproxy']['enable']);
$pconfig['terminate_on_reload'] = isset($config['installedpackages']['haproxy']['terminate_on_reload']);
diff --git a/config/haproxy-devel/www/haproxy_pools.php b/config/haproxy-devel/www/haproxy_pools.php
index deaeb46e..d98c7f41 100644
--- a/config/haproxy-devel/www/haproxy_pools.php
+++ b/config/haproxy-devel/www/haproxy_pools.php
@@ -102,18 +102,31 @@ haproxy_css();
foreach ($a_pools as $pool){
$fe_list = "";
$sep = "";
- foreach ($a_backends as $backend) {
- if($backend['backend_serverpool'] == $pool['name']) {
- $fe_list .= $sep . $backend['name'];
- $sep = ", ";
- }
+ foreach ($a_backends as $frontend) {
+ $used = false;
+ if($frontend['backend_serverpool'] == $pool['name']) {
+ $used = true;
+ }
+ $actions = $frontend['a_actionitems']['item'];
+ if (is_array($actions)) {
+ foreach($actions as $action) {
+ if ($action["action"] == "use_backend" && $action['use_backendbackend'] == $pool['name']) {
+ $used = true;
+ }
+ }
+ }
+ if ($used) {
+ $fe_list .= $sep . $frontend['name'];
+ $sep = ", ";
+ }
}
$textgray = $fe_list == "" ? " gray" : "";
- if (is_array($pool['ha_servers']))
+ if (is_array($pool['ha_servers'])) {
$count = count($pool['ha_servers']['item']);
- else
- $count = 0;
+ } else {
+ $count = 0;
+ }
?>
<tr class="<?=$textgray?>">
<td class="listlr" ondblclick="document.location='haproxy_pool_edit.php?id=<?=$i;?>';">