2018-05-05 12:40:41 +00:00
{% extends "base.html" %}
{% block content %}
2020-01-11 21:16:27 +00:00
{% from 'include/input_macros.html' import input, select %}
2019-10-05 20:41:07 +00:00
< style >
.container {
margin-right: 0;
}
< / style >
2018-05-05 12:40:41 +00:00
< script src = "/inc/users.js" > < / script >
2018-09-28 10:35:44 +00:00
< script src = "/inc/fontawesome.min.js" > < / script >
2019-10-25 07:18:57 +00:00
{% include 'include/del_confirm.html' %}
2018-05-05 12:40:41 +00:00
< div id = "tabs" >
< ul >
< li > < a href = "#users" > Users< / a > < / li >
< li > < a href = "#groups" > Groups< / a > < / li >
< li > < a href = "#servers" > Servers< / a > < / li >
2018-05-07 13:24:22 +00:00
< li > < a href = "#ssh" > SSH credentials< / a > < / li >
2018-07-25 05:25:27 +00:00
< li > < a href = "#checker" > Checker< / a > < / li >
2019-10-21 06:00:16 +00:00
< li > < a href = "#settings" > Settings< / a > < / li >
2020-05-12 18:57:05 +00:00
< li > < a href = "#services" > Services< / a > < / li >
2019-10-21 06:00:16 +00:00
< li > < a href = "#updatehapwi" > Update< / a > < / li >
2020-01-11 21:16:27 +00:00
< li > < a href = "#backup" > Backup< / a > < / li >
2019-10-25 07:18:57 +00:00
{% include 'include/login.html' %}
2018-05-05 12:40:41 +00:00
< / ul >
2020-01-12 16:13:48 +00:00
< ul id = 'browse_histroy' > < / ul >
2018-05-05 12:40:41 +00:00
< div id = "users" >
< table class = "overview" id = "ajax-users" >
2020-01-18 23:50:43 +00:00
< thead >
2018-05-05 12:40:41 +00:00
< tr class = "overviewHead" >
2020-01-18 23:50:43 +00:00
< th class = "padding10 first-collumn" > Login name< / th >
< th > Password< / th >
< th > Active< / th >
< th > Email< / th >
< th > Role< / th >
< th > Group< / th >
< th > < / th >
< th > < / th >
2018-05-05 12:40:41 +00:00
< / tr >
2020-01-18 23:50:43 +00:00
< / thead >
< tbody >
2018-05-05 12:40:41 +00:00
{% for user in users %}
2018-08-05 14:37:14 +00:00
< tr id = "user-{{user.0}}" class = "{{ loop.cycle('odd', 'even') }}" >
2019-10-25 07:18:57 +00:00
{% include 'include/admin_users.html' %}
2018-05-05 12:40:41 +00:00
< td >
< select id = "role-{{user.0}}" name = "role-{{user.0}}" >
< option disabled selected > Choose role< / option >
{% for role in roles %}
{% if user.4 == role.1 %}
< option value = "{{ role.1 }}" selected > {{ role.1 }}< / option >
{% else %}
< option value = "{{ role.1 }}" > {{ role.1 }}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
< td >
2020-05-10 06:17:07 +00:00
< span title = "Change user groups" style = "cursor: pointer; margin-left: 15px;" class = "div-pic" onclick = "openChangeUserGroupDialog('{{user.0}}')" >
2018-05-05 12:40:41 +00:00
< / td >
2019-02-04 06:37:41 +00:00
< td >
< a class = "add" onclick = "cloneUser({{user.0}})" id = "clone-{{user.0}}" title = "Clone {{user.1}}" style = "cursor: pointer;" > < / a >
< / td >
< td >
< a class = "delete" onclick = "confirmDeleteUser({{user.0}})" title = "Delete user {{user.1}}" style = "cursor: pointer;" > < / a >
< / td >
2018-05-05 12:40:41 +00:00
< / tr >
{% endfor %}
2020-01-18 23:50:43 +00:00
< tbody >
2018-05-05 12:40:41 +00:00
< / table >
2018-10-04 04:07:32 +00:00
< br / > < span class = "add-button" title = "Add user" id = "add-user-button" > + Add< / span >
< br / > < br / >
2018-05-05 12:40:41 +00:00
< / div >
< div id = "groups" >
< table class = "overview" id = "ajax-group" >
2020-01-18 23:50:43 +00:00
< thead >
2018-05-05 12:40:41 +00:00
< tr class = "overviewHead" >
2020-01-18 23:50:43 +00:00
< th class = "padding10 first-collumn" > Name< / th >
< th > Description< / th >
< th > < / th >
2018-05-05 12:40:41 +00:00
< / tr >
2020-01-18 23:50:43 +00:00
< tbody >
2018-05-05 12:40:41 +00:00
{% for group in groups %}
2018-08-05 14:37:14 +00:00
< tr id = "group-{{ group.0 }}" class = "{{ loop.cycle('odd', 'even') }}" >
2018-09-07 07:44:23 +00:00
{% if group.1 == "All" %}
2018-05-05 12:40:41 +00:00
< td class = "padding10 first-collumn" > {{ group.1 }}< / td >
< td > {{ group.2 }}< / td >
< td > < / td >
{% else %}
< td class = "padding10 first-collumn" >
2020-04-06 16:38:58 +00:00
{% set id = 'name-' + group.0|string() %}
{{ input(id, value=group.1) }}
2018-05-05 12:40:41 +00:00
< / td >
2019-10-25 07:18:57 +00:00
< td style = "width: 100%;" >
2020-04-06 16:38:58 +00:00
{% set id = 'descript-' + group.0|string() %}
2018-10-01 02:32:13 +00:00
{% if group.2 != "None" %}
2020-04-06 16:38:58 +00:00
{{ input(id, value=group.2, size='60') }}
2018-10-01 02:32:13 +00:00
{% else %}
2020-04-06 16:38:58 +00:00
{{ input(id, value='', size='60') }}
2018-10-01 02:32:13 +00:00
{% endif %}
2018-05-05 12:40:41 +00:00
< / td >
< td >
2018-09-23 09:16:16 +00:00
< a class = "delete" onclick = "confirmDeleteGroup({{ group.0 }})" title = "Delete group {{group.1}}" style = "cursor: pointer;" > < / a >
2018-05-05 12:40:41 +00:00
< / td >
{% endif %}
< / tr >
{% endfor %}
2020-01-18 23:50:43 +00:00
< / tbody >
2018-05-05 12:40:41 +00:00
< / table >
< br / > < span class = "add-button" title = "Add group" id = "add-group-button" > + Add< / span >
< br / > < br / >
< table class = "overview" id = "group-add-table" style = "display: none;" >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" > New group name< / td >
2019-10-05 20:41:07 +00:00
< td > Description< / td >
2018-05-05 12:40:41 +00:00
< td > < / td >
< / tr >
< tr >
< td class = "padding10 first-collumn" >
2019-10-25 07:18:57 +00:00
{{ input('new-group-add') }}
2018-05-05 12:40:41 +00:00
< / td >
2020-01-18 23:50:43 +00:00
< td style = "width: 100%;" >
2019-10-25 07:18:57 +00:00
{{ input('new-desc', size="60") }}
2018-05-05 12:40:41 +00:00
< / td >
< td >
2018-09-28 16:10:01 +00:00
< a class = "add-admin" id = "add-group" title = "Add new group" style = "cursor: pointer;" > < / a >
2018-05-05 12:40:41 +00:00
< / td >
< / tr >
< / table >
2019-10-14 21:23:49 +00:00
< div class = "add-note addName alert-info" style = "width: inherit; margin-right: 15px;" >
How to setup groups you can watch in this video < a href = "https://haproxy-wi.org/description.py?description=setup" title = "How to setup servers, group and SSH credentials" target = "_blank" > here< / a >
< / div >
2018-05-05 12:40:41 +00:00
< / div >
< div id = "servers" >
< table class = "overview" id = "ajax-servers" >
2020-01-18 23:50:43 +00:00
< thead >
2018-05-05 12:40:41 +00:00
< tr class = "overviewHead" >
2020-01-18 23:50:43 +00:00
< th class = "padding10 first-collumn" > Hostname< / th >
< th class = "ip-field" > IP< / th >
< th class = "checkbox-head" > < span title = "SSH port" > Port< / span > < / th >
< th class = "group-field" > Group< / th >
< th class = "checkbox-head" > Enable< / th >
< th class = "checkbox-head" > < span title = "Vitrual IP, something like VRRP" > Virt< / span > < / th >
2020-02-06 22:36:58 +00:00
< th class = "checkbox-head" > HAProxy< / th >
< th class = "checkbox-head" > Nginx< / th >
2020-01-18 23:50:43 +00:00
< th class = "slave-field" > < span title = "Actions with master config will automatically apply on slave" > Slave for< / span > < / th >
< th class = "cred-field" > Credentials< / th >
< th > Description< / th >
< th > < / th >
< th > < / th >
< / tr >
< / thead >
< tbody >
2018-05-05 12:40:41 +00:00
{% for server in servers %}
2018-08-05 14:37:14 +00:00
< tr id = "server-{{server.0}}" class = "{{ loop.cycle('odd', 'even') }}" >
2018-05-05 12:40:41 +00:00
< td class = "padding10 first-collumn" >
2020-04-06 16:38:58 +00:00
{% set id = 'hostname-' + server.0|string() %}
{{ input(id, value=server.1, size='10') }}
2018-05-05 12:40:41 +00:00
< / td >
< td >
2020-01-27 15:01:31 +00:00
< span id = "ip-{{server.0}}" style = "margin-right: 6px;" > {{server.2}}< / span >
2018-05-05 12:40:41 +00:00
< / td >
2019-10-01 05:35:05 +00:00
< td >
2020-04-06 16:38:58 +00:00
{% set id = 'port-' + server.0|string() %}
{{ input(id, value=server.10, size='2') }}
2018-09-01 10:43:25 +00:00
< / td >
2018-05-05 12:40:41 +00:00
< td >
< select id = "servergroup-{{server.0}}" name = "servergroup-{{server.0}}" >
< option disabled selected > Choose group< / option >
{% for group in groups %}
{% if server.3 == group.0|string() %}
< option value = "{{ group.0 }}" selected > {{ group.1 }}< / option >
{% else %}
< option value = "{{ group.0 }}" > {{ group.1 }}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2019-10-25 07:18:57 +00:00
{% include 'include/admin_servers.html' %}
2018-05-05 12:40:41 +00:00
< / tr >
{% endfor %}
2020-01-18 23:50:43 +00:00
< / tbody >
2018-05-05 12:40:41 +00:00
< / table >
< br / > < span class = "add-button" title = "Add server" id = "add-server-button" > + Add< / span >
< br / > < br / >
2020-02-21 18:05:21 +00:00
< div id = "checkSshConnect" > < / div >
2019-10-01 05:35:05 +00:00
< div class = "add-note addName alert-info" style = "width: inherit; margin-right: 15px;" >
You can read the description of all parameters < a href = "https://haproxy-wi.org/description.py?description=servers" title = "Servers description" target = "_blank" > here< / a >
2019-10-14 21:23:49 +00:00
or watch video < a href = "https://haproxy-wi.org/description.py?description=setup" title = "How to setup servers, group and SSH credentials" target = "_blank" > here< / a >
2019-10-01 05:35:05 +00:00
< / div >
2018-05-05 12:40:41 +00:00
< / div >
2019-10-14 06:55:29 +00:00
2018-05-07 13:24:22 +00:00
< div id = "ssh" >
2018-06-24 09:31:28 +00:00
< table id = "ssh_enable_table" class = "overview" >
2018-05-07 13:24:22 +00:00
< tr class = "overviewHead" style = "width: 50%;" >
2018-06-24 09:31:28 +00:00
< td class = "padding10 first-collumn" style = "width: 15%;" >
2019-10-02 06:35:34 +00:00
< span title = "It's just name alias. This alias will be use in 'Servers' page for choose credentials" > Name< span >
2018-06-24 09:31:28 +00:00
< / td >
< td class = "padding10 first-collumn" style = "width: 25%;" >
2019-10-02 06:35:34 +00:00
< 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 key< / span >
2018-06-24 09:31:28 +00:00
< / td >
2018-06-28 05:55:07 +00:00
< td > Group< / td >
2018-05-07 13:24:22 +00:00
< td >
2019-10-02 06:35:34 +00:00
< span title = "Enter SSH user name. If SSH key disabled, enter password for ssh user" > Credentials< / span >
2018-05-07 13:24:22 +00:00
< / td >
< td > < / td >
< / tr >
2018-06-24 09:31:28 +00:00
{% for ssh in sshs %}
2018-08-05 14:37:14 +00:00
< tr style = "width: 50%;" id = "ssh-table-{{ssh.0}}" class = "{{ loop.cycle('odd', 'even') }}" >
2018-06-24 09:31:28 +00:00
< td class = "first-collumn" >
2020-04-06 16:38:58 +00:00
{% set id = 'ssh_name-' + ssh.0|string() %}
{{ input(id, value=ssh.1, size='10') }}
2018-06-24 09:31:28 +00:00
< / td >
< td class = "first-collumn" valign = "top" style = "padding-top: 15px;" >
{% if ssh.2 == 1 %}
< label for = "ssh_enable-{{ssh.0}}" > Enable SSH key< / label > < input type = "checkbox" id = "ssh_enable-{{ssh.0}}" checked >
{% else %}
< label for = "ssh_enable-{{ssh.0}}" > Enable SSH key< / label > < input type = "checkbox" id = "ssh_enable-{{ssh.0}}" >
{% endif %}
< / td >
2018-06-28 05:55:07 +00:00
< td >
< select id = "sshgroup-{{ssh.0}}" name = "sshgroup-{{ssh.0}}" >
{% for group in groups %}
{% if ssh.5 == group.0 %}
< option value = "{{ group.0 }}" selected > {{ group.1 }}< / option >
{% else %}
< option value = "{{ group.0 }}" > {{ group.1 }}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2018-06-24 09:31:28 +00:00
< td style = "padding-top: 15px;" >
< p >
2020-04-06 16:38:58 +00:00
{% set id = 'ssh_user-' + ssh.0|string() %}
{{ input(id, value=ssh.3, size='10') }}
2018-06-24 09:31:28 +00:00
< / p >
{% if ssh.2 == 1 %}
2020-04-06 16:38:58 +00:00
< input type = "password" id = "ssh_pass-{{ssh.0}}" class = "form-control" value = "{{ssh.4}}" style = "display: none;" autocomplete = "new-password" >
2018-06-24 09:31:28 +00:00
{% else %}
2020-04-06 16:38:58 +00:00
< input type = "password" id = "ssh_pass-{{ssh.0}}" class = "form-control" value = "{{ssh.4}}" autocomplete = "new-password" >
2018-06-24 09:31:28 +00:00
{% endif %}
2018-05-07 19:09:56 +00:00
< br >
2018-06-24 09:31:28 +00:00
< / td >
< td >
2018-09-23 09:16:16 +00:00
< a class = "delete" onclick = "confirmDeleteSsh({{ssh.0}})" title = "Delete SSH credentials {{ssh.1}}" style = "cursor: pointer;" > < / a >
2018-06-24 09:31:28 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
< br / > < span class = "add-button" title = "Add ssh" id = "add-ssh-button" > + Add< / span >
< br / > < br / >
< table class = "overview" id = "ssh-add-table" style = "display: none;" >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" style = "width: 15%;" > Name< / td >
< td class = "padding10 first-collumn" style = "width: 25%;" > SSH key< / td >
2018-06-28 05:55:07 +00:00
< td > Group< / td >
2018-06-24 09:31:28 +00:00
< td > Credentials< / td >
< td > < / td >
< / tr >
< tr >
< td class = "padding10 first-collumn" >
2019-10-25 07:18:57 +00:00
{{ input('new-ssh-add') }}
2018-06-24 09:31:28 +00:00
< / td >
< td >
< label for = "new-ssh_enable" > Enable SSH key< / label > < input type = "checkbox" id = "new-ssh_enable" checked >
2018-05-07 13:24:22 +00:00
< / td >
2018-06-28 05:55:07 +00:00
< td >
< select id = "new-sshgroup" name = "new-sshgroup" >
{% for group in groups %}
< option value = "{{ group.0 }}" > {{ group.1 }}< / option >
{% endfor %}
< / select >
< / td >
2018-05-07 13:24:22 +00:00
< td style = "padding-top: 15px;" >
< p >
2019-10-25 07:18:57 +00:00
{{ input('ssh_user', value=ssh_user) }}
2018-05-07 13:24:22 +00:00
< / p >
2019-10-25 07:18:57 +00:00
{{ input('ssh_pass', type='password', value=ssh_pass, style="display: none;") }}
2018-05-07 13:24:22 +00:00
< br >
< / td >
2018-06-24 09:31:28 +00:00
< td >
2018-09-28 16:10:01 +00:00
< a class = "add-admin" id = "add-ssh" title = "Add new SSH credentials" style = "cursor: pointer;" > < / a >
2018-06-24 09:31:28 +00:00
< / td >
2018-05-07 13:24:22 +00:00
< / tr >
< / table >
< table id = "ssh_key" >
2018-05-05 12:40:41 +00:00
< tr class = "overviewHead" style = "width: 50%;" >
2018-06-18 08:44:58 +00:00
< td class = "padding10 first-collumn" style = "width: 25%;" > Upload SSH Key< / td >
2018-05-05 12:40:41 +00:00
< td >
2019-10-02 06:35:34 +00:00
< span title = "Private key. Note: The public key must be pre-installed on all servers to which you plan to connect" > Key< / span >
2018-05-05 12:40:41 +00:00
< / td >
< td > < / td >
< / tr >
< tr style = "width: 50%;" >
< td class = "first-collumn" valign = "top" style = "padding-top: 15px;" >
2018-06-24 09:31:28 +00:00
< select id = "ssh-key-name" >
< option disabled selected > Choose credentials< / option >
{% for ssh in sshs %}
< option value = {{ssh.1}} > {{ssh.1}}< / option >
{% endfor %}
< / select >
2018-05-05 12:40:41 +00:00
< / td >
< td style = "padding-top: 15px;" >
< textarea id = "ssh_cert" cols = "50" rows = "5" > < / textarea > < br / > < br / >
< a class = "ui-button ui-widget ui-corner-all" id = "ssh_key_upload" title = "Upload ssh key" onclick = "uploadSsh()" > Upload< / a >
< / td >
< td > < / td >
< / tr >
< / table >
< div id = "ajax-ssh" > < / div >
2019-10-02 06:35:34 +00:00
< div class = "add-note addName alert-info" style = "width: inherit; margin-right: 15px;" >
You can read the description of all parameters < a href = "https://haproxy-wi.org/description.py?description=creds" title = "Servers description" target = "_blank" > here< / a >
2019-10-14 21:23:49 +00:00
or watch video < a href = "https://haproxy-wi.org/description.py?description=setup" title = "How to setup servers, group and SSH credentials" target = "_blank" > here< / a >
2019-10-02 06:35:34 +00:00
< / div >
2018-05-05 12:40:41 +00:00
< / div >
2018-07-25 05:25:27 +00:00
< div id = "checker" >
< table id = "checker_table" class = "overview" >
< tr class = "overviewHead" style = "width: 50%;" >
< td class = "padding10 first-collumn" style = "width: 25%;" >
2019-10-02 06:35:34 +00:00
< span title = "Token that gave you @father_bot" > Token< / span >
2018-07-25 05:25:27 +00:00
< / td >
2019-10-02 06:35:34 +00:00
< td > Channel name< / td >
2018-07-25 05:25:27 +00:00
< td > Group< / td >
< td > < / td >
2019-02-04 06:37:41 +00:00
< td > < / td >
2018-07-25 05:25:27 +00:00
< / tr >
{% for telegram in telegrams %}
2018-08-05 14:37:14 +00:00
< tr id = "telegram-table-{{telegram.0}}" class = "{{ loop.cycle('odd', 'even') }}" >
2018-07-25 05:25:27 +00:00
< td class = "first-collumn" style = "padding-top: 20px;" >
2020-04-06 16:38:58 +00:00
{% set id = 'telegram-token-' + telegram.0|string() %}
{{ input(id, value=telegram.1, style="margin-bottom: 23px;") }}
2018-07-25 05:25:27 +00:00
< / td >
< td >
2020-04-07 18:16:12 +00:00
{% set id = 'telegram-chanel-' + telegram.0|string() %}
2020-04-06 16:38:58 +00:00
{{ input(id, value=telegram.2) }}
2018-07-25 05:25:27 +00:00
< / td >
< td >
< select id = "telegramgroup-{{telegram.0}}" name = "telegramgroup-{{telegram.0}}" >
< option disabled selected > Choose group< / option >
{% for group in groups %}
{% if telegram.3|string() == group.0|string() %}
< option value = "{{ group.0 }}" selected > {{ group.1 }}< / option >
{% else %}
< option value = "{{ group.0 }}" > {{ group.1 }}< / option >
{% endif %}
{% endfor %}
< / select >
< / td >
2019-02-04 06:37:41 +00:00
< td >
< a class = "add" onclick = "cloneTelegram({{telegram.0}})" id = "clone-{{telegram.0}}" title = "Clone {{telegram.1}}" style = "cursor: pointer;" > < / a >
< / td >
2018-07-25 05:25:27 +00:00
< td >
2018-09-23 09:16:16 +00:00
< a class = "delete" onclick = "confirmDeleteTelegram({{telegram.0}})" title = "Delete channel {{telegram.2}}" style = "cursor: pointer;" > < / a >
2018-07-25 05:25:27 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
< br / > < span class = "add-button" title = "Add telegram channel" id = "add-telegram-button" > + Add< / span >
< br / > < br / >
< table class = "overview" id = "telegram-add-table" style = "display: none;" >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" style = "width: 25%;" >
2019-10-02 06:35:34 +00:00
< span title = "Token that gave you @father_bot" > Token< / span >
2018-07-25 05:25:27 +00:00
< / td >
< td > Chanel name< / td >
< td > Group< / td >
< td > < / td >
< / tr >
< tr >
< td class = "padding10 first-collumn" >
2019-10-25 07:18:57 +00:00
{{ input('telegram-token-add') }}
2018-07-25 05:25:27 +00:00
< / td >
< td >
2019-10-25 07:18:57 +00:00
{{ input('telegram-chanel-add') }}
2018-07-25 05:25:27 +00:00
< / td >
< td >
< select id = "new-telegram-group-add" name = "new-telegram-group-add" >
< option disabled selected value = "0" > Choose group< / option >
{% for group in groups %}
< option value = "{{ group.0 }}" > {{ group.1 }}< / option >
{% endfor %}
< / select >
< / td >
< td >
2018-09-28 16:10:01 +00:00
< a class = "add-admin" id = "add-telegram" title = "Add new Telegram channel" style = "cursor: pointer;" > < / a >
2018-07-25 05:25:27 +00:00
< / td >
< / tr >
< / table >
< div id = "ajax-telegram" > < / div >
2019-10-02 06:35:34 +00:00
< div class = "add-note addName alert-info" style = "width: inherit; margin-right: 15px;" >
You can read the description of all parameters < a href = "https://haproxy-wi.org/description.py?description=checker" title = "Servers description" target = "_blank" > here< / a >
< / div >
2018-07-25 05:25:27 +00:00
< / div >
2019-10-21 06:00:16 +00:00
< div id = "settings" >
< table id = "settings" >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" style = "width: 10%;" >
Parameter
< / td >
< td >
Value
< / td >
< td >
Description
< / td >
< / tr >
{% set section = namespace(section='') %}
{% for set in settings %}
{% if section.section|string() != set.2|string() %}
< th colspan = "3" > < h3 > {{ set.2 }} section< / h3 > < / th >
{% endif %}
{% set section.section = set.2 %}
< tr class = "{{ loop.cycle('odd', 'even') }}" >
< td class = "addName" >
< a href = "#{{set.0}}" title = "{{set.0}}" style = "color: #000;" > {{set.0}}< / a >
< / td >
< td class = "addOption" >
{% if set.0 == 'ldap_password' %}
{% if set.1 == 'None' %}
< input type = "password" name = "{{set.0}}" id = "{{set.0}}" value = "" title = "" size = "25" class = "form-control" >
{% else %}
< input type = "password" name = "{{set.0}}" id = "{{set.0}}" value = "{{set.1}}" title = "" size = "25" class = "form-control" >
{% endif %}
{% else %}
{% if set.1 == 'None' %}
< input type = "text" name = "{{set.0}}" id = "{{set.0}}" value = "" title = "" size = "25" class = "form-control" >
{% else %}
< input type = "text" name = "{{set.0}}" id = "{{set.0}}" value = "{{set.1}}" title = "" size = "25" class = "form-control" >
{% endif %}
{% endif %}
< / td >
< td class = "addOption" >
{{set.3}}
< / td >
< / tr >
{% endfor %}
< / table >
< / div >
2020-05-12 18:57:05 +00:00
< div id = "services" >
< table id = "services_table" class = "overview" >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" style = "width: 25%;" >
Service
< / td >
< td class = "padding10 first-collumn" style = "width: 35%;" >
Actions
< / td >
< td > Description< / td >
< / tr >
{% for s in services %}
< tr class = "{{ loop.cycle('odd', 'even') }}" id = "{{s.0}}" >
< td class = "padding10 first-collumn" >
{% if s.1.0 == 'active' %}
< span title = "{{s.0}} is started" > < span class = "serverUp server-status" > < / span > < / span >
{% else %}
{% if s.1.0 == 'inactive' or s.1.0 == 'failed' %}
< span title = "{{s.0}} is stoped" > < span class = "serverDown server-status" > < / span > < / span >
{% else %}
< span title = "{{s.0}} is not installed" > < span class = "serverNone server-status" > < / span > < / span >
{% endif %}
{% endif %}
{{s.0}}
< / td >
< td class = "padding10 first-collumn" >
< a id = "start-{{ s.0 }}" class = "start" title = "Start and enable {{s.0}} service" >
< span class = "service-start" onclick = "confirmAjaxServiceAction('start', '{{s.0}}')" > < / span >
< / a >
< a id = "restart-{{ s.2 }}" class = "restart" title = "Restart {{s.0}} service" >
< span class = "service-reload service-restart" onclick = "confirmAjaxServiceAction('restart', '{{s.0}}')" > < / span >
< / a >
< a id = "stop-{{ s.0 }}" class = "stop" title = "Stop and disable {{s.0}} service" >
< span class = "service-stop" onclick = "confirmAjaxServiceAction('stop', '{{s.0}}')" > < / span >
< / a >
< / td >
< td >
{{ s.2 }}
< / td >
< / tr >
{% endfor %}
< / table >
< div class = "add-note addName alert-info" style = "width: inherit; margin-right: 15px;" >
You can read about services < a href = "https://haproxy-wi.org/services.py" title = "HAProxy-WI services" target = "_blank" > here< / a >
< / div >
< / div >
2019-10-21 06:00:16 +00:00
< div id = "updatehapwi" >
{% set current_ver = versions.0 %}
{% set new_ver = versions.1 %}
{% set current_ver_without_dots = versions.2 %}
{% set new_ver_without_dots = versions.3 %}
< table class = "overview" >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" style = "width: 25%;" > Currnet version< / td >
< td class = "padding10" > Last version< / td >
< td > < / td >
< / tr >
< tr >
< td class = "padding10 first-collumn" >
< b > {{current_ver}}< / b >
< / td >
< td class = "padding10" >
< b > {{new_ver}}< / b >
< / td >
2019-10-25 07:18:57 +00:00
< td >
2019-10-21 06:00:16 +00:00
{% if new_ver_without_dots > current_ver_without_dots and new_ver != "Sorry cannot get current version" %}
< a class = "ui-button ui-widget ui-corner-all" id = "update_haproxy_wi" title = "Update HAProxy" > Update< / a >
{% endif %}
< / td >
< / table >
< div class = "add-note addName alert-info" style = "width: inherit; margin-right: 15px;" >
< b style = "font-size: 20px; display: block; padding-bottom: 10px;" > Note:< / b >
For update you have to use HAProxy-WI repository. How start use repository read < a href = "https://haproxy-wi.org/installation.py" title = "HAProxy-WI installation" target = "_blank" > here< / a >
2019-10-25 07:18:57 +00:00
< br / > < br / >
2019-10-21 06:00:16 +00:00
If server uses proxy to connection Internet add proxy settings in yum.conf
2019-10-25 07:18:57 +00:00
< br / > < br / >
2019-10-21 06:00:16 +00:00
Read more about update in < a href = "https://haproxy-wi.org/updates.py" title = "Doc" target = "_blank" > docs< / a >
and < a href = "https://haproxy-wi.org/changelog.py" title = "Changelog" target = "_blank" > changelog< / a >
< / div >
< div id = "ajax-update" > < / div >
< / div >
2020-01-11 21:16:27 +00:00
< div id = "backup" >
< table class = "overview" id = "ajax-backup-table" >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" > Servers< / td >
< td class = "padding10" > Remote server< / td >
< td class = "padding10" > Remote folder< / td >
< td class = "padding10" > Backup type< / td >
< td class = "padding10" > Period time< / td >
< td class = "padding10" > Credentials< / td >
< td class = "padding10" > Description< / td >
< td > < / td >
< td > < / td >
< / tr >
{% for b in backups %}
{% include 'include/admin_backup.html' %}
{% endfor %}
< / table >
< br / > < span class = "add-button" title = "Add a new backup job" id = "add-backup-button" > + Add a new backup job< / span >
< br / > < br / >
< div id = "ajax-backup" > < / div >
< div class = "add-note addName alert-info" style = "width: inherit; margin-right: 15px;" >
You can read the description of all parameters < a href = "https://haproxy-wi.org/description.py?description=backup" title = "Backup description" target = "_blank" > here< / a >
< / div >
< / div >
2018-05-05 12:40:41 +00:00
< / div >
2018-10-04 04:07:32 +00:00
< div id = "user-add-table" style = "display: none;" >
< table class = "overview" >
2019-10-25 07:18:57 +00:00
{% include 'include/admin_add_user.html' %}
2018-10-04 04:07:32 +00:00
< tr >
< td class = "padding20" >
Role
< span class = "need-field" > *< / span >
< / td >
< td >
< select id = "new-role" name = "new-role" >
< option disabled selected > Choose role< / option >
{% for role in roles %}
2018-10-10 09:57:28 +00:00
< option value = "{{ role.1 }}" > {{ role.1 }}< / option >
2018-10-04 04:07:32 +00:00
{% endfor %}
< / select >
< / td >
< / tr >
< tr >
< td class = "padding20" >
Group
< span class = "need-field" > *< / span >
< / td >
< td >
< select id = "new-group" name = "new-group" >
< option disabled selected > Choose group< / option >
{% for group in groups %}
< option value = "{{ group.0 }}" > {{ group.1 }}< / option >
{% endfor %}
< / select >
< / td >
< / tr >
< / table >
< / div >
2020-01-11 21:16:27 +00:00
< div id = "server-add-table" title = "Add a new server " style = "display: none;" >
2018-10-03 10:14:57 +00:00
< table class = "overview" >
2019-10-25 07:18:57 +00:00
{% include 'include/admin_add_server.html' %}
2018-10-04 04:07:32 +00:00
< tr >
2019-10-25 07:18:57 +00:00
< td class = "padding20" >
Credentials
< span class = "need-field" > *< / span >
2018-11-26 10:00:25 +00:00
< / td >
2018-10-03 10:14:57 +00:00
< td >
< select id = "credentials" required >
< option disabled selected > Choose credentials< / option >
{% for ssh in sshs %}
< option value = "{{ssh.0}}" > {{ssh.1}}< / option >
{% endfor %}
< / select >
< / td >
2019-10-25 07:18:57 +00:00
< / tr >
< tr >
< td class = "padding20" >
Group
< span class = "need-field" > *< / span >
< / td >
< td >
< select id = "new-server-group-add" name = "new-server-group-add" >
< option disabled selected value = "0" > Choose group< / option >
{% for group in groups %}
< option value = "{{ group.0 }}" > {{ group.1 }}< / option >
{% endfor %}
< / select >
< / td >
< / tr >
< / table >
< / div >
2020-01-11 21:16:27 +00:00
< div id = "backup-add-table" title = "Add a new backup job " style = "display: none;" >
< table class = "overview" >
{% include 'include/add_backup.html' %}
< tr >
< td class = "padding20" >
Credentials for remote server
< span class = "need-field" > *< / span >
< / td >
< td >
< select id = "backup-credentials" required >
< option disabled selected > Choose credentials< / option >
{% for ssh in sshs %}
< option value = "{{ssh.0}}" > {{ssh.1}}< / option >
{% endfor %}
< / select >
< / td >
< / tr >
< tr >
< td class = "padding20" >
Description
< / td >
< td >
{{ input('backup-description', size='30') }}
< / td >
< / tr >
< / table >
< / div >
2019-10-25 07:18:57 +00:00
{% include 'include/change_pass_form.html' %}
2020-05-10 06:17:07 +00:00
< div id = "change-user-groups-dialog" style = "display: none;" >
< div id = "change-user-groups-form" > < / div >
< / div >
2020-05-12 18:57:05 +00:00
< div id = "dialog-confirm-services" style = "display: none;" >
< p > < span class = "ui-icon ui-icon-alert" style = "float:left; margin:3px 12px 20px 0;" > < / span > Are you sure?< / p >
< / div >
2018-09-23 09:16:16 +00:00
< style >
.ui-selectmenu-button.ui-button {
2018-10-03 10:14:57 +00:00
width: 10em;
}
2018-09-23 09:16:16 +00:00
.first-collumn {
width: 10%;
}
< / style >
2020-01-18 23:50:43 +00:00
< script >
2020-05-10 06:17:07 +00:00
$( function() {
{% for user in users %}
$("#role-{{user.0}}" ).selectmenu({
width: 100
});
{% endfor %}
{% for server in servers %}
$("#servergroup-{{ server.0}}" ).selectmenu({
width: 100
});
$("#slavefor-{{server.0}}" ).selectmenu({
width: 130
});
$("#credentials-{{server.0}}" ).selectmenu({
width: 150
});
{% endfor %}
{% for ssh in sshs %}
if (window.matchMedia('(max-width: 1280px)').matches) {
$("#sshgroup-{{ ssh.0}}" ).selectmenu({
width: 100
2020-01-18 23:50:43 +00:00
});
2020-05-10 06:17:07 +00:00
}
{% endfor %}
{% for server in backups %}
$("#backup-time-{{ server.0}}" ).selectmenu({
width: 100
});
$("#backup-type-{{server.0}}" ).selectmenu({
width: 130
});
$("#backup-credentials-{{server.0}}" ).selectmenu({
width: 150
});
{% endfor %}
});
< / script >
2018-05-05 12:40:41 +00:00
{% endblock %}