mirror of https://github.com/Aidaho12/haproxy-wi
parent
3c76043935
commit
d0671d8a40
22
app/add.py
22
app/add.py
|
@ -111,9 +111,27 @@ if form.getvalue('mode') is not None:
|
|||
cookie = " cookie "+form.getvalue('cookie_name')
|
||||
if form.getvalue('cookie_domain'):
|
||||
cookie += " domain "+form.getvalue('cookie_domain')
|
||||
cookie += " "+form.getvalue('rewrite')+" "+form.getvalue('nocache')+" "+form.getvalue('postonly')+"\n"
|
||||
if form.getvalue('rewrite'):
|
||||
rewrite = form.getvalue('rewrite')
|
||||
else:
|
||||
rewrite = ""
|
||||
if form.getvalue('nocache'):
|
||||
nocache = form.getvalue('nocache')
|
||||
else:
|
||||
nocache = ""
|
||||
if form.getvalue('postonly'):
|
||||
postonly = form.getvalue('postonly')
|
||||
else:
|
||||
postonly = ""
|
||||
if form.getvalue('dynamic'):
|
||||
dynamic = form.getvalue('dynamic')
|
||||
else:
|
||||
dynamic = ""
|
||||
cookie += " "+rewrite+" "+nocache+" "+postonly+" "+dynamic+"\n"
|
||||
options_split += cookie
|
||||
|
||||
if form.getvalue('dynamic'):
|
||||
options_split += " dynamic-cookie-key " + form.getvalue('dynamic-cookie-key')+"\n"
|
||||
|
||||
if form.getvalue('servers') is not None:
|
||||
servers = form.getvalue('servers')
|
||||
i = servers.split("\n")
|
||||
|
|
|
@ -96,8 +96,13 @@
|
|||
</select>
|
||||
<label for="nocache" style="margin-top: 5px;" title="This option is recommended in conjunction with the insert mode when there is a cache between the client and HAProxy.">nocache</label>
|
||||
<input type="checkbox" name="nocache" value="nocache" id="nocache">
|
||||
<label for="postonly" style="margin-top: 5px;" title="This option ensures that cookie insertion will only be performed on responses to POST requests..">postonly</label>
|
||||
<label for="postonly" style="margin-top: 5px;" title="This option ensures that cookie insertion will only be performed on responses to POST requests.">postonly</label>
|
||||
<input type="checkbox" name="postonly" value="postonly" id="postonly">
|
||||
<label for="dynamic" style="margin-top: 5px;" title="Activate dynamic cookies. When used, a session cookie is dynamically created for each server.">dynamic</label>
|
||||
<input type="checkbox" name="dynamic" value="dynamic" id="dynamic">
|
||||
<span id="dynamic_div" style="display: none;">
|
||||
dynamic-cookie-key: <input type="text" placeholder="your-custom-key" name="dynamic-cookie-key" id="dynamic-cookie-key" class="form-control">
|
||||
</span>
|
||||
</span>
|
||||
<div id="options-listen-show-div" style="display: none;">
|
||||
<div class="tooltip">
|
||||
|
@ -329,6 +334,11 @@
|
|||
<input type="checkbox" name="nocache" value="nocache" id="nocache2">
|
||||
<label for="postonly2" style="margin-top: 5px;" title="This option ensures that cookie insertion will only be performed on responses to POST requests..">postonly</label>
|
||||
<input type="checkbox" name="postonly" value="postonly" id="postonly2">
|
||||
<label for="dynamic2" style="margin-top: 5px;" title="Activate dynamic cookies. When used, a session cookie is dynamically created for each server.">dynamic</label>
|
||||
<input type="checkbox" name="dynamic" value="dynamic" id="dynamic2">
|
||||
<span id="dynamic_div2" style="display: none;">
|
||||
dynamic-cookie-key: <input type="text" placeholder="your-custom-key" name="dynamic-cookie-key" id="dynamic-cookie-key2" class="form-control">
|
||||
</span>
|
||||
</span>
|
||||
<div id="options-backend-show-div" style="display: none;">
|
||||
<div style="font-size: 12px; padding-bottom: 10px;">
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 309 KiB After Width: | Height: | Size: 341 KiB |
|
@ -303,13 +303,7 @@ $( function() {
|
|||
} );
|
||||
$( "select" ).selectmenu();
|
||||
|
||||
var tooltips = $( "[title]" ).tooltip({
|
||||
position: {
|
||||
my: "left top",
|
||||
at: "right+5 top-25",
|
||||
collision: "none"
|
||||
}
|
||||
});
|
||||
var tooltips = $( "[title]" ).tooltip();
|
||||
$( "input[type=submit], button" ).button();
|
||||
$( "input[type=checkbox]" ).checkboxradio();
|
||||
$( ".controlgroup" ).controlgroup();
|
||||
|
@ -473,6 +467,7 @@ $( function() {
|
|||
} else {
|
||||
$("#cookie_name" ).attr('required',false);
|
||||
$("#cookie_div").hide( "fast" );
|
||||
$("#dynamic-cookie-key" ).attr('required',false);
|
||||
}
|
||||
});
|
||||
$( "#cookie2" ).click( function(){
|
||||
|
@ -482,6 +477,25 @@ $( function() {
|
|||
} else {
|
||||
$("#cookie_name2" ).attr('required',false);
|
||||
$("#cookie_div2").hide( "fast" );
|
||||
$("#dynamic-cookie-key2" ).attr('required',false);
|
||||
}
|
||||
});
|
||||
$( "#dynamic" ).click( function(){
|
||||
if ($('#dynamic').is(':checked')) {
|
||||
$("#dynamic-cookie-key" ).attr('required',true);
|
||||
$("#dynamic_div").show("slide", "fast" );
|
||||
} else {
|
||||
$("#dynamic-cookie-key" ).attr('required',false);
|
||||
$("#dynamic_div").hide("slide", "fast" );
|
||||
}
|
||||
});
|
||||
$( "#dynamic2" ).click( function(){
|
||||
if ($('#dynamic2').is(':checked')) {
|
||||
$("#dynamic-cookie-key2" ).attr('required',true);
|
||||
$("#dynamic_div2").show("slide", "fast" );
|
||||
} else {
|
||||
$("#dynamic-cookie-key2" ).attr('required',false);
|
||||
$("#dynamic_div2").hide("slide", "fast" );
|
||||
}
|
||||
});
|
||||
$( "#check-servers-backend" ).click( function(){
|
||||
|
|
Loading…
Reference in New Issue