|
450 | 450 | {% do action_options.append('use_backend ' ~ acl_backend_data.name) %} |
451 | 451 | {% else %} |
452 | 452 | {% set action_enabled = '0' %} |
453 | | - # ERROR: missing parameters |
| 453 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
454 | 454 | {% endif %} |
455 | 455 | {% elif action_data.type == 'use_server' %} |
456 | 456 | {% if action_data.use_server|default("") != "" %} |
457 | 457 | {% set server_data = helpers.getUUID(action_data.use_server) %} |
458 | 458 | {% do action_options.append('use-server ' ~ server_data.name) %} |
459 | 459 | {% else %} |
460 | 460 | {% set action_enabled = '0' %} |
461 | | - # ERROR: missing parameters |
| 461 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
462 | 462 | {% endif %} |
463 | 463 | {% elif action_data.type == 'map_use_backend' %} |
464 | 464 | {# # First get the map file path #} |
|
484 | 484 | {% do action_options.append('use_backend %[req.hdr(host),' ~ mapfile_config ~ '(' ~ mapfile_path ~ defaultbackend_option ~ ')]') %} |
485 | 485 | {% else %} |
486 | 486 | {% set action_enabled = '0' %} |
487 | | - # ERROR: missing parameters |
| 487 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
488 | 488 | {% endif %} |
489 | 489 | {% elif action_data.type == 'fcgi_pass_header' %} |
490 | 490 | {% if action_data.fcgi_pass_header|default('') != '' %} |
491 | 491 | {% do action_options.append('pass-header ' ~ action_data.fcgi_pass_header) %} |
492 | 492 | {% else %} |
493 | 493 | {% set action_enabled = '0' %} |
494 | | - # ERROR: missing parameters |
| 494 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
495 | 495 | {% endif %} |
496 | 496 | {% elif action_data.type == 'fcgi_set_param' %} |
497 | 497 | {% if action_data.fcgi_set_param|default('') != '' %} |
498 | 498 | {% do action_options.append('set-param ' ~ action_data.fcgi_set_param) %} |
499 | 499 | {% else %} |
500 | 500 | {% set action_enabled = '0' %} |
501 | | - # ERROR: missing parameters |
| 501 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
502 | 502 | {% endif %} |
503 | 503 | {% elif action_data.type == 'http-after-response' %} |
504 | 504 | {% if action_data.http_after_response_action|default('') != '' %} |
|
508 | 508 | {% endif %} |
509 | 509 | {% else %} |
510 | 510 | {% set action_enabled = '0' %} |
511 | | - # ERROR: missing parameters |
| 511 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
512 | 512 | {% endif %} |
513 | 513 | {% elif action_data.type == 'http-request' %} |
514 | 514 | {% if action_data.http_request_action|default('') != '' %} |
|
528 | 528 | {% do action_options.append('http-request ' ~ action_keyword_data) %} |
529 | 529 | {% else %} |
530 | 530 | {% set action_enabled = '0' %} |
531 | | - # ERROR: missing parameters |
| 531 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
532 | 532 | {% endif %} |
533 | 533 | {% elif action_data.type == 'http-response' %} |
534 | 534 | {% if action_data.http_response_action|default('') != '' %} |
|
546 | 546 | {% do action_options.append('http-response ' ~ action_keyword_data) %} |
547 | 547 | {% else %} |
548 | 548 | {% set action_enabled = '0' %} |
549 | | - # ERROR: missing parameters |
| 549 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
550 | 550 | {% endif %} |
551 | 551 | {% elif action_data.type == 'monitor_fail' %} |
552 | 552 | {% if action_data.monitor_fail_uri|default("") != "" %} |
553 | 553 | {% do action_options.append('monitor-uri ' ~ action_data.monitor_fail_uri ~ '\n ') %} |
554 | 554 | {% do action_options.append('monitor fail') %} |
555 | 555 | {% else %} |
556 | 556 | {% set action_enabled = '0' %} |
557 | | - # ERROR: missing parameters |
| 557 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
558 | 558 | {% endif %} |
559 | 559 | {% elif action_data.type == 'tcp-request' %} |
560 | 560 | {% if action_data.tcp_request_action|default('') != '' %} |
|
574 | 574 | {% do action_options.append('tcp-request ' ~ action_keyword_data) %} |
575 | 575 | {% else %} |
576 | 576 | {% set action_enabled = '0' %} |
577 | | - # ERROR: missing parameters |
| 577 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
578 | 578 | {% endif %} |
579 | 579 | {% elif action_data.type == 'tcp-response' %} |
580 | 580 | {% if action_data.tcp_response_action|default('') != '' %} |
|
592 | 592 | {% do action_options.append('tcp-response ' ~ action_keyword_data) %} |
593 | 593 | {% else %} |
594 | 594 | {% set action_enabled = '0' %} |
595 | | - # ERROR: missing parameters |
| 595 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
596 | 596 | {% endif %} |
597 | 597 | {% elif action_data.type == 'compression' %} |
598 | 598 | {% set action_multiline = '1' %} |
|
622 | 622 | {% endif %} |
623 | 623 | {% else %} |
624 | 624 | {% set action_enabled = '0' %} |
625 | | - # ERROR: missing parameters |
| 625 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
626 | 626 | {% endif %} |
627 | 627 | {% elif action_data.type == 'custom' %} |
628 | 628 | {% if action_data.custom|default("") != "" %} |
629 | 629 | {% do action_options.append(action_data.custom) %} |
630 | 630 | {% else %} |
631 | 631 | {% set action_enabled = '0' %} |
632 | | - # ERROR: missing parameters |
| 632 | +{% do global_action_options.append('# ERROR: missing parameters') %} |
633 | 633 | {% endif %} |
634 | 634 | {% else %} |
635 | 635 | {% set action_enabled = '0' %} |
636 | | - # ERROR: unsupported rule type |
| 636 | +{% do global_action_options.append('# ERROR: unsupported rule type' ~ action_data.type) %} |
637 | 637 | {% endif %} |
638 | 638 | {# # Is this rule enabled in the GUI? #} |
639 | 639 | {% if action_data.enabled|default('') == '1' %} |
|
664 | 664 | {% do global_action_options.append(([action_options|join(join_char), acl_line]|join(' '))) %} |
665 | 665 | {% endif %} |
666 | 666 | {% else %} |
667 | | - # RULE INVALID: {{action_data.name}} |
| 667 | +{% do global_action_options.append('# RULE INVALID: ' + action_data.name) %} |
668 | 668 | {% endif %} |
669 | 669 | {% else %} |
670 | | - # RULE DISABLED: {{action_data.name}} |
| 670 | +{% do global_action_options.append('# RULE DISABLED: ' + action_data.name) %} |
671 | 671 | {% endif %} |
672 | 672 | {% else %} |
673 | | - # RULE INVALID: {{action_data.name}} |
674 | | - # CONDITIONS WITH ERRORS: {{acl_errors}} |
| 673 | +{% do global_action_options.append('# RULE INVALID: ' + action_data.name) %} |
| 674 | +{% do global_action_options.append('# CONDITIONS WITH ERRORS: ' + acl_errors) %} |
675 | 675 | {% endif %} |
676 | 676 | {% endfor %} |
677 | 677 |
|
|
0 commit comments