2018-06-28 05:55:07 +00:00
{% extends "base.html" %}
{% block content %}
2019-10-25 07:18:57 +00:00
{% from 'include/input_macros.html' import input, checkbox, select %}
2019-10-05 20:41:07 +00:00
< style >
.container {
margin-right: 0;
}
< / style >
2018-06-28 05:55:07 +00:00
< script src = "/inc/users.js" > < / script >
2019-10-25 07:18:57 +00:00
{% include 'include/del_confirm.html' %}
2018-10-03 10:14:57 +00:00
< input type = "hidden" id = "new-group" name = "new-group" value = "{{ group }}" >
< input type = "hidden" id = "new-server-group-add" name = "new-server-group-add" value = "{{ group }}" >
2020-02-20 20:34:50 +00:00
< input type = "hidden" id = "new-sshgroup" name = "new-sshgroup" value = "{{ group }}" >
2020-08-07 15:14:59 +00:00
{{ input('new-telegram-group-add', type='hidden', value=group) }}
2018-06-28 05:55:07 +00:00
< div id = "tabs" >
< ul >
2020-08-03 13:31:51 +00:00
< li > < a href = "#users" title = "Servers: Manage users - HAProxy-WI" > Users< / a > < / li >
< li > < a href = "#servers" title = "Servers: Manage servers - HAProxy-WI" > Servers< / a > < / li >
< li > < a href = "#ssh" title = "Servers: Manage SSH credentials - HAProxy-WI" > SSH credentials< / a > < / li >
< li > < a href = "#checker" title = "Servers: Manage checker - HAProxy-WI" > Checker< / a > < / li >
2020-08-10 18:32:44 +00:00
< li > < a href = "#settings" title = "Admin area: Manage HAProxy-WI settings - HAProxy-WI" > Settings< / a > < / li >
2020-08-04 16:40:58 +00:00
< li > < a href = "#installproxy" title = "Servers: Proxy service installation - HAProxy-WI" > Proxy installation< / a > < / li >
< li > < a href = "#installmon" title = "Servers: Monitoring service installation - HAProxy-WI" > Monitoring installation< / a > < / li >
< li > < a href = "#backup" title = "Servers: Backup configs - HAProxy-WI" > Backup< / a > < / li >
2019-10-25 07:18:57 +00:00
{% include 'include/login.html' %}
2018-06-28 05:55:07 +00:00
< / ul >
2020-01-12 16:13:48 +00:00
< ul id = 'browse_histroy' > < / ul >
2018-09-28 16:10:01 +00:00
< div id = "users" >
2020-09-05 06:31:40 +00:00
{% include 'include/admin_users.html' %}
2018-09-28 16:10:01 +00:00
< / div >
2020-08-11 09:54:03 +00:00
2018-06-28 05:55:07 +00:00
< div id = "servers" >
2020-09-04 19:12:31 +00:00
{% include 'include/admin_servers.html' %}
2018-06-28 05:55:07 +00:00
< / div >
< div id = "ssh" >
2020-08-11 09:54:03 +00:00
{% include 'include/admin_ssh.html' %}
2018-06-28 05:55:07 +00:00
< / div >
2018-07-25 05:25:27 +00:00
< div id = "checker" >
2020-09-05 06:31:40 +00:00
{% include 'include/admin_telegram.html' %}
2018-07-25 05:25:27 +00:00
< / div >
2020-08-11 08:25:39 +00:00
2020-08-10 18:32:44 +00:00
< div id = "settings" >
{% include 'include/admin_settings.html' %}
< / div >
2020-06-01 16:13:28 +00:00
< div id = "installproxy" >
2019-10-21 06:00:16 +00:00
< table class = "overview" >
2020-02-05 08:15:57 +00:00
< caption > < h3 > Install HAProxy< / h3 > < / caption >
2019-10-21 06:00:16 +00:00
< tr class = "overviewHead" >
2019-11-28 16:39:24 +00:00
< td class = "padding10 first-collumn" > Current version< / td >
2020-03-27 21:16:04 +00:00
< td class = "padding10 first-collumn" style = "width: 30%;" > Available Versions< / td >
< td class = "padding10 first-collumn" style = "width: 30%;" > Server< / td >
2019-10-21 06:00:16 +00:00
< td > SYN flood protect< / td >
< td > < / td >
< / tr >
< tr >
2019-11-28 16:39:24 +00:00
< td id = "cur_hap_ver" class = "padding10 first-collumn" >
< / td >
2019-10-21 06:00:16 +00:00
< td class = "padding10 first-collumn" style = "width: 20%;" >
2019-10-25 07:18:57 +00:00
{% set values = dict() %}
2020-05-11 16:41:54 +00:00
{% set values = {'2.0.5-1':'2.0.5-1','2.0.6-1':'2.0.6-1', '2.0.7-1':'2.0.7-1', '2.0.9-1':'2.0.9-1', '2.0.11-1':'2.0.11-1', '2.0.12-1':'2.0.12-1', '2.0.13-1':'2.0.13-1', '2.0.14-1':'2.0.14-1'} %}
{{ select('hapver', values=values, selected='2.0.14-1', required='required') }}
2019-10-21 06:00:16 +00:00
< / td >
< td class = "padding10 first-collumn" >
< select autofocus required name = "haproxyaddserv" id = "haproxyaddserv" >
< option disabled selected > Choose server< / option >
{% for select in servers %}
< option value = "{{ select.2 }}" > {{ select.1 }}< / option >
{% endfor %}
< / select >
< / td >
< td >
2019-10-25 07:18:57 +00:00
{{ checkbox('syn_flood', title="Enable SYN flood protect", checked='checked') }}
2019-10-21 06:00:16 +00:00
< / td >
< td >
2020-08-04 16:40:58 +00:00
< span class = "ui-button ui-widget ui-corner-all" id = "install" title = "Install HAProxy" > Install< / span >
2019-10-21 06:00:16 +00:00
< / td >
< / tr >
< / table >
2020-02-05 08:15:57 +00:00
< table >
< caption > < h3 > Install Nginx< / h3 > < / caption >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" > Current version< / td >
2020-03-27 21:16:04 +00:00
< td class = "padding10 first-collumn" style = "width: 30%;" > Available Versions< / td >
< td class = "padding10 first-collumn" style = "width: 30%;" > Server< / td >
2020-02-05 08:15:57 +00:00
< td > SYN flood protect< / td >
< td > < / td >
< / tr >
< tr >
< td id = "cur_nginx_ver" class = "padding10 first-collumn" >
< / td >
< td class = "padding10 first-collumn" style = "width: 20%;" >
HAProxy-WI will try to install the latest Nginx version from official Nginx repository
< / td >
< td class = "padding10 first-collumn" >
< select autofocus required name = "nginxaddserv" id = "nginxaddserv" >
< option disabled selected > Choose server< / option >
{% for select in servers %}
< option value = "{{ select.2 }}" > {{ select.1 }}< / option >
{% endfor %}
< / select >
< / td >
< td >
{{ checkbox('nginx_syn_flood', title="Enable SYN flood protect", checked='checked') }}
< / td >
< td >
2020-08-04 16:40:58 +00:00
< span class = "ui-button ui-widget ui-corner-all" id = "nginx_install" title = "Install Nginx" > Install< / span >
2020-02-05 08:15:57 +00:00
< / td >
< / tr >
< / table >
2020-06-01 16:13:28 +00:00
< div id = "ajax" > < / div >
< / div >
2020-08-08 20:54:53 +00:00
2020-06-01 16:13:28 +00:00
< div id = "installmon" >
2020-08-08 20:54:53 +00:00
{% include 'include/mon_installation.html' %}
2019-10-21 06:00:16 +00:00
< / div >
2020-08-08 06:26:43 +00:00
2020-01-11 21:16:27 +00:00
< div id = "backup" >
2020-08-08 06:26:43 +00:00
{% include 'include/admin_backup.html' %}
2020-01-11 21:16:27 +00:00
< / div >
2018-06-28 05:55:07 +00:00
< / div >
2018-07-27 06:46:50 +00:00
< div id = "group_error" style = "display: none;" >
< div class = "alert alert-danger" >
2018-08-01 08:06:09 +00:00
< b > Do not edit this section if your group is "ALL"!< / b > Add first< a href = "users.py#groups" title = "Admin Area: Groups" > group< / a > or edit your own group at< a href = "users.py#users" title = "Admin Area: Users" > users< / a > page
2018-07-27 06:46:50 +00:00
< / div >
< / div >
2020-08-07 15:14:59 +00:00
{% include 'include/admins_dialogs.html' %}
2019-10-25 07:18:57 +00:00
{% include 'include/change_pass_form.html' %}
2018-07-27 06:46:50 +00:00
< script >
if($('#new-server-group-add').val() == 1) {
$('#group_error').css('display', 'block');
2018-10-03 10:14:57 +00:00
$('#add-user-button').css('display', 'none');
2018-07-27 06:46:50 +00:00
$('#add-server-button').css('display', 'none');
2019-10-04 16:58:47 +00:00
$('.passwordChange').css('display', 'none');
2018-07-27 06:46:50 +00:00
$('#add-ssh-button').css('display', 'none');
$('#ssh_key_upload').css('display', 'none');
$('#add-telegram-button').css('display', 'none');
2018-07-30 03:09:26 +00:00
$('input').css('color', 'rgba(0, 0, 0, 0.3)');
2018-07-27 06:46:50 +00:00
setTimeout(function() {
$("input[type=checkbox]").checkboxradio( "disable" );
$("select").selectmenu( "disable" );
2018-10-01 16:51:37 +00:00
$("button").button( "disable" );
2018-07-27 06:46:50 +00:00
$("input").attr( "readonly", "readonly" );
2018-09-28 10:35:44 +00:00
$('.delete').remove()
2019-10-21 06:00:16 +00:00
$('#hapver').selectmenu('enable');
$('#haproxyaddserv').selectmenu('enable');
2020-02-05 08:15:57 +00:00
$('#nginxaddserv').selectmenu('enable');
2020-03-27 21:16:04 +00:00
$('#haproxy_exp_addserv').selectmenu('enable');
$('#nginx_exp_addserv').selectmenu('enable');
2019-10-21 06:00:16 +00:00
$('#syn_flood').checkboxradio('enable');
2020-02-05 08:15:57 +00:00
$('#nginx_syn_flood').checkboxradio('enable');
2018-07-27 06:46:50 +00:00
}, 500 );
}
2019-10-01 05:35:05 +00:00
$( function() {
{% for user in users %}
$("#role-{{user.0}}" ).selectmenu({
width: 100
});
{% endfor %}
{% for server in servers %}
$("#slavefor-{{server.0}}" ).selectmenu({
width: 130
});
$("#credentials-{{server.0}}" ).selectmenu({
width: 150
});
{% endfor %}
2020-01-11 21:16:27 +00:00
{% for ssh in sshs %}
$("#sshgroup-{{ ssh.0}}" ).selectmenu({
width: 150
});
{% endfor %}
2019-10-01 05:35:05 +00:00
});
2018-07-27 06:46:50 +00:00
< / script >
2018-09-28 10:35:44 +00:00
< style >
.ui-selectmenu-button.ui-button {
2018-10-03 10:14:57 +00:00
width: 10em;
}
.checkbox {
width: 90px;
}
2018-09-28 10:35:44 +00:00
< / style >
2019-12-04 13:38:07 +00:00
{% endblock %}