mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
net/haproxy: respect order in error messages
This commit is contained in:
parent
713771e40d
commit
1846df1639
1 changed files with 18 additions and 18 deletions
|
|
@ -450,7 +450,7 @@
|
|||
{% do action_options.append('use_backend ' ~ acl_backend_data.name) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'use_server' %}
|
||||
{% if action_data.use_server|default("") != "" %}
|
||||
|
|
@ -458,7 +458,7 @@
|
|||
{% do action_options.append('use-server ' ~ server_data.name) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'map_use_backend' %}
|
||||
{# # First get the map file path #}
|
||||
|
|
@ -484,21 +484,21 @@
|
|||
{% do action_options.append('use_backend %[req.hdr(host),' ~ mapfile_config ~ '(' ~ mapfile_path ~ defaultbackend_option ~ ')]') %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'fcgi_pass_header' %}
|
||||
{% if action_data.fcgi_pass_header|default('') != '' %}
|
||||
{% do action_options.append('pass-header ' ~ action_data.fcgi_pass_header) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'fcgi_set_param' %}
|
||||
{% if action_data.fcgi_set_param|default('') != '' %}
|
||||
{% do action_options.append('set-param ' ~ action_data.fcgi_set_param) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'http-after-response' %}
|
||||
{% if action_data.http_after_response_action|default('') != '' %}
|
||||
|
|
@ -508,7 +508,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'http-request' %}
|
||||
{% if action_data.http_request_action|default('') != '' %}
|
||||
|
|
@ -528,7 +528,7 @@
|
|||
{% do action_options.append('http-request ' ~ action_keyword_data) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'http-response' %}
|
||||
{% if action_data.http_response_action|default('') != '' %}
|
||||
|
|
@ -546,7 +546,7 @@
|
|||
{% do action_options.append('http-response ' ~ action_keyword_data) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'monitor_fail' %}
|
||||
{% if action_data.monitor_fail_uri|default("") != "" %}
|
||||
|
|
@ -554,7 +554,7 @@
|
|||
{% do action_options.append('monitor fail') %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'tcp-request' %}
|
||||
{% if action_data.tcp_request_action|default('') != '' %}
|
||||
|
|
@ -574,7 +574,7 @@
|
|||
{% do action_options.append('tcp-request ' ~ action_keyword_data) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'tcp-response' %}
|
||||
{% if action_data.tcp_response_action|default('') != '' %}
|
||||
|
|
@ -592,7 +592,7 @@
|
|||
{% do action_options.append('tcp-response ' ~ action_keyword_data) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'compression' %}
|
||||
{% set action_multiline = '1' %}
|
||||
|
|
@ -622,18 +622,18 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'custom' %}
|
||||
{% if action_data.custom|default("") != "" %}
|
||||
{% do action_options.append(action_data.custom) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% do global_action_options.append('# ERROR: missing parameters') %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: unsupported rule type
|
||||
{% do global_action_options.append('# ERROR: unsupported rule type' ~ action_data.type) %}
|
||||
{% endif %}
|
||||
{# # Is this rule enabled in the GUI? #}
|
||||
{% if action_data.enabled|default('') == '1' %}
|
||||
|
|
@ -664,14 +664,14 @@
|
|||
{% do global_action_options.append(([action_options|join(join_char), acl_line]|join(' '))) %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
# RULE INVALID: {{action_data.name}}
|
||||
{% do global_action_options.append('# RULE INVALID: ' + action_data.name) %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
# RULE DISABLED: {{action_data.name}}
|
||||
{% do global_action_options.append('# RULE DISABLED: ' + action_data.name) %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
# RULE INVALID: {{action_data.name}}
|
||||
# CONDITIONS WITH ERRORS: {{acl_errors}}
|
||||
{% do global_action_options.append('# RULE INVALID: ' + action_data.name) %}
|
||||
{% do global_action_options.append('# CONDITIONS WITH ERRORS: ' + acl_errors) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue