mirror of https://github.com/Aidaho12/haproxy-wi
parent
28eaa9d940
commit
1ba2183618
|
@ -305,7 +305,7 @@ elif form.getvalue('mode') is not None:
|
||||||
try:
|
try:
|
||||||
port_check_val = port_check[i]
|
port_check_val = port_check[i]
|
||||||
except Exception:
|
except Exception:
|
||||||
port_check_val = port
|
port_check_val = server_port[i]
|
||||||
|
|
||||||
servers_split += " server {0} {0}:{1}{2} port {6} maxconn {5} {3} {4} \n".format(
|
servers_split += " server {0} {0}:{1}{2} port {6} maxconn {5} {3} {4} \n".format(
|
||||||
server, server_port[i], check, send_proxy_param, backup_param, maxconn_val, port_check_val
|
server, server_port[i], check, send_proxy_param, backup_param, maxconn_val, port_check_val
|
||||||
|
|
|
@ -3269,10 +3269,11 @@ def select_user_services(user_id):
|
||||||
def update_user_services(services, user_id):
|
def update_user_services(services, user_id):
|
||||||
try:
|
try:
|
||||||
User.update(user_services=services).where(User.user_id == user_id).execute()
|
User.update(user_services=services).where(User.user_id == user_id).execute()
|
||||||
return True
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
out_error(e)
|
out_error(e)
|
||||||
return False
|
return False
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def insert_or_update_service_setting(server_id, service, setting, value):
|
def insert_or_update_service_setting(server_id, service, setting, value):
|
||||||
|
|
|
@ -69,13 +69,19 @@ def update_user():
|
||||||
if form.getvalue('role'):
|
if form.getvalue('role'):
|
||||||
role_id = int(form.getvalue('role'))
|
role_id = int(form.getvalue('role'))
|
||||||
if roxywi_auth.is_admin(level=role_id):
|
if roxywi_auth.is_admin(level=role_id):
|
||||||
sql.update_user(new_user, email, role_id, user_id, activeuser)
|
try:
|
||||||
|
sql.update_user(new_user, email, role_id, user_id, activeuser)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
sql.update_user_role(user_id, group_id, role_id)
|
sql.update_user_role(user_id, group_id, role_id)
|
||||||
roxywi_common.logging(new_user, ' has been updated user ', roxywi=1, login=1)
|
roxywi_common.logging(new_user, ' has been updated user ', roxywi=1, login=1)
|
||||||
else:
|
else:
|
||||||
roxywi_common.logging(new_user, ' tried to privilege escalation', roxywi=1, login=1)
|
roxywi_common.logging(new_user, ' tried to privilege escalation', roxywi=1, login=1)
|
||||||
else:
|
else:
|
||||||
sql.update_user_from_admin_area(new_user, email, user_id, activeuser)
|
try:
|
||||||
|
sql.update_user_from_admin_area(new_user, email, user_id, activeuser)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
roxywi_common.logging(new_user, ' has been updated user ', roxywi=1, login=1)
|
roxywi_common.logging(new_user, ' has been updated user ', roxywi=1, login=1)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -806,13 +806,16 @@ if form.getvalue('newgroup') is not None:
|
||||||
if newgroup is None:
|
if newgroup is None:
|
||||||
print(error_mess)
|
print(error_mess)
|
||||||
else:
|
else:
|
||||||
if sql.add_group(newgroup, desc):
|
try:
|
||||||
env = Environment(loader=FileSystemLoader('templates/ajax/'), autoescape=True)
|
if sql.add_group(newgroup, desc):
|
||||||
template = env.get_template('/new_group.html')
|
env = Environment(loader=FileSystemLoader('templates/ajax/'), autoescape=True)
|
||||||
|
template = env.get_template('/new_group.html')
|
||||||
|
|
||||||
output_from_parsed_template = template.render(groups=sql.select_groups(group=newgroup))
|
output_from_parsed_template = template.render(groups=sql.select_groups(group=newgroup))
|
||||||
print(output_from_parsed_template)
|
print(output_from_parsed_template)
|
||||||
roxywi_common.logging('Roxy-WI server', f'A new group {newgroup} has been created', roxywi=1, login=1)
|
roxywi_common.logging('Roxy-WI server', f'A new group {newgroup} has been created', roxywi=1, login=1)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
if form.getvalue('groupdel') is not None:
|
if form.getvalue('groupdel') is not None:
|
||||||
import modules.roxywi.group as group_mod
|
import modules.roxywi.group as group_mod
|
||||||
|
@ -2251,7 +2254,6 @@ if act == 'showListOfVersion':
|
||||||
service = common.checkAjaxInput(form.getvalue('service'))
|
service = common.checkAjaxInput(form.getvalue('service'))
|
||||||
configver = common.checkAjaxInput(form.getvalue('configver'))
|
configver = common.checkAjaxInput(form.getvalue('configver'))
|
||||||
for_delver = common.checkAjaxInput(form.getvalue('for_delver'))
|
for_delver = common.checkAjaxInput(form.getvalue('for_delver'))
|
||||||
style = common.checkAjaxInput(form.getvalue('style'))
|
|
||||||
users = sql.select_users()
|
users = sql.select_users()
|
||||||
service_desc = sql.select_service(service)
|
service_desc = sql.select_service(service)
|
||||||
lang = roxywi_common.get_user_lang()
|
lang = roxywi_common.get_user_lang()
|
||||||
|
@ -2282,7 +2284,6 @@ if act == 'showListOfVersion':
|
||||||
for_delver=for_delver,
|
for_delver=for_delver,
|
||||||
configs=configs,
|
configs=configs,
|
||||||
users=users,
|
users=users,
|
||||||
style=style,
|
|
||||||
lang=lang)
|
lang=lang)
|
||||||
print(template)
|
print(template)
|
||||||
|
|
||||||
|
|
|
@ -696,7 +696,7 @@
|
||||||
<span title="{{lang.add_page.paste_cert_desc}}" class="help_cursor">{{lang.add_page.desc.paste_cert}}</span>
|
<span title="{{lang.add_page.paste_cert_desc}}" class="help_cursor">{{lang.add_page.desc.paste_cert}}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="width: 50%;">
|
<tr>
|
||||||
<td class="first-collumn padding10" valign="top" style="padding-top: 15px;">
|
<td class="first-collumn padding10" valign="top" style="padding-top: 15px;">
|
||||||
<select required id="serv4">
|
<select required id="serv4">
|
||||||
<option disabled selected>------</option>
|
<option disabled selected>------</option>
|
||||||
|
@ -1012,7 +1012,7 @@
|
||||||
{{lang.words.name|title()}}: {{ input('new_blacklist_name') }}
|
{{lang.words.name|title()}}: {{ input('new_blacklist_name') }}
|
||||||
<button onclick="createList('black')">{{lang.words.create|title()}}</button>
|
<button onclick="createList('black')">{{lang.words.create|title()}}</button>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10 first-collumn">
|
<td class="first-collumn">
|
||||||
<select required name="serv-black-list" id="serv-black-list">
|
<select required name="serv-black-list" id="serv-black-list">
|
||||||
<option disabled selected>------</option>
|
<option disabled selected>------</option>
|
||||||
<option value="all">{{lang.words.all|title()}}</option>
|
<option value="all">{{lang.words.all|title()}}</option>
|
||||||
|
@ -1043,7 +1043,7 @@
|
||||||
{{lang.words.name|title()}}: {{ input('new_whitelist_name') }}
|
{{lang.words.name|title()}}: {{ input('new_whitelist_name') }}
|
||||||
<button onclick="createList('white')">{{lang.words.create|title()}}</button>
|
<button onclick="createList('white')">{{lang.words.create|title()}}</button>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10 first-collumn">
|
<td class="first-collumn">
|
||||||
<select required name="serv-white-list" id="serv-white-list">
|
<select required name="serv-white-list" id="serv-white-list">
|
||||||
<option disabled selected>------</option>
|
<option disabled selected>------</option>
|
||||||
<option value="all">{{lang.words.all|title()}}</option>
|
<option value="all">{{lang.words.all|title()}}</option>
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
<td class="padding10 first-collumn">
|
<td class="padding10 first-collumn">
|
||||||
{{lang.words.actions|title()}}
|
{{lang.words.actions|title()}}
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10">{{lang.words.version|title()}}</td>
|
<td class="first-collumn">{{lang.words.version|title()}}</td>
|
||||||
<td style="width: 100%">{{lang.words.desc|title()}}</td>
|
<td style="width: 100%">{{lang.words.desc|title()}}</td>
|
||||||
<td><span onclick="loadServices()" class="refresh" title="{{lang.words.reload|title()}} {{lang.words.services}}"></span></td>
|
<td><span onclick="loadServices()" class="refresh" title="{{lang.words.reload|title()}} {{lang.words.services}}"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="overviewHead">
|
<tr class="overviewHead">
|
||||||
<td class="padding10 first-collumn" style="width: 25%;">{{lang.words.service|title()}}</td>
|
<td class="padding10 first-collumn" style="width: 25%;">{{lang.words.service|title()}}</td>
|
||||||
<td class="padding10" style="width: 10%">{{lang.words.current2|title()}} {{lang.words.version}}</td>
|
<td class="first-collumn" style="width: 10%">{{lang.words.current2|title()}} {{lang.words.version}}</td>
|
||||||
<td class="padding10" style="width: 10%">{{lang.words.latest|title()}} {{lang.words.version}}</td>
|
<td class="padding10" style="width: 10%">{{lang.words.latest|title()}} {{lang.words.version}}</td>
|
||||||
<td style="width: 10%"></td>
|
<td style="width: 10%"></td>
|
||||||
<td style="width: 100%">{{lang.words.desc|title()}}</td>
|
<td style="width: 100%">{{lang.words.desc|title()}}</td>
|
||||||
|
|
|
@ -364,10 +364,9 @@
|
||||||
</div>
|
</div>
|
||||||
{% if configver %}
|
{% if configver %}
|
||||||
<br>
|
<br>
|
||||||
<center>
|
|
||||||
{% if role <= 3 %}
|
{% if role <= 3 %}
|
||||||
{% if not is_serv_protected or role <= 2 %}
|
{% if not is_serv_protected or role <= 2 %}
|
||||||
<form action="versions.py?service={{service}}" method="post">
|
<form action="versions.py?service={{service}}" method="post" class="left-space">
|
||||||
<input type="hidden" value="{{serv}}" name="serv">
|
<input type="hidden" value="{{serv}}" name="serv">
|
||||||
<input type="hidden" value="{{configver}}" name="configver">
|
<input type="hidden" value="{{configver}}" name="configver">
|
||||||
<input type="hidden" value="1" name="config">
|
<input type="hidden" value="1" name="config">
|
||||||
|
@ -382,7 +381,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="alert alert-info"><b>{{lang.words.note|title()}}:</b> {{lang.phrases.master_slave|title()}}</div>
|
<div class="alert alert-info"><b>{{lang.words.note|title()}}:</b> {{lang.phrases.master_slave|title()}}</div>
|
||||||
</center>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script>
|
<script>
|
||||||
{% if role <= 3 %}
|
{% if role <= 3 %}
|
||||||
|
|
|
@ -1,197 +1,147 @@
|
||||||
{% import 'languages/'+lang|default('en')+'.html' as lang1 %}
|
{% import 'languages/'+lang|default('en')+'.html' as lang1 %}
|
||||||
{% from 'include/input_macros.html' import copy_to_clipboard %}
|
{% from 'include/input_macros.html' import copy_to_clipboard %}
|
||||||
{% if style == 'new' %}
|
{% if for_delver == '1' %}
|
||||||
{% if for_delver == '1' %}
|
<script>
|
||||||
<script>
|
$(document).ready(function() {
|
||||||
$(document).ready(function() {
|
$('#table_version').on('page.dt')
|
||||||
$('#table_version').on('page.dt')
|
.DataTable( {
|
||||||
.DataTable( {
|
"pageLength": 25,
|
||||||
"pageLength": 25,
|
"order": [ 5, "desc" ],
|
||||||
"order": [ 5, "desc" ],
|
stateSave: true,
|
||||||
stateSave: true,
|
"columnDefs": [
|
||||||
"columnDefs": [
|
{
|
||||||
{
|
"searchable": false,
|
||||||
"searchable": false,
|
"orderable": false
|
||||||
"orderable": false
|
}
|
||||||
}
|
],
|
||||||
],
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
|
||||||
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
|
|
||||||
} );
|
|
||||||
} );
|
} );
|
||||||
$('#new_select_all').click(function(){
|
} );
|
||||||
if($(this).prop('checked')) {
|
$('#new_select_all').click(function(){
|
||||||
$("form input[type='checkbox']").attr("checked",true).change();
|
if($(this).prop('checked')) {
|
||||||
} else {
|
$("form input[type='checkbox']").attr("checked",true).change();
|
||||||
$("form input[type='checkbox']").attr("checked",false).change();
|
} else {
|
||||||
}
|
$("form input[type='checkbox']").attr("checked",false).change();
|
||||||
});
|
}
|
||||||
$.getScript('/inc/script-6.3.9.js');
|
});
|
||||||
function show_diff(id) {
|
$.getScript('/inc/script-6.3.9.js');
|
||||||
if ($('#show_diff_'+id).css('display') == 'none') {
|
function show_diff(id) {
|
||||||
$('#show_diff_'+id).show();
|
if ($('#show_diff_'+id).css('display') == 'none') {
|
||||||
$('#link_show_diff_'+id).attr('title', 'Hide the full diff');
|
$('#show_diff_'+id).show();
|
||||||
$('#link_show_diff_'+id).text('Hide diff');
|
$('#link_show_diff_'+id).attr('title', 'Hide the full diff');
|
||||||
} else {
|
$('#link_show_diff_'+id).text('Hide diff');
|
||||||
$('#show_diff_'+id).hide();
|
} else {
|
||||||
$('#link_show_diff_'+id).attr('title', 'Show the full diff');
|
$('#show_diff_'+id).hide();
|
||||||
$('#link_show_diff_'+id).text('Show diff');
|
$('#link_show_diff_'+id).attr('title', 'Show the full diff');
|
||||||
}
|
$('#link_show_diff_'+id).text('Show diff');
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
<style>
|
</script>
|
||||||
.diff {
|
<style>
|
||||||
overflow: auto;
|
.diff {
|
||||||
width: 100%;
|
overflow: auto;
|
||||||
border: 1px solid #DCDCDC;
|
width: 100%;
|
||||||
border-radius: 5px;
|
border: 1px solid #DCDCDC;
|
||||||
background-color: #fff;
|
border-radius: 5px;
|
||||||
margin: 0;
|
background-color: #fff;
|
||||||
}
|
margin: 0;
|
||||||
</style>
|
}
|
||||||
<form action="{{action}}" method="post">
|
</style>
|
||||||
<table class="overview hover order-column display compact" id="table_version">
|
<form action="{{action}}" method="post">
|
||||||
<thead>
|
<table class="overview hover order-column display compact" id="table_version">
|
||||||
<tr class="overviewHead">
|
<thead>
|
||||||
<th class="padding10 first-collumn" style="width: 1%">
|
<tr class="overviewHead">
|
||||||
<label for="new_select_all" id="new_label_select_all"></label>
|
<th class="padding10 first-collumn" style="width: 1%; padding-left: 15px;">
|
||||||
<input type="checkbox" id="new_select_all">
|
<label for="new_select_all" id="new_label_select_all"></label>
|
||||||
</th>
|
<input type="checkbox" id="new_select_all">
|
||||||
<th>{{lang1.words.user|title()}}</th>
|
</th>
|
||||||
<th class="padding10 first-collumn" style="width: 30%">
|
<th>{{lang1.words.user|title()}}</th>
|
||||||
{{lang1.words.local|title()}} {{lang1.words.path}}
|
<th class="padding10 first-collumn" style="width: 30%">
|
||||||
</th>
|
{{lang1.words.local|title()}} {{lang1.words.path}}
|
||||||
<th class="padding10 first-collumn" style="width: 10%">
|
</th>
|
||||||
{{lang1.words.remote|title()}} {{lang1.words.path}}
|
<th class="padding10 first-collumn" style="width: 10%">
|
||||||
</th>
|
{{lang1.words.remote|title()}} {{lang1.words.path}}
|
||||||
<th class="padding10 first-collumn" style="width: 35%">
|
</th>
|
||||||
{{lang1.words.diff|title()}}
|
<th class="padding10 first-collumn" style="width: 35%">
|
||||||
</th>
|
{{lang1.words.diff|title()}}
|
||||||
<th style="width: 10%">
|
</th>
|
||||||
{{lang1.words.created|title()}}
|
<th style="width: 10%">
|
||||||
</th>
|
{{lang1.words.created|title()}}
|
||||||
<th></th>
|
</th>
|
||||||
</tr>
|
<th></th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
{% for c in configs %}
|
<tbody>
|
||||||
<tr>
|
{% for c in configs %}
|
||||||
<td>
|
<tr>
|
||||||
<label for="{{c.id}}" id="select_{{c.id}}"></label>
|
<td style="padding-left: 15px">
|
||||||
<input type="checkbox" value="{{c.local_path}}" name="{{c.local_path}}" id="{{c.id}}">
|
<label for="{{c.id}}" id="select_{{c.id}}"></label>
|
||||||
</td>
|
<input type="checkbox" value="{{c.local_path}}" name="{{c.local_path}}" id="{{c.id}}">
|
||||||
<td>
|
</td>
|
||||||
{% for u in users %}
|
<td>
|
||||||
{% if u.user_id == c.user_id %}
|
{% for u in users %}
|
||||||
|
{% if u.user_id == c.user_id %}
|
||||||
{{ u.username }}
|
{{ u.username }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td class="padding10 first-collumn" title="{{c.local_path}}">
|
|
||||||
{% set show = '...'+c.local_path.split('/')[-1] %}
|
|
||||||
{{ copy_to_clipboard(id=c.local_path, value=c.local_path, show=show) }}
|
|
||||||
</td>
|
|
||||||
<td>{{ copy_to_clipboard(id=c.remote_path, value=c.remote_path) }}</td>
|
|
||||||
<td>
|
|
||||||
{% if c.diff == '' %}
|
|
||||||
{{lang1.words.no|title()}} {{lang1.words.diff3}}
|
|
||||||
{% else %}
|
|
||||||
<a id="link_show_diff_{{c.id}}" onclick="show_diff('{{c.id}}')" title="Show a difference between this config and previous one" class="link">{{lang1.words.show|title()}} {{lang1.words.diff2}}</a>
|
|
||||||
<div id="show_diff_{{c.id}}" style="display: none;">
|
|
||||||
{% set stdout = c.diff.split('\n') %}
|
|
||||||
{% include 'ajax/compare.html' %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>{{c.date}}</td>
|
|
||||||
<td style="padding-top: 10px;">
|
|
||||||
<a href="/app/versions.py?service={{service}}&serv={{serv}}&open=open&configver={{c.local_path.split('/')[-1]}}"
|
|
||||||
class="ui-button ui-widget ui-corner-all" title="{{lang1.phrases.view_and_upload}}" style="margin-top: -6px;">
|
|
||||||
{{lang1.words.view|title()}}/{{lang1.words.upload|title()}}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<input type="hidden" value="{{serv}}" name="serv">
|
|
||||||
<input type="hidden" value="open" name="open">
|
|
||||||
<input type="hidden" value="del" name="del">
|
|
||||||
<input type="hidden" value="{{style}}" name="style">
|
|
||||||
<p>
|
|
||||||
<button type="submit" value="" name="" class="btn btn-default">{{lang1.words.delete|title()}}</button>
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<center>
|
|
||||||
<h4>Select an old version</h4>
|
|
||||||
<p>
|
|
||||||
<select autofocus required name="configver" id="configver">
|
|
||||||
<option disabled selected>------</option>
|
|
||||||
{% for file in return_files %}
|
|
||||||
{% if file == configver %}
|
|
||||||
<option value="{{file}}" selected>{{file.split('-', maxsplit=1)[1]}}</option>
|
|
||||||
{% else %}
|
|
||||||
<option value="{{file}}">{{file.split('-', maxsplit=1)[1]}}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</td>
|
||||||
<input type="hidden" value="{{serv}}" name="serv">
|
<td class="padding10 first-collumn" title="{{c.local_path}}">
|
||||||
<input type="hidden" value="open" name="open">
|
{% set show = '...'+c.local_path.split('/')[-1] %}
|
||||||
<input type="hidden" value="{{service}}" name="service" id="service">
|
{{ copy_to_clipboard(id=c.local_path, value=c.local_path, show=show) }}
|
||||||
<a class="ui-button ui-widget ui-corner-all" id="show" title="{{lang1.words.enter|title()}}" onclick="showUploadConfig()">{{lang1.words.select2|title()}}</a>
|
</td>
|
||||||
</p>
|
<td>{{ copy_to_clipboard(id=c.remote_path, value=c.remote_path) }}</td>
|
||||||
<script>
|
<td>
|
||||||
$( "select" ).selectmenu();
|
{% if c.diff == '' %}
|
||||||
showUploadConfig();
|
{{lang1.words.no|title()}} {{lang1.words.diff3}}
|
||||||
</script>
|
{% else %}
|
||||||
</center>
|
<a id="link_show_diff_{{c.id}}" onclick="show_diff('{{c.id}}')" title="Show a difference between this config and previous one" class="link">{{lang1.words.show|title()}} {{lang1.words.diff2}}</a>
|
||||||
{% endif %}
|
<div id="show_diff_{{c.id}}" style="display: none;">
|
||||||
|
{% set stdout = c.diff.split('\n') %}
|
||||||
|
{% include 'ajax/compare.html' %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>{{c.date}}</td>
|
||||||
|
<td style="padding-top: 10px;">
|
||||||
|
<a href="/app/versions.py?service={{service}}&serv={{serv}}&open=open&configver={{c.local_path.split('/')[-1]}}"
|
||||||
|
class="ui-button ui-widget ui-corner-all" title="{{lang1.phrases.view_and_upload}}" style="margin-top: -6px;">
|
||||||
|
{{lang1.words.view|title()}}/{{lang1.words.upload|title()}}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<input type="hidden" value="{{serv}}" name="serv">
|
||||||
|
<input type="hidden" value="open" name="open">
|
||||||
|
<input type="hidden" value="del" name="del">
|
||||||
|
<input type="hidden" value="{{style}}" name="style">
|
||||||
|
<p>
|
||||||
|
<button type="submit" value="" name="" class="btn btn-default">{{lang1.words.delete|title()}}</button>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if for_delver == '1' %}
|
<div class="left-space">
|
||||||
<center>
|
<h4>{{lang1.words.select|title()}} {{lang1.words.an}} {{lang1.words.version2}}</h4>
|
||||||
<h4>Select a version</h4>
|
<select autofocus required name="configver" id="configver">
|
||||||
<form action="{{action}}" method="post">
|
<option disabled selected>------</option>
|
||||||
<label for="select_all" id="label_select_all"><b>Select all</b></label>
|
{% for file in return_files %}
|
||||||
<input type="checkbox" id="select_all"><br />
|
{% if file == configver %}
|
||||||
{% for file in return_files %}
|
<option value="{{file}}" selected>{{file.split('-', maxsplit=1)[1]}}</option>
|
||||||
<label for="{{file}}"> {{file.split('-', maxsplit=1)[1]}} </label><input type="checkbox" value="{{file}}" name="{{file}}" id="{{file}}">
|
{% else %}
|
||||||
<a href="/app/versions.py?service={{service}}&serv={{serv}}&open=open&configver={{file}}"
|
<option value="{{file}}">{{file.split('-', maxsplit=1)[1]}}</option>
|
||||||
class="ui-button ui-widget ui-corner-all" title="View and upload this version of the config" style="margin-top: -6px;">
|
{% endif %}
|
||||||
{{lang1.words.view|title()}}/{{lang1.words.upload|title()}}
|
{% endfor %}
|
||||||
</a><br />
|
</select>
|
||||||
{% endfor %}
|
<input type="hidden" value="{{serv}}" name="serv">
|
||||||
<input type="hidden" value="{{serv}}" name="serv">
|
<input type="hidden" value="open" name="open">
|
||||||
<input type="hidden" value="open" name="open">
|
<input type="hidden" value="{{service}}" name="service" id="service">
|
||||||
<input type="hidden" value="del" name="del">
|
<a class="ui-button ui-widget ui-corner-all" id="show" title="{{lang1.words.enter|title()}}" onclick="showUploadConfig()">{{lang1.words.select2|title()}}</a>
|
||||||
<p>
|
</div>
|
||||||
<button type="submit" value="" name="" class="btn btn-default">{{lang1.words.delete|title()}}</button>
|
<script>
|
||||||
</p>
|
$( "select" ).selectmenu();
|
||||||
</form>
|
showUploadConfig();
|
||||||
</center>
|
</script>
|
||||||
{% else %}
|
|
||||||
<center>
|
|
||||||
<h4>Select an old version</h4>
|
|
||||||
<p>
|
|
||||||
<select autofocus required name="configver" id="configver">
|
|
||||||
<option disabled selected>------</option>
|
|
||||||
{% for file in return_files %}
|
|
||||||
{% if file == configver %}
|
|
||||||
<option value="{{file}}" selected>{{file.split('-', maxsplit=1)[1]}}</option>
|
|
||||||
{% else %}
|
|
||||||
<option value="{{file}}">{{file.split('-', maxsplit=1)[1]}}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
<input type="hidden" value="{{serv}}" name="serv">
|
|
||||||
<input type="hidden" value="open" name="open">
|
|
||||||
<a class="ui-button ui-widget ui-corner-all" id="show" title="Enter" onclick="showUploadConfig()">{{lang1.words.select2|title()}}</a>
|
|
||||||
</p>
|
|
||||||
<script>
|
|
||||||
$( "select" ).selectmenu();
|
|
||||||
showUploadConfig();
|
|
||||||
</script>
|
|
||||||
</center>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script>
|
<script>
|
||||||
$('#select_all').click(function(){
|
$('#select_all').click(function(){
|
||||||
|
|
|
@ -104,8 +104,8 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{{lang.smon_page.desc.last_resp_time}}:
|
{{lang.smon_page.desc.last_resp_time}}:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if s.responce_time %}
|
{% if s.response_time %}
|
||||||
<span title="{{s.responce_time}} ms">{{s.responce_time|truncate(9)}} ms</span>
|
<span title="{{s.response_time}} ms">{{s.response_time|truncate(9)}} ms</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
N/A
|
N/A
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
{% if service != 'keepalived' %}
|
{% if service != 'keepalived' %}
|
||||||
<a class="ui-button ui-widget ui-corner-all" title="View stat" onclick="openStats()">{{lang.words.stats|title()}}</a>
|
<a class="ui-button ui-widget ui-corner-all" title="View stat" onclick="openStats()">{{lang.words.stats|title()}}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="ui-button ui-widget ui-corner-all" title="Change version" onclick="changeVersion()">{{lang.words.change2|title()}} {{lang.words.version2|title()}}</a>
|
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
{% if aftersave %}
|
{% if aftersave %}
|
||||||
|
@ -24,7 +23,7 @@
|
||||||
{% if stderr %}
|
{% if stderr %}
|
||||||
{% include 'include/errors.html' %}
|
{% include 'include/errors.html' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success" style="margin-left: var(--indent);">
|
||||||
{% for f in file %}
|
{% for f in file %}
|
||||||
{{f}}
|
{{f}}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -361,7 +361,7 @@
|
||||||
{% if serv %}
|
{% if serv %}
|
||||||
<div id="bin_bout"></div>
|
<div id="bin_bout"></div>
|
||||||
<div id="ajax-server-{{s.0}}" class="ajax-server"></div>
|
<div id="ajax-server-{{s.0}}" class="ajax-server"></div>
|
||||||
<div class="div-server div-backends">
|
<div class="div-server div-backends" style="margin-bottom: 0px;">
|
||||||
<div class="server-name backends">
|
<div class="server-name backends">
|
||||||
{% if service == 'haproxy' %}
|
{% if service == 'haproxy' %}
|
||||||
{{lang.words.backends|title()}}:
|
{{lang.words.backends|title()}}:
|
||||||
|
@ -382,21 +382,20 @@
|
||||||
{% if (service == 'haproxy' and s.8.0.9)
|
{% if (service == 'haproxy' and s.8.0.9)
|
||||||
or (service == 'nginx' and s.8.0.21)
|
or (service == 'nginx' and s.8.0.21)
|
||||||
or (service == 'apache' and s.8.0.27) %}
|
or (service == 'apache' and s.8.0.27) %}
|
||||||
<div style="clear: both; width: 97%;">
|
<div class="metrics-time-range">
|
||||||
<div style="padding-left: 25px;float: left;margin-top: -15px;">
|
|
||||||
<b>{{lang.words.time_range|title()}}:</b>
|
<b>{{lang.words.time_range|title()}}:</b>
|
||||||
<select title="Choose time range" id="time-range">
|
<select title="Choose time range" id="time-range">
|
||||||
<option value="30">30 minutes</option>
|
<option value="30">30 {{lang.words.minutes}}</option>
|
||||||
<option value="60">1 hour</option>
|
<option value="60">1 {{lang.words.hour}}</option>
|
||||||
<option value="180">3 hours</option>
|
<option value="180">3 {{lang.words.hours}}</option>
|
||||||
<option value="360">6 hours</option>
|
<option value="360">6 {{lang.words.hours2}}</option>
|
||||||
<option value="720">12 hours</option>
|
<option value="720">12 {{lang.words.hours2}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div id="refresh" style="text-align: right;margin-right: 3%;" title="Refresh metrics" onclick="showMetrics()">
|
<div style="clear: both;"></div>
|
||||||
|
<div id="refresh" class="metrics-refresh" style="margin-right: 140px;" title="{{lang.words.refresh|title()}}" onclick="showMetrics()">
|
||||||
<span class="refresh"></span>
|
<span class="refresh"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if service == 'haproxy' and s.8.0.9 %}
|
{% if service == 'haproxy' and s.8.0.9 %}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<tr class="overviewHead">
|
<tr class="overviewHead">
|
||||||
<th class="padding10 first-collumn" id="server-name-th">{{lang.words.name|title()}}</th>
|
<th class="padding10 first-collumn" id="server-name-th">{{lang.words.name|title()}}</th>
|
||||||
<th class="ip-field" style="width: 10% " id="server-ip-th">IP</th>
|
<th class="ip-field" style="width: 10% " id="server-ip-th">IP</th>
|
||||||
<th class="checkbox-head" style="width: 5%" class="help_cursor"><span title="SSH port">{{lang.words.port|title()}}</span></th>
|
<th style="width: 5%" class="help_cursor"><span title="SSH port">{{lang.words.port|title()}}</span></th>
|
||||||
{% if page != "servers.py" %}
|
{% if page != "servers.py" %}
|
||||||
<th style="width: 10%">{{lang.words.group|title()}}</th>
|
<th style="width: 10%">{{lang.words.group|title()}}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<td class="padding10 first-collumn" style="width: 15%;" class="help_cursor">
|
<td class="padding10 first-collumn" style="width: 15%;" class="help_cursor">
|
||||||
<span title="It's just name alias. This alias will be use in 'Servers' page for choose credentials">{{lang.words.name|title()}}<span>
|
<span title="It's just name alias. This alias will be use in 'Servers' page for choose credentials">{{lang.words.name|title()}}<span>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10 first-collumn" style="width: 25%;" class="help_cursor" id="ssh-key-enabled-td">
|
<td class="first-collumn" style="width: 25%;" class="help_cursor" id="ssh-key-enabled-td">
|
||||||
<span title="If it is enabled, the key will be used, if turned off - the password. Do not forget to download the keys to all servers or install the sudo without a password">SSH {{lang.words.key}}</span>
|
<span title="If it is enabled, the key will be used, if turned off - the password. Do not forget to download the keys to all servers or install the sudo without a password">SSH {{lang.words.key}}</span>
|
||||||
</td>
|
</td>
|
||||||
{% if page != "servers.py" %}
|
{% if page != "servers.py" %}
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% for ssh in sshs %}
|
{% for ssh in sshs %}
|
||||||
<tr style="width: 50%;" id="ssh-table-{{ssh.id}}" class="{{ loop.cycle('odd', 'even') }}">
|
<tr style="width: 50%;" id="ssh-table-{{ssh.id}}" class="{{ loop.cycle('odd', 'even') }}">
|
||||||
<td class="first-collumn">
|
<td class="first-collumn padding10">
|
||||||
{% set id = 'ssh_name-' + ssh.id|string() %}
|
{% set id = 'ssh_name-' + ssh.id|string() %}
|
||||||
{{ input(id, value=ssh.name, size='15') }}
|
{{ input(id, value=ssh.name, size='15') }}
|
||||||
</td>
|
</td>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="width: 50%;">
|
<tr style="width: 50%;">
|
||||||
<td class="first-collumn" valign="top" style="padding-top: 15px;">
|
<td class="first-collumn padding10" valign="top" style="padding-top: 15px;">
|
||||||
<select id="ssh-key-name">
|
<select id="ssh-key-name">
|
||||||
<option disabled selected>------</option>
|
<option disabled selected>------</option>
|
||||||
{% for ssh in sshs %}
|
{% for ssh in sshs %}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
<tr class="overviewHead">
|
<tr class="overviewHead">
|
||||||
<th class="padding10 first-collumn" id="user-login-th">{{lang.words.login|title()}}</th>
|
<th class="padding10 first-collumn" id="user-login-th">{{lang.words.login|title()}}</th>
|
||||||
<th style="width: 10%">{{lang.words.password|title()}}</th>
|
<th style="width: 10%">{{lang.words.password|title()}}</th>
|
||||||
<th style="width: 10%" id="user-active-th">{{lang.words.active|title()}}</th>
|
<th style="width: 10%" class="checkbox-head" id="user-active-th">{{lang.words.active|title()}}</th>
|
||||||
<th style="width: 20%">{{lang.words.email|title()}}</th>
|
<th style="width: 20%">{{lang.words.email|title()}}</th>
|
||||||
{% if page == "servers.py" %}
|
{% if page == "servers.py" %}
|
||||||
<th style="width: 10%" id="user-role-th">{{lang.words.role|title()}}</th>
|
<th style="width: 10%" id="user-role-th">{{lang.words.role|title()}}</th>
|
||||||
{% else %}
|
{% else %}
|
||||||
<th style="width: 10%" id="user-group-role-th">{{lang.words.groups|title()}} {{lang.words.and}} {{lang.words.roles|title()}}</th>
|
<th style="width: 10%" id="user-group-role-th">{{lang.words.groups|title()}} {{lang.words.and}} {{lang.words.roles|title()}}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th style="width: 100%" id="user-services-th">{{lang.words.services|title()}}</th>
|
<th style="width: 100%" id="user-services-th">{{lang.words.services|title()}}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|
|
@ -851,5 +851,6 @@
|
||||||
"worker2": "worker",
|
"worker2": "worker",
|
||||||
"processes": "processes",
|
"processes": "processes",
|
||||||
"position": "position",
|
"position": "position",
|
||||||
|
"global": "global",
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -851,5 +851,6 @@
|
||||||
"worker2": "ouvrier",
|
"worker2": "ouvrier",
|
||||||
"processes": "processus",
|
"processes": "processus",
|
||||||
"position": "position",
|
"position": "position",
|
||||||
|
"global": "mondial",
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -851,5 +851,6 @@
|
||||||
"worker2": "trabalhador",
|
"worker2": "trabalhador",
|
||||||
"processes": "processos",
|
"processes": "processos",
|
||||||
"position": "posição",
|
"position": "posição",
|
||||||
|
"global": "global",
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -851,5 +851,6 @@
|
||||||
"worker2": "рабочих",
|
"worker2": "рабочих",
|
||||||
"processes": "процессов",
|
"processes": "процессов",
|
||||||
"position": "позицию",
|
"position": "позицию",
|
||||||
|
"global": "глобальный",
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
{% if select_id != 'viewlogs' and service != 'nginx' %}
|
{% if select_id != 'viewlogs' and service != 'nginx' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td style="width: 10%;">{{lang.words.number|title()}} {{lang.words.rows}}</td>
|
<td style="width: 10%;">{{lang.words.number|title()}} {{lang.words.rows}}</td>
|
||||||
<td class="help_cursor" style="width: 10%;"><span title="Find in a log file(supports regular expressions)">{{lang.words.find|title()}}<span></td>
|
<td class="help_cursor" style="width: 10%;" title="" data-help="{{lang.phrases.find_in_log}}">{{lang.words.find|title()}}</td>
|
||||||
<td class="padding10 help_cursor" style="width: 10%;"><span title="Exclude from search in a log file(supports regular expressions)">{{lang.words.exclude|title()}}<span></td>
|
<td class="help_cursor" style="width: 10%;" title="" data-help="{{lang.phrases.exclude_in_log}}">{{lang.words.exclude|title()}}</td>
|
||||||
<td style="width: 10%;">
|
<td style="width: 10%;">
|
||||||
<label for="time_range_out_hour" style="padding: 0">{{lang.words.time_range|title()}}:</label>
|
<label for="time_range_out_hour" style="padding: 0">{{lang.words.time_range|title()}}:</label>
|
||||||
{{ input('time_range_out_hour', value=hour, class='time-range', readonly='readonly') }}:{{ input('time_range_out_minut', value=minut, class='time-range', readonly='readonly') }}
|
{{ input('time_range_out_hour', value=hour, class='time-range', readonly='readonly') }}:{{ input('time_range_out_minut', value=minut, class='time-range', readonly='readonly') }}
|
||||||
|
@ -60,16 +60,16 @@
|
||||||
{% if waf != '1' and select_id != 'viewlogs' %}
|
{% if waf != '1' and select_id != 'viewlogs' %}
|
||||||
<td id="remote_log_files"></td>
|
<td id="remote_log_files"></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class="padding10" style="width: 10%;">
|
<td style="width: 10%;">
|
||||||
{{ input('rows', type='number', value=rows, required='required', style='width: 110px;') }}
|
{{ input('rows', type='number', value=rows, required='required', style='width: 110px;') }}
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10" style="width: 10%;">
|
<td style="width: 10%;">
|
||||||
{{ input('grep', value=grep, style='width: 110px;') }}
|
{{ input('grep', value=grep, style='width: 110px;') }}
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10" style="width: 10%;">
|
<td style="width: 10%;">
|
||||||
{{ input('exgrep', value=exgrep, style='width: 110px;') }}
|
{{ input('exgrep', value=exgrep, style='width: 110px;') }}
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10" style="width: 10%;">
|
<td style="width: 10%;">
|
||||||
<div id="time-range"></div>
|
<div id="time-range"></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10 first-collumn" style="width: 1%;">
|
<td class="padding10 first-collumn" style="width: 1%;">
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div id="table_metrics"></div>
|
<div id="table_metrics"></div>
|
||||||
<div style="padding-left: 25px;float: left;margin-top: 6px;">
|
<div class="metrics-time-range">
|
||||||
<b>{{lang.words.time_range}}:</b>
|
<b>{{lang.words.time_range}}:</b>
|
||||||
<select title="Choose time range" id="time-range">
|
<select title="Choose time range" id="time-range">
|
||||||
<option value="30">30 {{lang.words.minutes}}</option>
|
<option value="30">30 {{lang.words.minutes}}</option>
|
||||||
|
@ -53,11 +53,12 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{% if service == 'haproxy' %}
|
{% if service == 'haproxy' %}
|
||||||
<div style="margin-top: 6px;">
|
<div style="margin-top: var(--indent);">
|
||||||
{{ checkbox('hide_http_metrics', desc=lang.words.hide|title()+' HTTP ' + lang.words.metrics, title=lang.words.hide|title()+' HTTP ' + lang.words.metrics) }}
|
{{ checkbox('hide_http_metrics', desc=lang.words.hide|title()+' HTTP ' + lang.words.metrics, title=lang.words.hide|title()+' HTTP ' + lang.words.metrics) }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div id="refresh" style="text-align: right;margin-top: 20px;margin-right: 10px;" title="{{lang.words.refresh|title}} {{lang.words.metrics}}" onclick="showMetrics()">
|
<div style="clear: both;"></div>
|
||||||
|
<div id="refresh" class="metrics-refresh" title="{{lang.words.refresh|title}} {{lang.words.metrics}}" onclick="showMetrics()">
|
||||||
<span class="refresh"></span>
|
<span class="refresh"></span>
|
||||||
</div>
|
</div>
|
||||||
{% for s in servers %}
|
{% for s in servers %}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<script src="/inc/codemirror/mode/nginx.js"></script>
|
<script src="/inc/codemirror/mode/nginx.js"></script>
|
||||||
<script src="/inc/codemirror/mode/haproxy.js"></script>
|
<script src="/inc/codemirror/mode/haproxy.js"></script>
|
||||||
<script src="/inc/codemirror/keymap/sublime.js"></script>
|
<script src="/inc/codemirror/keymap/sublime.js"></script>
|
||||||
<form action="{{ action }}" method="post" class="left-space">
|
<form action="{{ action }}" method="post" class="left-space" style="margin-top: var(--indent);">
|
||||||
<select autofocus required name="section" id="{{ select_id }}">
|
<select autofocus required name="section" id="{{ select_id }}">
|
||||||
<option disabled>------</option>
|
<option disabled>------</option>
|
||||||
{% for s in sections %}
|
{% for s in sections %}
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
{{lang.words.available|title()}} {{lang.words.versions}} (?)
|
{{lang.words.available|title()}} {{lang.words.versions}} (?)
|
||||||
</td>
|
</td>
|
||||||
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.server|title()}}</td>
|
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.server|title()}}</td>
|
||||||
<td class="help_cursor" title="{{lang.admin_page.desc.install_as_docker}}">{{lang.words.use|title()}} Docker</td>
|
<td class="checkbox-head help_cursor" title="{{lang.admin_page.desc.install_as_docker}}">{{lang.words.use|title()}} Docker</td>
|
||||||
<td>SYN-flood {{lang.words.protection}}</td>
|
<td>SYN-flood {{lang.words.protection}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.version}}</td>
|
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.version}}</td>
|
||||||
<td class="padding10 first-collumn" style="width: 30%;">{{lang.words.available|title()}} {{lang.words.versions}}</td>
|
<td class="padding10 first-collumn" style="width: 30%;">{{lang.words.available|title()}} {{lang.words.versions}}</td>
|
||||||
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.server|title()}}</td>
|
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.server|title()}}</td>
|
||||||
<td class="help_cursor" title="{{lang.admin_page.desc.install_as_docker}}" >{{lang.words.use|title()}} Docker</td>
|
<td class="checkbox-head help_cursor" title="{{lang.admin_page.desc.install_as_docker}}" >{{lang.words.use|title()}} Docker</td>
|
||||||
<td>SYN-flood {{lang.words.protection}}</td>
|
<td>SYN-flood {{lang.words.protection}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.version}}</td>
|
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.version}}</td>
|
||||||
<td class="padding10 first-collumn" style="width: 30%;">{{lang.words.available|title()}} {{lang.words.versions}}</td>
|
<td class="padding10 first-collumn" style="width: 30%;">{{lang.words.available|title()}} {{lang.words.versions}}</td>
|
||||||
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.server|title()}}</td>
|
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.server|title()}}</td>
|
||||||
<td class="help_cursor" title="{{lang.admin_page.desc.install_as_docker}}" >{{lang.words.use|title()}} Docker</td>
|
<td class="checkbox-head help_cursor" title="{{lang.admin_page.desc.install_as_docker}}" >{{lang.words.use|title()}} Docker</td>
|
||||||
<td>SYN-flood {{lang.words.protection}}</td>
|
<td>SYN-flood {{lang.words.protection}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -175,7 +175,7 @@
|
||||||
<script src="/inc/metrics.js"></script>
|
<script src="/inc/metrics.js"></script>
|
||||||
<script src="/inc/chart.min.js"></script>
|
<script src="/inc/chart.min.js"></script>
|
||||||
<div id="table_metrics"></div>
|
<div id="table_metrics"></div>
|
||||||
<div style="padding-left: 25px;float: left;margin-top: 3px;">
|
<div class="metrics-time-range">
|
||||||
<b>{{lang.words.time_range|title()}}:</b>
|
<b>{{lang.words.time_range|title()}}:</b>
|
||||||
<select title="Choose time range" id="time-range">
|
<select title="Choose time range" id="time-range">
|
||||||
<option value="30">30 {{lang.words.minutes}}</option>
|
<option value="30">30 {{lang.words.minutes}}</option>
|
||||||
|
@ -185,7 +185,8 @@
|
||||||
<option value="720">12 {{lang.words.hours2}}</option>
|
<option value="720">12 {{lang.words.hours2}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div id="refresh" style="text-align: right;margin-top: 10px;margin-right: 20px; margin-bottom: 10px;" title="{{lang.words.refresh|title()}}" onclick="showWafMetrics()">
|
<div style="clear: both;"></div>
|
||||||
|
<div id="refresh" class="metrics-refresh" title="{{lang.words.refresh|title()}}" onclick="showWafMetrics()">
|
||||||
<span class="refresh"></span>
|
<span class="refresh"></span>
|
||||||
</div>
|
</div>
|
||||||
{% for s in servers %}
|
{% for s in servers %}
|
||||||
|
|
|
@ -457,11 +457,11 @@
|
||||||
}
|
}
|
||||||
.caption-icon {
|
.caption-icon {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 6px 5px 10px 10px;
|
margin: 6px 5px 10px var(--indent);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
.caption-icon2 {
|
.caption-icon2 {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 8px 5px 10px 10px;
|
margin: 8px 5px 10px var(--indent);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
--menu-color: #06212a;
|
--menu-color: #06212a;
|
||||||
--right-menu-blue-rolor: #5D9CEB;
|
--right-menu-blue-rolor: #5D9CEB;
|
||||||
--border-radius: 3px;
|
--border-radius: 3px;
|
||||||
|
--indent: 15px;
|
||||||
}
|
}
|
||||||
html {
|
html {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
@ -80,7 +81,7 @@ form {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
padding-left: 15px;
|
padding-left: var(--indent);
|
||||||
}
|
}
|
||||||
.icon, .icon-hapservs {
|
.icon, .icon-hapservs {
|
||||||
max-width: 20px;
|
max-width: 20px;
|
||||||
|
@ -273,7 +274,7 @@ pre {
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
}
|
}
|
||||||
.lineDiffMinus, .lineDiffPlus, .lineDiff {
|
.lineDiffMinus, .lineDiffPlus, .lineDiff {
|
||||||
padding-left: 15px;
|
padding-left: var(--indent);
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
.lineDiffMinus {
|
.lineDiffMinus {
|
||||||
|
@ -330,7 +331,7 @@ pre {
|
||||||
}
|
}
|
||||||
.addOption, .addName {
|
.addOption, .addName {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
padding: 15px;
|
padding: var(--indent);
|
||||||
}
|
}
|
||||||
.advance {
|
.advance {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -339,8 +340,8 @@ pre {
|
||||||
font-size: 13px !important;
|
font-size: 13px !important;
|
||||||
}
|
}
|
||||||
.addButton {
|
.addButton {
|
||||||
padding-top: 15px;
|
padding-top: var(--indent);
|
||||||
padding-left: 15px;
|
padding-left: var(--indent);
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
.addButton:hover {
|
.addButton:hover {
|
||||||
|
@ -394,7 +395,7 @@ pre {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
.checkbox-head {
|
.checkbox-head {
|
||||||
padding: 0;
|
padding: 0 0 0 10px;
|
||||||
}
|
}
|
||||||
.ip-field {
|
.ip-field {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
@ -403,12 +404,12 @@ pre {
|
||||||
min-width: 225px;
|
min-width: 225px;
|
||||||
}
|
}
|
||||||
.syn-flood-protection-field {
|
.syn-flood-protection-field {
|
||||||
padding-left: 60px;
|
padding-left: 45px;
|
||||||
}
|
}
|
||||||
.overviewTr {
|
.overviewTr {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: #f6f8fa;
|
background-color: #f6f8fa;
|
||||||
padding-left: 15px;
|
padding-left: var(--indent);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
.serverUp, .serverDown, .serverNone {
|
.serverUp, .serverDown, .serverNone {
|
||||||
|
@ -455,12 +456,12 @@ pre {
|
||||||
background-color: var(--red-color);
|
background-color: var(--red-color);
|
||||||
}
|
}
|
||||||
.padding10 {
|
.padding10 {
|
||||||
padding: 10px 10px 10px 10px;
|
padding: 10px 10px 10px var(--indent);
|
||||||
border: none;
|
border: none;
|
||||||
width: 15%;
|
width: 15%;
|
||||||
}
|
}
|
||||||
.padding20 {
|
.padding20 {
|
||||||
padding: 15px;
|
padding: var(--indent);
|
||||||
width: 30%;
|
width: 30%;
|
||||||
}
|
}
|
||||||
.padding-top20 {
|
.padding-top20 {
|
||||||
|
@ -640,7 +641,7 @@ ul{
|
||||||
}
|
}
|
||||||
.ui-tabs-nav {
|
.ui-tabs-nav {
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
padding-left: 15px !important;
|
padding-left: var(--indent) !important;
|
||||||
padding-top: 0.28em !important;
|
padding-top: 0.28em !important;
|
||||||
}
|
}
|
||||||
.ui-tabs .ui-tabs-panel {
|
.ui-tabs .ui-tabs-panel {
|
||||||
|
@ -728,7 +729,7 @@ td,th {
|
||||||
background-color: #dff0d8 !important;
|
background-color: #dff0d8 !important;
|
||||||
}
|
}
|
||||||
.alert {
|
.alert {
|
||||||
padding:15px;
|
padding: var(--indent);
|
||||||
margin-bottom:20px;
|
margin-bottom:20px;
|
||||||
border:1px solid transparent;
|
border:1px solid transparent;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -739,7 +740,7 @@ td,th {
|
||||||
color: var(--blue-color) !important;
|
color: var(--blue-color) !important;
|
||||||
}
|
}
|
||||||
.alert-danger, .alert-info, .alert-success, .alert-warning, .added {
|
.alert-danger, .alert-info, .alert-success, .alert-warning, .added {
|
||||||
margin-top: 15px;
|
margin-top: var(--indent);
|
||||||
}
|
}
|
||||||
.alert-danger {
|
.alert-danger {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
|
@ -756,7 +757,7 @@ td,th {
|
||||||
color: #0c5460;
|
color: #0c5460;
|
||||||
background-color: #d1ecf1;
|
background-color: #d1ecf1;
|
||||||
border-color: #bee5eb;
|
border-color: #bee5eb;
|
||||||
margin-left: 15px;
|
margin-left: var(--indent);
|
||||||
}
|
}
|
||||||
.alert-warning {
|
.alert-warning {
|
||||||
color: #856404;
|
color: #856404;
|
||||||
|
@ -800,7 +801,7 @@ label {
|
||||||
background-color: #f3f8fb;
|
background-color: #f3f8fb;
|
||||||
}
|
}
|
||||||
#up-pannel {
|
#up-pannel {
|
||||||
margin-top: 15px;
|
margin-top: var(--indent);
|
||||||
}
|
}
|
||||||
.div-server, .div-server-hapwi, .bin_bout {
|
.div-server, .div-server-hapwi, .bin_bout {
|
||||||
background-color: #fbfbfb;
|
background-color: #fbfbfb;
|
||||||
|
@ -944,7 +945,7 @@ label {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
width: 48.8%;
|
width: 48.8%;
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 20px;
|
margin-left: var(--indent);
|
||||||
}
|
}
|
||||||
.chart-container_overview {
|
.chart-container_overview {
|
||||||
width: 93.3%;
|
width: 93.3%;
|
||||||
|
@ -953,7 +954,7 @@ label {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
}
|
}
|
||||||
.main {
|
.main {
|
||||||
margin: 15px;
|
margin: var(--indent);
|
||||||
}
|
}
|
||||||
.sort_menu {
|
.sort_menu {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
@ -971,7 +972,7 @@ label {
|
||||||
float: left;
|
float: left;
|
||||||
background-color: #fbfbfb;;
|
background-color: #fbfbfb;;
|
||||||
margin: 10px 10px 10px 0px;
|
margin: 10px 10px 10px 0px;
|
||||||
padding-left: 15px;
|
padding-left: var(--indent);
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
border: 1px solid #A4C7F5;
|
border: 1px solid #A4C7F5;
|
||||||
}
|
}
|
||||||
|
@ -1340,5 +1341,16 @@ label {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.left-space {
|
.left-space {
|
||||||
margin-left: 15px !important;
|
margin-left: var(--indent) !important;
|
||||||
|
}
|
||||||
|
.metrics-time-range {
|
||||||
|
float: left;
|
||||||
|
margin-top: var(--indent);
|
||||||
|
margin-left: var(--indent);
|
||||||
|
}
|
||||||
|
.metrics-refresh {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: -25px;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var url = "/inc/script.js";
|
var url = "/inc/script-6.3.9.js";
|
||||||
var cur_url = window.location.href.split('/').pop();
|
var cur_url = window.location.href.split('/').pop();
|
||||||
cur_url = cur_url.split('?');
|
cur_url = cur_url.split('?');
|
||||||
var intervalId;
|
var intervalId;
|
||||||
|
@ -156,7 +156,7 @@ if(localStorage.getItem('restart')) {
|
||||||
} else {
|
} else {
|
||||||
$('#'+apply_div).html("You have made changes to the server: "+ip_for_restart+". Changes will take effect only after restart. <a href='hapservers.py' title='Overview'>Go to the HAProxy Overview page and restart</a><a href='#' title='close' id='apply_close' style='float: right'><b>X</b></a>");
|
$('#'+apply_div).html("You have made changes to the server: "+ip_for_restart+". Changes will take effect only after restart. <a href='hapservers.py' title='Overview'>Go to the HAProxy Overview page and restart</a><a href='#' title='close' id='apply_close' style='float: right'><b>X</b></a>");
|
||||||
}
|
}
|
||||||
$.getScript('/inc/overview.js');
|
$.getScript('/inc/overview-6.3.9.js');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
@ -204,7 +204,6 @@ function setRefreshInterval(interval) {
|
||||||
$('.auto-refresh-resume').css('display', 'none');
|
$('.auto-refresh-resume').css('display', 'none');
|
||||||
$('.auto-refresh-pause').css('display', 'none');
|
$('.auto-refresh-pause').css('display', 'none');
|
||||||
$.getScript("/inc/fontawesome.min.js");
|
$.getScript("/inc/fontawesome.min.js");
|
||||||
// $.getScript("/inc/script-6.3.9.js");
|
|
||||||
}
|
}
|
||||||
hideAutoRefreshDiv();
|
hideAutoRefreshDiv();
|
||||||
} else {
|
} else {
|
||||||
|
@ -621,10 +620,6 @@ function showListOfVersion(for_delver) {
|
||||||
var service = $('#service').val();
|
var service = $('#service').val();
|
||||||
var serv = $("#serv").val();
|
var serv = $("#serv").val();
|
||||||
var configver = findGetParameter('configver');
|
var configver = findGetParameter('configver');
|
||||||
var style = 'new'
|
|
||||||
if (localStorage.getItem('version_style') == 'old') {
|
|
||||||
style = 'old'
|
|
||||||
}
|
|
||||||
clearAllAjaxFields();
|
clearAllAjaxFields();
|
||||||
$.ajax( {
|
$.ajax( {
|
||||||
url: "options.py",
|
url: "options.py",
|
||||||
|
@ -634,7 +629,6 @@ function showListOfVersion(for_delver) {
|
||||||
service: service,
|
service: service,
|
||||||
configver: configver,
|
configver: configver,
|
||||||
for_delver: for_delver,
|
for_delver: for_delver,
|
||||||
style: style,
|
|
||||||
token: $('#token').val(),
|
token: $('#token').val(),
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
@ -649,15 +643,6 @@ function showListOfVersion(for_delver) {
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function changeVersion(){
|
|
||||||
if (localStorage.getItem('version_style') == 'old') {
|
|
||||||
localStorage.setItem('version_style', 'new');
|
|
||||||
showListOfVersion(1);
|
|
||||||
} else {
|
|
||||||
localStorage.setItem('version_style', 'old');
|
|
||||||
showListOfVersion(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function findGetParameter(parameterName) {
|
function findGetParameter(parameterName) {
|
||||||
var result = null,
|
var result = null,
|
||||||
tmp = [];
|
tmp = [];
|
||||||
|
@ -1474,7 +1459,7 @@ function returnNiceCheckingConfig(data) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
alerts.forEach((element) => {
|
alerts.forEach((element) => {
|
||||||
if (element.indexOf('error: ') != '-1' || element.indexOf('Fatal') != '-1' || element.indexOf('Error') != '-1' || element.indexOf('failed ') != '-1' || element.indexOf('emerg] ') != '-1' || element.indexOf('Syntax error ') != '-1') {
|
if (element.indexOf('error: ') != '-1' || element.indexOf('Fatal') != '-1' || element.indexOf('Error') != '-1' || element.indexOf('failed ') != '-1' || element.indexOf('emerg] ') != '-1' || element.indexOf('Syntax error ') != '-1' || element.indexOf('Parsing') != '-1') {
|
||||||
alert_error = alert_error + element;
|
alert_error = alert_error + element;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue