{% extends "layout2.html" %} {% load i18n %} {% load static %} {% block css_include %} {% endblock %} {% block js_include %} {% endblock %} {% block content %} {% csrf_token %} {% if form.non_field_errors or save_error %} {# Print form errors correctly #} {% if form.non_field_errors %} {% translate "Form errors" %} {{ form.non_field_errors|safe }} {% endif %} {# If there is save/configuration errors #} {% if save_error %} {% translate "Advanced informations" %} {% translate "Message" %} {% translate "Configuration error" %} {{ save_error.0 }} {{ save_error.1 }} {% endif %} {% endif %} {% translate "General" %} {% translate "Servers" %} {% translate "TCP Options" %} {% translate "HTTP Options" %} {% translate "HTTP Headers" %} {% translate "Custom conf" %} {% translate "Enable backend" %} {{form.enabled}} {{form.enabled.errors|safe}} {% translate "Friendly name" %} {{form.name}} {{form.name.errors|safe}} {% translate "Mode" %} {{form.mode}} {{form.mode.errors|safe}} {% translate "Timeout connect" %} {{form.timeout_connect}} {{form.timeout_connect.errors|safe}} {% translate " ms" %} {% translate "Timeout server" %} {{form.timeout_server}} {{form.timeout_server.errors|safe}} {% translate " s" %} {% translate "Tags" %} {{form.tags}} {{form.tags.errors|safe}} {{ form.balancing_mode.label }} {{form.balancing_mode}} {{form.balancing_mode.errors|safe}} {{ form.http_backend_dir.label }} {{form.http_backend_dir}} {{form.http_backend_dir.errors|safe}} {{ form.balancing_param.label }} {{form.balancing_param}} {{form.balancing_param.errors|safe}} {% translate "Backend Net servers" %} {{ net_server_form.as_table_headers|safe }} {% for s in servers %} {% if s.mode.value == "net" %} {{ s.as_table_td|safe }} {% endif %} {% endfor %} {% translate "Add an Entry" %} {{ form.servers.errors|safe }} {% translate "Backend Unix servers" %} {{ unix_server_form.as_table_headers|safe }} {% for s in servers %} {% if s.mode.value == "unix" %} {{ s.as_table_td|safe }} {% endif %} {% endfor %} {% translate "Add an Entry" %} {{ form.servers.errors|safe }} {{form.enable_tcp_keep_alive.label}} {{form.enable_tcp_keep_alive}} {{form.enable_tcp_keep_alive.errors|safe}} {{form.tcp_keep_alive_timeout.label}} {{form.tcp_keep_alive_timeout}} {{form.tcp_keep_alive_timeout.errors|safe}} {{form.enable_tcp_health_check.label}} {{form.enable_tcp_health_check}} {{form.tcp_health_check_linger.label}} {{form.tcp_health_check_linger}} {{form.tcp_health_check_send.label}} {{form.tcp_health_check_send}} {{form.tcp_health_check_send.errors|safe}} {{form.tcp_health_check_expect_match.label}} {{form.tcp_health_check_expect_match}} {{form.tcp_health_check_expect_match.errors|safe}} {{form.tcp_health_check_expect_pattern}} {{form.tcp_health_check_expect_pattern.errors|safe}} {{form.tcp_health_check_interval.label}} {{form.tcp_health_check_interval}} {{form.tcp_health_check_interval.errors|safe}} {{form.accept_invalid_http_response.label}} {{form.accept_invalid_http_response}} {{form.accept_invalid_http_response.errors|safe}} {{form.http_forwardfor_header.label}} {{form.http_forwardfor_header}} {{form.http_forwardfor_header.errors|safe}} {{form.http_forwardfor_except.label}} {{form.http_forwardfor_except}} {{form.http_forwardfor_except.errors|safe}} {{form.enable_http_keep_alive.label}} {{form.enable_http_keep_alive}} {{form.enable_http_keep_alive.errors|safe}} {{form.http_keep_alive_timeout.label}} {{form.http_keep_alive_timeout}} {{form.http_keep_alive_timeout.errors|safe}} {{form.enable_http_health_check.label}} {{form.enable_http_health_check}} {{form.http_health_check_method}} {{form.http_health_check_method.errors|safe}} {{form.http_health_check_uri}} {{form.http_health_check_uri.errors|safe}} {{form.http_health_check_version}} {{form.http_health_check_version.errors|safe}} {{ http_health_check_headers_form.as_table_headers|safe }} {% for header in http_health_check_headers %} {{header.as_table_td|safe}} {% endfor %} {% translate "Add an Entry" %} {{ http_health_check_headers.errors|safe }} {{form.enable_http_health_check.errors|safe}} {{form.http_health_check_expect_match.label}} {{form.http_health_check_expect_match}} {{form.http_health_check_expect_match.errors|safe}} {{form.http_health_check_expect_pattern}} {{form.http_health_check_expect_pattern.errors|safe}} {{form.http_health_check_linger.label}} {{form.http_health_check_linger}} {{form.http_health_check_interval.label}} {{form.http_health_check_interval}} {{form.http_health_check_interval.errors|safe}} {{ header_form.as_table_headers|safe }} {% for h in headers %} {{ h.as_table_td|safe }} {% endfor %} {% translate "Add an Entry" %} {{ form.headers.errors|safe }} {% translate "HAProxy Backend Config" %} {{form.custom_haproxy_conf}} {{form.custom_haproxy_conf.errors|safe}} {% endblock %} {% block jquery_code %} if (!String.prototype.endsWith) { String.prototype.endsWith = function(searchString, position) { var subjectString = this.toString(); if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { position = subjectString.length; } position -= searchString.length; var lastIndex = subjectString.lastIndexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }; } //$(function() { /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); }); /* All events to refresh (re-apply) after a table is modified */ function refresh_table_events() { /* Function used to delete an object .btnDelete */ $('.btnDelete').on('click', function(e) { $(this).parent().parent().remove(); }); /* Re-initialize select2 objects */ $('.select2').select2(); /* Re-initialize Tag-Editor events */ /* Try to destroy old tag-editor elements */ try { $(".tag-editor-space").tagEditor('destroy'); } catch(e) {}; try { $(".tag-editor-comma").tagEditor('destroy'); } catch(e) {}; /* And re-add TagEditor behavior for tag-editor custom classes */ $(".tag-editor-space").tagEditor({ delimiter: ' ' }); $(".tag-editor-comma").tagEditor({ delimiter: ',' }); } /* Function used to auto-complete tagEditor */ function autoComplete(list, begin) { var result = Array(); var size_list = list.length; for( i=0 ; i
{{ save_error.0 }}
{{ save_error.1 }}