Pavel Loginov 4 years ago
parent ee25c4b93e
commit a852d63129

@ -132,7 +132,7 @@
{% set values = {'2':'Redirect to','3':'Allow','4':'Deny'} %}
{{ select('listener_acl_then', name='acl_then', values=values, first='Choose action', class='force_close', disabled=false) }}
<b class="padding10">value</b>
{{ input('frontend_acl_then_value', name='acl_then_value', title="Required if \'then\' is \'Use backend\' or \'Redirect\'") }}
{{ input('listener_acl_then_value', name='acl_then_value', title="Required if \'then\' is \'Use backend\' or \'Redirect\'") }}
</p>
</span>
</div>
@ -496,6 +496,31 @@
</span>
</td>
</tr>
<tr class="advance">
<td class="addName" title="Access control list">ACL: </td>
<td class="addOption">
<span title="Add ACL" id="add_backend_acl" class="link add-server"></span>
<div id="backend_acl" style="display: none;">
<span id="backend_acl_for_cloning">
<b class="padding10">if</b>
{{ select('backend_acl_if', name='acl_if', values=if_values, first='Choose if', class='force_close', disabled=false) }}
<b class="padding10">value</b>
{{ input('backend_acl_value', name="acl_value") }}
<p style="border-bottom: 1px solid #ddd; padding-bottom: 10px;">
<b class="padding10">then</b>
{% set values = dict() %}
{% set values = {'2':'Redirect to','3':'Allow','4':'Deny'} %}
{{ select('backend_acl_then', name='acl_then', values=values, first='Choose action', class='force_close', disabled=false) }}
<b class="padding10">value</b>
{{ input('backend_acl_then_value', name='acl_then_value', title="Required if \'then\' is \'Use backend\' or \'Redirect\'") }}
</p>
</span>
</div>
<span>
<a class="link add-server" id="backend_add_acl" title="Add ACL" style="cursor: pointer; display: none;"></a>
</span>
</td>
</tr>
<tr class="advance">
<td class="addName"><span title="Cache support start 1.8 and latter">Web acceleration(?):</span></td>
<td class="addOption">
@ -618,7 +643,7 @@
</select>
<button id="ssl_key_view" title="View certificates">View</button>
</td>
<td>
<td colspan="2">
<span id="ajax-show-ssl"></span>
</td>
</tr>
@ -926,7 +951,8 @@
</table>
<div id="ajax"></div>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
In this section you can create and edit black and white lists. And after use them in the HAProxy configs or in the "Add proxy" pages
In this section you can create and edit black and white lists. And after use them in the HAProxy configs or in the "Add proxy" pages. Read how to use it in this
<a href="https://haproxy-wi.org/howto.py?howto=blacklist" title="How to create and manage blacklist" target="_blank">article</a>
</div>
<div id="dialog-confirm-cert-edit" title="View certificate " style="display: none;">
<span><b>Note:</b> Each new address must be specified from a new line</span>
@ -940,6 +966,7 @@
<input type="hidden" id="group" value="{{ group }}">
</div>
</div>
{% include 'include/del_confirm.html' %}
<script>
$( function() {
$( ".force_close" ).selectmenu({

@ -1079,15 +1079,20 @@ $( function() {
$("#backend_checks_http_domain").removeAttr('required');
}
});
$( "#add_listener_acl" ).on( "click", function() {
$( "#listener_acl" ).show();
$( "#listener_add_acl" ).show();
$( "#add_listener_acl" ).hide();
} );
$( "#add_frontend_acl" ).on( "click", function() {
$( "#frontend_acl" ).show();
$( "#frontend_add_acl" ).show();
$( "#add_frontend_acl" ).hide();
} );
$( "#add_listener_acl" ).on( "click", function() {
$( "#listener_acl" ).show();
$( "#listener_add_acl" ).show();
$( "#add_listener_acl" ).hide();
$( "#add_backend_acl" ).on( "click", function() {
$( "#backend_acl" ).show();
$( "#backend_add_acl" ).show();
$( "#add_backend_acl" ).hide();
} );
var acl_option = '<b class="padding10">if</b>\n' +
'<select name="acl_if">\n' +
@ -1123,6 +1128,12 @@ $( function() {
$('[name=acl_if]').selectmenu({width: 180});
$('[name=acl_then]').selectmenu({width: 180});
});
$("#backend_add_acl").click(function(){
$("#backend_acl").append(acl_option);
$( "select" ).selectmenu();
$('[name=acl_if]').selectmenu({width: 180});
$('[name=acl_then]').selectmenu({width: 180});
});
});
function resetProxySettings() {
$('[name=port]').val('');

Loading…
Cancel
Save