Changelog: https://roxy-wi.org/changelog#6_3_5
pull/355/head
Aidaho 2023-02-13 17:45:45 +03:00
parent 14e663781b
commit df04d52eab
108 changed files with 3641 additions and 1713 deletions

View File

@ -27,7 +27,7 @@ user_params = roxywi_common.get_users_params(haproxy=1)
try:
roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=1)
except Exception as e:
except Exception:
print('error: your session is expired')
sys.exit()
@ -62,9 +62,9 @@ if all(v is None for v in [
black_lists = roxywi_common.get_files(folder=black_dir, file_format="lst")
template = template.render(
title="Add: ", role=user_params['role'], user=user_params['user'], selects=user_params['servers'], add=form.getvalue('add'), conf_add=form.getvalue('conf'),
role=user_params['role'], user=user_params['user'], selects=user_params['servers'], add=form.getvalue('add'), conf_add=form.getvalue('conf'),
group=user_group, options=sql.select_options(), saved_servers=sql.select_saved_servers(), white_lists=white_lists,
black_lists=black_lists, user_services=user_params['user_services'], token=user_params['token']
black_lists=black_lists, user_services=user_params['user_services'], token=user_params['token'], lang=user_params['lang']
)
print(template)

View File

@ -31,8 +31,8 @@ if all(v is None for v in [form.getvalue('upstream'), form.getvalue('generatecon
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('add_nginx.html')
template = template.render(
title="Add: ", role=user_params['role'], user=user_params['user'], selects=user_params['servers'], add=form.getvalue('add'), conf_add=form.getvalue('conf'),
user_services=user_params['user_services'], token=user_params['token']
role=user_params['role'], user=user_params['user'], selects=user_params['servers'], add=form.getvalue('add'), conf_add=form.getvalue('conf'),
user_services=user_params['user_services'], token=user_params['token'], lang=user_params['lang']
)
print(template)
elif form.getvalue('upstream') is not None:

View File

@ -5,11 +5,11 @@ import sys
from jinja2 import Environment, FileSystemLoader
import modules.db.sql as sql
import modules.common.common as common
import modules.roxywi.auth as roxywi_auth
import modules.config.config as config_mod
import modules.roxy_wi_tools as roxy_wi_tools
import modules.roxywi.auth as roxywi_auth
import modules.roxywi.common as roxywi_common
import modules.common.common as common
time_zone = sql.get_setting('time_zone')
get_date = roxy_wi_tools.GetDate(time_zone)
@ -39,13 +39,17 @@ stderr = ""
error = ""
aftersave = ""
is_restart = ''
service_desc = ''
user_params = roxywi_common.get_users_params(service='nginx')
if service in ('haproxy', 'nginx', 'keepalived', 'apache'):
service_desc = sql.select_service(service)
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id):
title = f"Working with {service_desc.service} configuration files"
if user_params['lang'] == 'ru':
title = f"Работа с конфигурационным файлом {service_desc.service}"
else:
title = f"Working with {service_desc.service} configuration files"
action = f"config.py?service={service_desc.slug}"
configs_dir = get_config_var.get_config_var('configs', 'kp_save_configs_dir')
file_format = 'conf'
@ -146,9 +150,9 @@ if serv is not None and form.getvalue('config') is not None:
sys.exit()
template = template.render(
h2=1, title=title, role=user_params['role'], action=action, user=user_params['user'], select_id="serv", serv=serv, aftersave=aftersave,
h2=1, role=user_params['role'], action=action, user=user_params['user'], select_id="serv", serv=serv, aftersave=aftersave,
config=config_read, cfg=cfg, selects=servers, stderr=stderr, error=error, service=service, is_restart=is_restart,
user_services=user_params['user_services'], config_file_name=config_file_name, is_serv_protected=is_serv_protected,
token=user_params['token']
token=user_params['token'], lang=user_params['lang'], service_desc=service_desc
)
print(template)

View File

@ -86,7 +86,7 @@ def default_values():
{'param': 'ldap_domain', 'value': '', 'section': 'ldap', 'desc': 'LDAP domain for logging in', 'group': '1'},
{'param': 'ldap_class_search', 'value': 'user', 'section': 'ldap', 'desc': 'Class for searching the user',
'group': '1'},
{'param': 'ldap_user_attribute', 'value': 'sAMAccountName', 'section': 'ldap',
{'param': 'ldap_user_attribute', 'value': 'userPrincipalName', 'section': 'ldap',
'desc': 'Attribute to search users by', 'group': '1'},
{'param': 'ldap_search_field', 'value': 'mail', 'section': 'ldap', 'desc': 'User\'s email address', 'group': '1'},
{'param': 'ldap_type', 'value': '0', 'section': 'ldap', 'desc': 'Use LDAPS', 'group': '1'},
@ -982,8 +982,6 @@ def update_db_v_6_3_4():
print('Updating... DB has been updated to version 6.3.4.0')
def update_db_v_6_3_5():
cursor = conn.cursor()
sql = list()
@ -1000,7 +998,7 @@ def update_db_v_6_3_5():
def update_ver():
try:
Version.update(version='6.3.4.0').execute()
Version.update(version='6.3.5.0').execute()
except Exception:
print('Cannot update version')

View File

@ -8,7 +8,6 @@ import modules.roxywi.common as roxywi_common
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('ha.html')
title = "Create and configure HA cluster"
print('Content-type: text/html\n')
@ -33,8 +32,8 @@ except Exception as e:
roxywi_common.logging('Roxy-WI server', f'Cannot get a user plan: {e}', roxywi=1)
parsed_template = template.render(
h2=1, title=title, role=user_params['role'], user=user_params['user'], serv=serv, selects=user_params['servers'],
user_services=user_params['user_services'], user_status=user_subscription['user_status'],
h2=1, role=user_params['role'], user=user_params['user'], serv=serv, selects=user_params['servers'],
user_services=user_params['user_services'], user_status=user_subscription['user_status'], lang=user_params['lang'],
user_plan=user_subscription['user_plan'], is_needed_tool=is_needed_tool, token=user_params['token']
)
print(parsed_template)

View File

@ -34,7 +34,6 @@ restart_settings = ''
if service in ('haproxy', 'nginx', 'keepalived', 'apache'):
service_desc = sql.select_service(service)
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id):
title = f'{service_desc.service} servers overview'
if serv:
if roxywi_common.check_is_server_in_group(serv):
servers = sql.select_servers(server=serv)
@ -180,9 +179,10 @@ except Exception as e:
roxywi_common.logging('Roxy-WI server', f'Cannot get a user plan: {e}', roxywi=1)
template = template.render(
h2=1, autorefresh=autorefresh, title=title, role=user_params['role'], user=user_params['user'], servers=servers_with_status1,
h2=1, autorefresh=autorefresh, role=user_params['role'], user=user_params['user'], servers=servers_with_status1,
keep_alive=''.join(keep_alive), serv=serv, service=service, services=services, user_services=user_params['user_services'],
docker_settings=docker_settings, user_status=user_subscription['user_status'], user_plan=user_subscription['user_plan'],
servers_waf=servers_waf, restart_settings=restart_settings, service_desc=service_desc, token=user_params['token']
servers_waf=servers_waf, restart_settings=restart_settings, service_desc=service_desc, token=user_params['token'],
lang=user_params['lang']
)
print(template)

View File

@ -21,21 +21,15 @@ user_id_history = form.getvalue('user_id')
if service in ('haproxy', 'nginx', 'keepalived', 'apache'):
service_desc = sql.select_service(service)
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id):
title = f'{service_desc.service} service history'
server_id = sql.select_server_id_by_ip(serv)
history = sql.select_action_history_by_server_id_and_service(
server_id,
service_desc.service
)
history = sql.select_action_history_by_server_id_and_service(server_id, service_desc.service)
elif service == 'server':
if serv:
title = f'{serv} history'
if roxywi_common.check_is_server_in_group(serv):
server_id = sql.select_server_id_by_ip(serv)
history = sql.select_action_history_by_server_id(server_id)
elif service == 'user':
if user_id_history:
title = 'User history'
history = sql.select_action_history_by_user_id(user_id_history)
users = sql.select_users()
@ -47,8 +41,8 @@ except Exception as e:
roxywi_common.logging('Roxy-WI server', f'Cannot get a user plan: {e}', roxywi=1)
rendered_template = template.render(
h2=1, autorefresh=0, title=title, role=user_params['role'], user=user_params['user'], users=users, serv=serv,
h2=1, autorefresh=0, role=user_params['role'], user=user_params['user'], users=users, serv=serv,
service=service, history=history, user_services=user_params['user_services'], token=user_params['token'],
user_status=user_subscription['user_status'], user_plan=user_subscription['user_plan']
user_status=user_subscription['user_status'], user_plan=user_subscription['user_plan'], lang=user_params['lang']
)
print(rendered_template)

View File

@ -154,21 +154,19 @@ def check_in_ldap(user, password):
bind = ldap_bind.simple_bind_s(result[0][0], password)
except ldap.INVALID_CREDENTIALS:
print("Content-type: text/html\n")
print('<center><div class="alert alert-danger">Invalid credentials</div><br /><br />')
sys.exit()
ban()
except ldap.SERVER_DOWN:
print("Content-type: text/html\n")
print('<center><div class="alert alert-danger">Server down</div><br /><br />')
print('error: LDAP server is down')
sys.exit()
except ldap.LDAPError as e:
if type(e.message) == dict and 'desc' in e.message:
print("Content-type: text/html\n")
print('<center><div class="alert alert-danger">Other LDAP error: %s</div><br /><br />' % e.message['desc'])
print(f'error: {e.message["desc"]}')
sys.exit()
else:
print("Content-type: text/html\n")
print('<center><div class="alert alert-danger">Other LDAP error: %s</div><br /><br />' % e)
print(f'error: {e}')
sys.exit()
else:
send_cookie(user)
@ -229,7 +227,12 @@ if login is not None and password is not None:
if login is None:
print("Content-type: text/html\n")
try:
lang = roxywi_common.get_user_lang()
except Exception:
lang = 'en'
parsed_template = template.render(
h2=0, title="Login page", role=role, user=user, error_log=error_log, error=error, ref=ref
h2=0, title="Login page", role=role, user=user, error_log=error_log, error=error, ref=ref, lang=lang
)
print(parsed_template)

View File

@ -34,23 +34,24 @@ minut1 = form.getvalue('minut1')
waf = form.getvalue('waf')
service = common.checkAjaxInput(form.getvalue('service'))
remote_file = form.getvalue('file')
service_name = ''
if service in ('haproxy', 'nginx', 'keepalived', 'apache'):
if service in ('haproxy', 'nginx', 'keepalived', 'apache') and waf != '1':
service_desc = sql.select_service(service)
service_name = service_desc.service
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id):
title = f"{service_desc.service}`s logs"
servers = roxywi_common.get_dick_permit(service=service_desc.slug)
elif waf == '1':
service_name = 'WAF'
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=1):
title = "WAF logs"
servers = roxywi_common.get_dick_permit(haproxy=1)
else:
print('<meta http-equiv="refresh" content="0; url=/app/overview.py">')
template = template.render(
h2=1, autorefresh=1, title=title, role=user_params['role'], user=user_params['user'], select_id="serv",
h2=1, autorefresh=1, role=user_params['role'], user=user_params['user'], select_id="serv",
selects=servers, serv=form.getvalue('serv'), rows=rows, grep=grep, exgrep=exgrep, hour=hour, hour1=hour1,
minut=minut, minut1=minut1, waf=waf, service=service, user_services=user_params['user_services'],
token=user_params['token'], remote_file=remote_file
token=user_params['token'], remote_file=remote_file, lang=user_params['lang'], service_name=service_name
)
print(template)

View File

@ -12,7 +12,7 @@ env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('metrics.html')
form = common.form
service = form.getvalue('service')
title = 'Metrics service'
service_desc = ''
print('Content-type: text/html\n')
@ -32,17 +32,16 @@ try:
if service_ver[0] == ' is not installed' or service_ver == '':
servers = ''
else:
service_desc = sql.select_service(service)
if service == 'nginx':
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=2):
title = "NGINX`s metrics"
user_params['servers'] = sql.select_nginx_servers_metrics_for_master()
elif service == 'apache':
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=4):
title = "Apache`s metrics"
user_params['servers'] = sql.select_apache_servers_metrics_for_master()
else:
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=1):
title = "HAProxy`s metrics"
group_id = roxywi_common.get_user_group(id=1)
user_params['servers'] = sql.select_servers_metrics(group_id)
service = 'haproxy'
@ -57,8 +56,8 @@ except Exception as e:
roxywi_common.logging('Roxy-WI server', f'Cannot get a user plan: {e}', roxywi=1)
template = template.render(
h2=1, title=title, autorefresh=1, role=user_params['role'], user=user_params['user'], servers=user_params['servers'],
h2=1, autorefresh=1, role=user_params['role'], user=user_params['user'], servers=user_params['servers'],
services=services, user_services=user_params['user_services'], service=service, user_status=user_subscription['user_status'],
user_plan=user_subscription['user_plan'], token=user_params['token']
user_plan=user_subscription['user_plan'], token=user_params['token'], lang=user_params['lang'], service_desc=service_desc
)
print(template)

View File

@ -214,6 +214,7 @@ def table_select():
env = Environment(loader=FileSystemLoader('templates'), autoescape=True,
extensions=['jinja2.ext.loopcontrols', 'jinja2.ext.do'], trim_blocks=True, lstrip_blocks=True)
table = form.getvalue('table_select')
lang = roxywi_common.get_user_lang()
if table == 'All':
template = env.get_template('ajax/stick_tables.html')
@ -227,11 +228,11 @@ def table_select():
table_id.append(table1)
table.append(table_id)
template = template.render(table=table)
template = template.render(table=table, lang=lang)
else:
template = env.get_template('ajax/stick_table.html')
tables_head, table = get_stick_table(table)
template = template.render(tables_head=tables_head, table=table)
template = template.render(tables_head=tables_head, table=table, lang=lang)
print(template)
@ -345,14 +346,14 @@ def select_session() -> None:
env = Environment(loader=FileSystemLoader('templates'), autoescape=True,
extensions=['jinja2.ext.loopcontrols', 'jinja2.ext.do'], trim_blocks=True, lstrip_blocks=True)
serv = common.checkAjaxInput(form.getvalue('sessions_select'))
lang = roxywi_common.get_user_lang()
haproxy_sock_port = sql.get_setting('haproxy_sock_port')
cmd = f'echo "show sess" |nc {serv} {haproxy_sock_port}'
output, stderr = server_mod.subprocess_execute(cmd)
template = env.get_template('ajax/sessions_table.html')
template = template.render(sessions=output)
template = template.render(sessions=output, lang=lang)
print(template)

View File

@ -229,7 +229,7 @@ def get_users_params(**kwargs):
user = sql.get_user_name_by_uuid(user_uuid.value)
except Exception:
print('<meta http-equiv="refresh" content="0; url=/app/login.py">')
return
return
try:
role = sql.get_user_role_by_uuid(user_uuid.value)
except Exception:
@ -256,18 +256,32 @@ def get_users_params(**kwargs):
else:
servers = get_dick_permit()
user_lang = get_user_lang()
user_params = {
'user': user,
'user_uuid': user_uuid,
'role': role,
'token': token,
'servers': servers,
'user_services': user_services
'user_services': user_services,
'lang': user_lang
}
return user_params
def get_user_lang() -> str:
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
try:
user_lang = cookie.get('lang')
user_lang = user_lang.value
except Exception:
return 'en'
return user_lang
def return_user_status() -> dict:
user_subscription = {}
user_subscription.setdefault('user_status', sql.select_user_status())

View File

@ -110,7 +110,7 @@ def show_roxy_log(
a = server_mod.ssh_command(syslog_server, commands)
return show_log(a, html=0, grep=grep)
else:
return server_mod.ssh_command(syslog_server, commands, show_log='1', grep=grep)
return server_mod.ssh_command(syslog_server, commands, show_log='1', grep=grep, timeout=10)
elif service == 'apache_internal':
apache_log_path = sql.get_setting('apache_log_path')

View File

@ -13,9 +13,10 @@ import modules.service.common as service_common
def user_ovw() -> None:
env = Environment(loader=FileSystemLoader('templates/ajax'), autoescape=True)
template = env.get_template('/show_users_ovw.html')
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('ajax/show_users_ovw.html')
lang = roxywi_common.get_user_lang()
user_params = roxywi_common.get_users_params()
users_groups = sql.select_user_groups_with_names(1, all=1)
user_group = roxywi_common.get_user_group(id=1)
@ -25,14 +26,15 @@ def user_ovw() -> None:
else:
users = sql.select_users()
template = template.render(users=users, users_groups=users_groups)
template = template.render(users=users, users_groups=users_groups, lang=lang)
print(template)
def show_sub_ovw() -> None:
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
lang = roxywi_common.get_user_lang()
template = env.get_template('ajax/show_sub_ovw.html')
template = template.render(sub=sql.select_user_all())
template = template.render(sub=sql.select_user_all(), lang=lang)
print(template)

View File

@ -84,12 +84,12 @@ def get_services_status():
services = []
is_in_docker = is_docker()
services_name = {
'roxy-wi-checker': 'Checker is designed for monitoring HAProxy, NGINX, Apache and Keepalived services as well as HAProxy backends and maxconn',
'roxy-wi-keep_alive': ' The Auto Start service allows to restart the HAProxy, NGINX, Apache and Keepalived services if they are down',
'roxy-wi-metrics': 'Collects number of connections for HAProxy, NGINX, Apache and HAProxy WAF services',
'roxy-wi-portscanner': 'Probes and saves a server or host for open ports',
'roxy-wi-smon': 'SMON stands for <b>S</b>imple <b>MON</b>itoring',
'roxy-wi-socket': 'Socket is a service for sending alerts and notifications',
'roxy-wi-checker': '',
'roxy-wi-keep_alive': '',
'roxy-wi-metrics': '',
'roxy-wi-portscanner': '',
'roxy-wi-smon': '',
'roxy-wi-socket': '',
'roxy-wi-prometheus-exporter': 'Prometheus exporter',
'prometheus': 'Prometheus service',
'grafana-server': 'Grafana service',

View File

@ -19,6 +19,8 @@ def create_user(new_user: str, email: str, password: str, role: str, activeuser:
sql.add_user(new_user, email, password, role, activeuser, group)
roxywi_common.logging(f'a new user {new_user}', ' has been created ', roxywi=1, login=1)
try:
if password == 'aduser':
password = 'your domain password'
message = f"A user has been created for you on Roxy-WI portal!\n\n" \
f"Now you can login to https://{os.environ.get('HTTP_HOST', '')}\n\n" \
f"Your credentials are:\n" \
@ -85,15 +87,16 @@ def update_user_password():
def get_user_services() -> None:
user_id = common.checkAjaxInput(form.getvalue('getuserservices'))
lang = roxywi_common.get_user_lang()
groups = []
u_g = sql.select_user_groups(user_id)
services = sql.select_services()
for g in u_g:
groups.append(g.user_group_id)
env = Environment(loader=FileSystemLoader('templates/ajax'), autoescape=True)
template = env.get_template('/show_user_services.html')
template = template.render(user_services=sql.select_user_services(user_id), id=user_id, services=services)
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('ajax/show_user_services.html')
template = template.render(user_services=sql.select_user_services(user_id), id=user_id, services=services, lang=lang)
print(template)
@ -112,14 +115,15 @@ def change_user_services() -> None:
def get_user_groups() -> None:
user_id = common.checkAjaxInput(form.getvalue('getusergroups'))
lang = roxywi_common.get_user_lang()
groups = []
u_g = sql.select_user_groups(user_id)
for g in u_g:
groups.append(g.user_group_id)
env = Environment(loader=FileSystemLoader('templates/ajax'), autoescape=True)
template = env.get_template('/show_user_groups.html')
template = template.render(groups=sql.select_groups(), user_groups=groups, id=user_id)
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('ajax/show_user_groups.html')
template = template.render(groups=sql.select_groups(), user_groups=groups, id=user_id, lang=lang)
print(template)

View File

@ -15,7 +15,7 @@ def ssh_command(server_ip: str, commands: list, **kwargs):
if kwargs.get('timeout'):
timeout = kwargs.get('timeout')
else:
timeout = 1
timeout = 2
try:
with mod_ssh.ssh_connect(server_ip) as ssh:
for command in commands:
@ -411,9 +411,10 @@ def show_firewalld_rules() -> None:
in_public_allow = ssh_command(serv, cmd1, raw=1)
output_chain = ssh_command(serv, cmd2, raw=1)
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates'))
template = env.get_template('ajax/firewall_rules.html')
template = template.render(input=input_chain2, IN_public_allow=in_public_allow, output=output_chain)
template = template.render(input_chain=input_chain2, IN_public_allow=in_public_allow, output_chain=output_chain, lang=lang)
print(template)
@ -468,3 +469,9 @@ def create_server(hostname, ip, group, typeip, enable, master, cred, port, desc,
return True
else:
return False
def server_is_up(server_ip: str) -> None:
cmd = [f'if ping -c 1 -W 1 {server_ip} >> /dev/null; then echo up; else echo down; fi']
server_status, stderr = subprocess_execute(cmd)
print(server_status)

View File

@ -26,7 +26,12 @@ def show_installation_output(error: str, output: str, service: str) -> bool:
print(output)
break
else:
print(f'success: {service} has been installed')
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('include/show_success_installation.html')
lang = roxywi_common.get_user_lang()
rendered_template = template.render(service=service, lang=lang)
print(rendered_template)
roxywi_common.logging('Roxy-WI server', error, roxywi=1, keep_history=1, service=service)
return True

View File

@ -22,11 +22,11 @@ except Exception as e:
sys.exit()
output_from_parsed_template = template.render(h2=1, autorefresh=0,
title="Network tools",
role=user_params['role'],
user=user_params['user'],
servers=user_params['servers'],
versions=roxywi_mod.versions(),
user_services=user_params['user_services'],
token=user_params['token'])
token=user_params['token'],
lang=user_params['lang'])
print(output_from_parsed_template)

View File

@ -364,9 +364,10 @@ if act == 'showRemoteLogFiles':
print(return_files)
sys.exit()
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('ajax/show_log_files.html')
template = template.render(serv=serv, return_files=return_files, path_dir=log_path)
template = template.render(serv=serv, return_files=return_files, path_dir=log_path, lang=lang)
print(template)
if form.getvalue('master'):
@ -499,9 +500,10 @@ if form.getvalue('git_backup'):
gits = sql.select_gits(server_id=server_id, service_id=service_id)
sshs = sql.select_ssh()
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates/ajax'), autoescape=True)
template = env.get_template('new_git.html')
template = template.render(gits=gits, sshs=sshs, servers=servers, services=services, new_add=1)
template = template.render(gits=gits, sshs=sshs, servers=servers, services=services, new_add=1, lang=lang)
print(template)
print('success: Git job has been created')
roxywi_common.logging(
@ -561,16 +563,17 @@ if form.getvalue('metrics_waf'):
if form.getvalue('table_metrics'):
service = form.getvalue('service')
roxywi_common.check_user_group()
lang = roxywi_common.get_user_lang()
group_id = roxywi_common.get_user_group(id=1)
if service in ('nginx', 'apache'):
metrics = sql.select_service_table_metrics(service, group_id)
else:
metrics = sql.select_table_metrics(group_id)
env = Environment(loader=FileSystemLoader('templates/ajax'), autoescape=True)
template = env.get_template('table_metrics.html')
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('ajax/table_metrics.html')
template = template.render(table_stat=metrics, service=service)
template = template.render(table_stat=metrics, service=service, lang=lang)
print(template)
if form.getvalue('metrics_hapwi_ram'):
@ -1138,14 +1141,17 @@ if form.getvalue('newsmon') is not None:
last_id = sql.insert_smon(server, port, enable, http, uri, body, group, desc, telegram, slack, user_group)
if last_id:
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates'), autoescape=True)
template = env.get_template('ajax/show_new_smon.html')
template = template.render(
smon=sql.select_smon_by_id(last_id),
telegrams=sql.get_user_telegram_by_group(user_group),
slacks=sql.get_user_slack_by_group(user_group))
slacks=sql.get_user_slack_by_group(user_group),
lang=lang
)
print(template)
roxywi_common.logging('SMON', ' Has been add a new server ' + server + ' to SMON ', roxywi=1, login=1)
roxywi_common.logging('SMON', f' Has been add a new server {server} to SMON ', roxywi=1, login=1)
if form.getvalue('smondel') is not None:
user_group = roxywi_common.get_user_group(id=1)
@ -1161,10 +1167,11 @@ if form.getvalue('smondel') is not None:
if form.getvalue('showsmon') is not None:
user_group = roxywi_common.get_user_group(id=1)
lang = roxywi_common.get_user_lang()
sort = common.checkAjaxInput(form.getvalue('sort'))
env = Environment(loader=FileSystemLoader('templates'), autoescape=True)
template = env.get_template('ajax/smon_dashboard.html')
template = template.render(smon=sql.smon_list(user_group), sort=sort)
template = template.render(smon=sql.smon_list(user_group), sort=sort, lang=lang, update=1)
print(template)
if form.getvalue('updateSmonIp') is not None:
@ -1198,7 +1205,7 @@ if form.getvalue('updateSmonIp') is not None:
try:
if sql.update_smon(smon_id, ip, port, body, telegram, slack, group, desc, en):
print("Ok")
roxywi_common.logging('SMON', ' Has been update the server ' + ip + ' to SMON ', roxywi=1, login=1)
roxywi_common.logging('SMON', f' Has been update the server {ip} to SMON ', roxywi=1, login=1)
except Exception as e:
print(e)
@ -1354,9 +1361,10 @@ if form.getvalue('scan_ports') is not None:
if stderr != '':
print(stderr)
else:
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates'), autoescape=True)
template = env.get_template('ajax/scan_ports.html')
template = template.render(ports=stdout, info=stdout1)
template = template.render(ports=stdout, info=stdout1, lang=lang)
print(template)
if form.getvalue('viewFirewallRules') is not None:
@ -1558,10 +1566,11 @@ if any((form.getvalue('do_new_name'), form.getvalue('aws_new_name'), form.getval
else:
groups = ''
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates'), autoescape=True)
template = env.get_template('ajax/provisioning/providers.html')
template = template.render(providers=providers, role=role_id, groups=groups, user_group=provider_group,
adding=1, params=params)
adding=1, params=params, lang=lang)
print(template)
if form.getvalue('providerdel'):
@ -1722,11 +1731,12 @@ if form.getvalue('doworkspace'):
user_params = roxywi_common.get_users_params()
new_server = sql.select_provisioned_servers(new=workspace, group=group, type='do')
params = sql.select_provisioning_params()
lang = roxywi_common.get_user_lang()
env = Environment(extensions=["jinja2.ext.do"], loader=FileSystemLoader('templates'))
template = env.get_template('ajax/provisioning/provisioned_servers.html')
template = template.render(
servers=new_server, groups=sql.select_groups(), user_group=group,
servers=new_server, groups=sql.select_groups(), user_group=group, lang=lang,
providers=sql.select_providers(group), role=user_params['role'], adding=1, params=params
)
print(template)
@ -1819,11 +1829,12 @@ if form.getvalue('awsworkspace'):
user_params = roxywi_common.get_users_params()
new_server = sql.select_provisioned_servers(new=workspace, group=group, type='aws')
params = sql.select_provisioning_params()
lang = roxywi_common.get_user_lang()
env = Environment(extensions=["jinja2.ext.do"], loader=FileSystemLoader('templates'))
template = env.get_template('ajax/provisioning/provisioned_servers.html')
template = template.render(
servers=new_server, groups=sql.select_groups(), user_group=group,
servers=new_server, groups=sql.select_groups(), user_group=group, lang=lang,
providers=sql.select_providers(group), role=user_params['role'], adding=1, params=params
)
print(template)
@ -2108,6 +2119,7 @@ if form.getvalue('gcoreworkspace'):
user_params = roxywi_common.get_users_params()
new_server = sql.select_provisioned_servers(new=workspace, group=group, type='gcore')
params = sql.select_provisioning_params()
lang = roxywi_common.get_user_lang()
env = Environment(extensions=["jinja2.ext.do"], loader=FileSystemLoader('templates'))
template = env.get_template('ajax/provisioning/provisioned_servers.html')
@ -2117,7 +2129,8 @@ if form.getvalue('gcoreworkspace'):
providers=sql.select_providers(group),
role=user_params['role'],
adding=1,
params=params)
params=params,
lang=lang)
print(template)
except Exception as e:
print(e)
@ -2170,9 +2183,10 @@ if form.getvalue('editAwsServer'):
params = sql.select_provisioning_params()
providers = sql.select_providers(int(user_group))
server = sql.select_gcore_server(server_id=server_id)
lang = roxywi_common.get_user_lang()
env = Environment(extensions=["jinja2.ext.do"], loader=FileSystemLoader('templates'))
template = env.get_template('ajax/provisioning/aws_edit_dialog.html')
template = template.render(server=server, providers=providers, params=params)
template = template.render(server=server, providers=providers, params=params, lang=lang)
print(template)
if form.getvalue('editGcoreServer'):
@ -2182,9 +2196,10 @@ if form.getvalue('editGcoreServer'):
params = sql.select_provisioning_params()
providers = sql.select_providers(int(user_group))
server = sql.select_gcore_server(server_id=server_id)
lang = roxywi_common.get_user_lang()
env = Environment(extensions=["jinja2.ext.do"], loader=FileSystemLoader('templates'))
template = env.get_template('ajax/provisioning/gcore_edit_dialog.html')
template = template.render(server=server, providers=providers, params=params)
template = template.render(server=server, providers=providers, params=params, lang=lang)
print(template)
if form.getvalue('editDoServer'):
@ -2194,9 +2209,10 @@ if form.getvalue('editDoServer'):
params = sql.select_provisioning_params()
providers = sql.select_providers(int(user_group))
server = sql.select_do_server(server_id=server_id)
lang = roxywi_common.get_user_lang()
env = Environment(extensions=["jinja2.ext.do"], loader=FileSystemLoader('templates'))
template = env.get_template('ajax/provisioning/do_edit_dialog.html')
template = template.render(server=server, providers=providers, params=params)
template = template.render(server=server, providers=providers, params=params, lang=lang)
print(template)
if form.getvalue('edit_do_provider'):
@ -2243,6 +2259,7 @@ if form.getvalue('edit_aws_provider'):
if form.getvalue('loadservices'):
from modules.roxywi.roxy import get_services_status
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates'))
template = env.get_template('ajax/load_services.html')
try:
@ -2250,12 +2267,13 @@ if form.getvalue('loadservices'):
except Exception as e:
print(e)
template = template.render(services=services)
template = template.render(services=services, lang=lang)
print(template)
if form.getvalue('loadchecker'):
from modules.roxywi.roxy import get_services_status
lang = roxywi_common.get_user_lang()
env = Environment(loader=FileSystemLoader('templates'), autoescape=True)
template = env.get_template('ajax/load_telegram.html')
services = get_services_status()
@ -2306,7 +2324,8 @@ if form.getvalue('loadchecker'):
nginx_settings=nginx_settings,
keepalived_settings=keepalived_settings,
apache_settings=apache_settings,
page=page)
page=page,
lang=lang)
print(template)
if form.getvalue('load_update_hapwi'):
@ -2324,6 +2343,7 @@ if form.getvalue('load_update_hapwi'):
socket_ver = roxy.check_new_version('socket')
prometheus_exp_ver = roxy.check_new_version('prometheus-exporter')
services = roxy.get_services_status()
lang = roxywi_common.get_user_lang()
template = template.render(services=services,
versions=versions,
@ -2333,7 +2353,8 @@ if form.getvalue('load_update_hapwi'):
portscanner_ver=portscanner_ver,
socket_ver=socket_ver,
prometheus_exp_ver=prometheus_exp_ver,
keep_ver=keep_ver)
keep_ver=keep_ver,
lang=lang)
print(template)
if form.getvalue('loadopenvpn'):
@ -2567,6 +2588,7 @@ if act == 'showListOfVersion':
style = common.checkAjaxInput(form.getvalue('style'))
users = sql.select_users()
service_desc = sql.select_service(service)
lang = roxywi_common.get_user_lang()
if service in ('haproxy', 'nginx', 'keepalived', 'apache'):
configs = sql.select_config_version(serv, service_desc.slug)
@ -2594,7 +2616,8 @@ if act == 'showListOfVersion':
for_delver=for_delver,
configs=configs,
users=users,
style=style)
style=style,
lang=lang)
print(template)
if act == 'getSystemInfo':

View File

@ -9,7 +9,7 @@ import modules.roxywi.logs as roxy_logs
import modules.roxywi.auth as roxywi_auth
import modules.roxywi.common as roxywi_common
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
env = Environment(extensions=["jinja2.ext.do"], loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('ovw.html')
print('Content-type: text/html\n')
@ -18,7 +18,7 @@ user_params = roxywi_common.get_users_params()
try:
roxywi_auth.check_login(user_params['user_uuid'], user_params['token'])
except Exception as e:
except Exception:
print('error: your session is expired')
sys.exit()
@ -29,8 +29,8 @@ except Exception as e:
print(e)
rendered_template = template.render(
h2=1, autorefresh=1, title="Overview", role=user_params['role'], user=user_params['user'], groups=groups,
h2=1, autorefresh=1, role=user_params['role'], user=user_params['user'], groups=groups,
roles=sql.select_roles(), servers=user_params['servers'], user_services=user_params['user_services'],
roxy_wi_log=roxy_logs.roxy_wi_log(), token=user_params['token'], guide_me=1
roxy_wi_log=roxy_logs.roxy_wi_log(), token=user_params['token'], guide_me=1, lang=user_params['lang']
)
print(rendered_template)

View File

@ -17,6 +17,7 @@ serv = form.getvalue('history')
print('Content-type: text/html\n')
user_params = roxywi_common.get_users_params(virt=1)
lang = user_params['lang']
try:
roxywi_auth.check_login(user_params['user_uuid'], user_params['token'])
@ -25,7 +26,10 @@ except Exception as e:
sys.exit()
if serv:
title = f'Port scanner history for {serv}'
if lang == 'ru':
title = f'История Port scanner для {serv}'
else:
title = f'Port scanner history for {serv}'
port_scanner_settings = sql.select_port_scanner_history(serv)
history = '1'
port_scanner = ''
@ -33,7 +37,10 @@ if serv:
count_ports = ''
else:
history = ''
title = 'Port scanner dashboard'
if lang == 'ru':
title = 'Дашборд Port scanner'
else:
title = 'Port scanner dashboard'
user_group = roxywi_common.get_user_group(id=1)
port_scanner_settings = sql.select_port_scanner_settings(user_group)
if not port_scanner_settings:
@ -59,6 +66,6 @@ rendered_template = template.render(
h2=1, autorefresh=0, title=title, role=user_params['role'], user=user_params['user'], servers=user_params['servers'],
port_scanner_settings=port_scanner_settings, count_ports=count_ports, history=history, port_scanner=''.join(port_scanner),
port_scanner_stderr=port_scanner_stderr, user_services=user_params['user_services'], user_status=user_subscription['user_status'],
user_plan=user_subscription['user_plan'], token=user_params['token']
user_plan=user_subscription['user_plan'], token=user_params['token'], lang=lang
)
print(rendered_template)

View File

@ -36,8 +36,13 @@ try:
except Exception as e:
print(str(e))
if user_params['lang'] == 'ru':
title = 'Предоставление серверов'
else:
title = 'Servers provisioning'
rendered_template = template.render(
title="Servers provisioning", role=user_params['role'], user=user_params['user'], groups=groups,
title=title, role=user_params['role'], user=user_params['user'], groups=groups, lang=user_params['lang'],
user_group=user_group, servers=sql.select_provisioned_servers(), providers=sql.select_providers(user_group),
is_needed_tool=is_needed_tool, user_services=user_params['user_services'], token=user_params['token'], params=params
)

View File

@ -98,12 +98,16 @@ if serv is not None and form.getvalue('config') is not None:
os.system(f"/bin/rm -f {hap_configs_dir}*.old")
if user_params['lang'] == 'ru':
title = 'Работа с секциями HAProxy'
else:
title = 'Working with HAProxy config sections'
rendered_template = template.render(
h2=1, title="Working with HAProxy config sections", role=user_params['role'], action="sections.py", user=user_params['user'],
h2=1, title=title, role=user_params['role'], action="sections.py", user=user_params['user'],
select_id="serv", serv=serv, aftersave=aftersave, config=config_read, cfg=cfg, selects=user_params['servers'],
stderr=stderr, error=error, start_line=start_line, end_line=end_line, section=section, sections=sections,
is_serv_protected=is_serv_protected, user_services=user_params['user_services'], token=user_params['token'],
warning=warning, is_restart=is_restart
warning=warning, is_restart=is_restart, lang=user_params['lang']
)
print(rendered_template)

View File

@ -18,7 +18,7 @@ user_params = roxywi_common.get_users_params()
try:
roxywi_auth.check_login(user_params['user_uuid'], user_params['token'])
except Exception as e:
except Exception:
print('error: your session is expired')
sys.exit()
@ -42,13 +42,18 @@ except Exception as e:
user_subscription = roxywi_common.return_unsubscribed_user_status()
roxywi_common.logging('Roxy-WI server', f'Cannot get a user plan: {e}', roxywi=1)
if user_params['lang'] == 'ru':
title = 'Сервера: '
else:
title = "Servers: "
rendered_template = template.render(
title="Servers: ", role=user_params['role'], user=user_params['user'], users=sql.select_users(group=user_group),
title=title, role=user_params['role'], user=user_params['user'], users=sql.select_users(group=user_group),
groups=sql.select_groups(), servers=servers, roles=sql.select_roles(), sshs=sql.select_ssh(group=user_group),
masters=masters, group=user_group, services=services, timezones=pytz.all_timezones, guide_me=1,
token=user_params['token'], settings=settings, backups=sql.select_backups(), page="servers.py",
geoip_country_codes=geoip_country_codes, user_services=user_params['user_services'], ldap_enable=ldap_enable,
user_status=user_subscription['user_status'], user_plan=user_subscription['user_plan'], gits=gits,
is_needed_tool=is_needed_tool
is_needed_tool=is_needed_tool, lang=user_params['lang']
)
print(rendered_template)

View File

@ -26,6 +26,7 @@ form = common.form
action = form.getvalue('action')
sort = form.getvalue('sort')
autorefresh = 0
lang = user_params['lang']
user_group = roxywi_common.get_user_group(id=1)
cmd = "systemctl is-active roxy-wi-smon"
@ -35,20 +36,32 @@ smon_status, stderr = server_mod.subprocess_execute(cmd)
if action == 'add':
smon = sql.select_smon(user_group, action='add')
roxywi_auth.page_for_admin(level=3)
title = "SMON Admin"
if lang == 'ru':
title = "SMON: Админка"
else:
title = "SMON: Admin"
elif action == 'history':
if form.getvalue('host'):
needed_host = common.is_ip_or_dns(form.getvalue('host'))
smon = sql.alerts_history('SMON', user_group, host=needed_host)
else:
smon = sql.alerts_history('SMON', user_group)
title = "SMON History"
if lang == 'ru':
title = "SMON: История"
else:
title = "SMON: History"
elif action == 'checker_history':
smon = sql.alerts_history('Checker', user_group)
title = "Checker History"
if lang == 'ru':
title = "Checker: История"
else:
title = "Checker: History"
else:
smon = sql.smon_list(user_group)
title = "SMON Dashboard"
if lang == 'ru':
title = "SMON: Дашборд"
else:
title = "SMON: Dashboard"
autorefresh = 1
try:
@ -59,7 +72,7 @@ except Exception as e:
rendered_template = template.render(
h2=1, title=title, autorefresh=autorefresh, role=user_params['role'], user=user_params['user'], group=user_group,
telegrams=sql.get_user_telegram_by_group(user_group), slacks=sql.get_user_slack_by_group(user_group),
telegrams=sql.get_user_telegram_by_group(user_group), slacks=sql.get_user_slack_by_group(user_group), lang=lang,
smon=smon, smon_status=smon_status, smon_error=stderr, action=action, sort=sort, user_services=user_params['user_services'],
user_status=user_subscription['user_status'], user_plan=user_subscription['user_plan'], token=user_params['token']
)

View File

@ -27,14 +27,13 @@ except Exception:
if service in ('haproxy', 'nginx', 'apache'):
service_desc = sql.select_service(service)
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id):
title = f'{service_desc.service} stats page'
roxywi_common.get_dick_permit(service=service_desc.slug)
else:
print('<meta http-equiv="refresh" content="0; url=/app/overview.py">')
rendered_template = template.render(
h2=1, autorefresh=1, title=title, role=user_params['role'], user=user_params['user'], onclick="showStats()",
h2=1, autorefresh=1, role=user_params['role'], user=user_params['user'], onclick="showStats()",
selects=user_params['servers'], serv=serv, service=service, user_services=user_params['user_services'],
token=user_params['token'], select_id="serv"
token=user_params['token'], select_id="serv", lang=user_params['lang'], service_desc=service_desc
)
print(rendered_template)

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,15 @@
{% extends "base.html" %}
{% block title %}{{lang.menu_links.add_proxy.title}}{% endblock %}
{% block h2 %}{{lang.menu_links.add_proxy.title}}{% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select %}
{% set balance_params = dict() %}
{% set balance_params = {'ip_hash':'ip_hash','least_conn':'least_conn','random':'random'} %}
{% set balance_params = {'ip_hash':'ip_hash','least_conn':'least_conn','random':'random', 'round-robin': 'round-robin'} %}
<script src="/inc/add_nginx.js"></script>
<div id="tabs">
<ul>
<li><a href="#create" title="Add proxy: Create proxy - Roxy-WI">Create proxy</a></li>
<li><a href="#upstream" title="Add proxy: Create Upstream - Roxy-WI">Upstream</a></li>
<li><a href="#create" title="{{lang.words.add|title()}} {{lang.words.proxy}}: {{lang.words.add|title()}} {{lang.words.proxy}} - Roxy-WI">{{lang.words.add|title()}} {{lang.words.proxy}}</a></li>
<li><a href="#upstream" title="{{lang.words.add|title()}} {{lang.words.proxy}}: {{lang.words.create|title()}} {{lang.words.upstream|title()}} - Roxy-WI">{{lang.words.upstream|title()}}</a></li>
{% include 'include/login.html' %}
</ul>
<ul id='browse_histroy'></ul>
@ -15,9 +17,9 @@
<div id="upstream">
<form name="add-upstream" id="add-upstream" action="/app/add_nginx.py" method="post">
<table class="add-table">
<caption><h3>Add upstream</h3></caption>
<caption><h3>{{lang.words.add|title()}} upstream</h3></caption>
<tr>
<td class="addName">Select a server: </td>
<td class="addName">{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.server}}: </td>
<td class="addOption">
<select required name="serv" id="serv">
<option disabled selected>------</option>
@ -25,52 +27,52 @@
<option value="{{ select.2 }}">{{ select.1 }}</option>
{% endfor %}
</select>
<div class="tooltip tooltipTop"><b>Note:</b> If you re-configure the master server, the slave server will be re-configured automatically</div>
<div class="tooltip tooltipTop"><b>{{lang.words.note|title()}}:</b> {{lang.phrases.master_slave}}</div>
</td>
<td rowspan="5" class="add-note addName alert-info">
The upstream module is used to define groups of servers.
{{lang.add_nginx_page.desc.upstream_desc1}}
<br /><br />
Defines a group of servers. Servers can listen on different ports. In addition, servers listening on TCP and UNIX-domain sockets can be mixed..
{{lang.add_nginx_page.desc.upstream_desc2}}
<br /><br />
By default, requests are distributed between the servers using a weighted round-robin balancing method.
{{lang.add_nginx_page.desc.upstream_desc3}}
</td>
</tr>
<tr>
<td class="addName">Name:</td>
<td class="addName">{{lang.words.name|title()}}:</td>
<td class="addOption">
{{ input('name', name='upstream', title="Name upstream", placeholder="backend_servers", required='required') }}
</td>
</tr>
<tr class="advance">
<td class="addName">Balance: </td>
<td class="addName">{{lang.words.balance|title()}}: </td>
<td class="addOption">
{{ select('balance', values=balance_params, selected='least_conn', required='required', class='force_close') }}
{{ select('balance', values=balance_params, selected='round-robin', required='required', class='force_close') }}
</td>
</tr>
<tr class="advance">
<td class="addName"><span title="Activates the cache for connections to upstream servers." data-help="The connections parameter sets the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed.">Keepalive:</span></td>
<td class="addName"><span title="{{lang.add_nginx_page.desc.keepalive}}" data-help="{{lang.add_nginx_page.desc.keepalive}}">Keepalive:</span></td>
<td class="addOption">
{{ input('name', name='keepalive', title="The connections parameter sets the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed.", placeholder="32") }}
{{ input('name', name='keepalive', title=lang.add_nginx_page.desc.keepalive, placeholder="32") }}
</td>
</tr>
<tr>
<td class="addName">Servers:</td>
<td class="addName">{{lang.words.servers|title()}}:</td>
<td class="addOption">
{% include 'include/add_nginx_servers.html' %}
</td>
</tr>
<tr class="advance-show">
<td class="addOption" colspan="2">
<button title="Show full list of settings" class="row-down advance-show-button">Show Advanced settings</button>
<button title="Hide full list of settings" class="row-up advance-hide-button" style="display: none">Hide Advanced settings</button>
<button title="{{lang.add_page.buttons.show_full_settings}}" class="row-down advance-show-button">{{lang.words.show|title()}} {{lang.words.advanced}} {{lang.words.settings}}</button>
<button title="{{lang.add_page.buttons.hide_full_settings}}" class="row-up advance-hide-button" style="display: none">{{lang.words.hide|title()}} {{lang.words.advanced}} {{lang.words.settings}}</button>
</td>
</tr>
<tr>
<td class="addButton">
<a class="ui-button ui-widget ui-corner-all" title="Add Backend" onclick="addProxy('add-upstream')">Add Upstream</a>
<a class="ui-button ui-widget ui-corner-all" title="{{lang.words.add|title()}} {{lang.words.upstream|title()}}" onclick="addProxy('add-upstream')">{{lang.words.add|title()}}</a>
</td>
<td class="addButton">
<a class="ui-button ui-widget ui-corner-all" title="Generate and display config" onclick="generateConfig('add-upstream')">Generate config</a>
<a class="ui-button ui-widget ui-corner-all" title="{{lang.words.generate|title()}} {{lang.words.and}} {{lang.words.display}} {{lang.words.config}}" onclick="generateConfig('add-upstream')">{{lang.words.generate|title()}} {{lang.words.config}}</a>
</td>
</tr>
</table>

View File

@ -6,17 +6,17 @@
{% include 'include/del_confirm.html' %}
<div id="tabs">
<ul id="admin-tabs">
<li><a href="#users" title="Admin area: Manage users - Roxy-WI">Users</a></li>
<li><a href="#groups" title="Admin area: Manage groups - Roxy-WI">Groups</a></li>
<li><a href="#servers" title="Admin area: Manage servers - Roxy-WI">Servers</a></li>
<li><a href="#ssh" title="Admin area: Manage SSH credentials - Roxy-WI">SSH credentials</a></li>
<li><a href="#checker" title="Admin area: Manage checker - Roxy-WI">Checker</a></li>
<li><a href="#openvpn" title="Admin area: OpenVPN - Roxy-WI" id="admin-tabs-vpn">OpenVPN</a></li>
<li><a href="#settings" title="Admin area: Manage Roxy-WI settings - Roxy-WI">Settings</a></li>
<li><a href="#services" title="Admin area: Manage Roxy-WI services - Roxy-WI">Services</a></li>
<li><a href="#updatehapwi" title="Admin area: Update Roxy-WI - Roxy-WI">Update</a></li>
<li><a href="#backup" title="Admin area: Backup configs - Roxy-WI" id="admin-tabs-backup">Backup</a></li>
<li><a href="#installmon" title="Servers: Monitoring service installation - Roxy-WI" id="admin-tabs-mon">Monitoring installation</a></li>
<li><a href="#users" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.users}} - Roxy-WI">{{lang.words.users|title()}}</a></li>
<li><a href="#groups" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.groups}} - Roxy-WI">{{lang.words.groups|title()}}</a></li>
<li><a href="#servers" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.servers}} - Roxy-WI">{{lang.words.servers|title()}}</a></li>
<li><a href="#ssh" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} SSH {{lang.words.creds}} - Roxy-WI">SSH {{lang.words.creds}}</a></li>
<li><a href="#checker" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} Checker - Roxy-WI">Checker</a></li>
<li><a href="#openvpn" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} OpenVPN - Roxy-WI" id="admin-tabs-vpn">OpenVPN</a></li>
<li><a href="#settings" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.settings}} - Roxy-WI">{{lang.words.settings|title()}}</a></li>
<li><a href="#services" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.services}} - Roxy-WI">{{lang.words.services|title()}}</a></li>
<li><a href="#updatehapwi" title="{{lang.words.admin_area|title()}}: {{lang.words.w_update|title()}} Roxy-WI - Roxy-WI">{{lang.words.w_update|title()}}</a></li>
<li><a href="#backup" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.backup|title()}} configs - Roxy-WI" id="admin-tabs-backup">{{lang.words.backup|title()}}</a></li>
<li><a href="#installmon" title="{{lang.words.servers|title()}}: {{lang.words.monitoring|title()}} service installation - Roxy-WI" id="admin-tabs-mon">{{lang.words.monitoring|title()}} {{lang.words.installation}}</a></li>
{% include 'include/login.html' %}
</ul>
<ul id='browse_histroy'></ul>
@ -29,8 +29,8 @@
<table class="overview" id="ajax-group">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn">Name</th>
<th style="width: 100%;">Description</th>
<th class="padding10 first-collumn">{{lang.words.name|title()}}</th>
<th style="width: 100%;">{{lang.words.desc|title()}}</th>
<th></th>
</tr>
<tbody>
@ -54,7 +54,7 @@
{% endif %}
</td>
<td>
<a class="delete" onclick="confirmDeleteGroup({{ group.group_id }})" title="Delete group {{group.name}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteGroup({{ group.group_id }})" title="{{lang.words.delete|title()}} {{lang.words.group}} {{group.name}}" style="cursor: pointer;"></a>
</td>
{% endif %}
</tr>
@ -64,8 +64,8 @@
<br /><span class="add-button" title="Add group" id="add-group-button">+ Add</span>
<br /><br />
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
How to setup groups you can read in this <a href="https://roxy-wi.org/howto/roles-and-groups" title="How to use groups and roles" target="_blank">article</a>
and this <a href="https://roxy-wi.org/howto/setup" title="How to setup servers, group and SSH credentials" target="_blank">article</a>
{{lang.phrases.read_howto}} <a href="https://roxy-wi.org/howto/roles-and-groups" title="How to use groups and roles" target="_blank">{{lang.words.article}}</a>
{{lang.words.and}} {{lang.words.this2}} <a href="https://roxy-wi.org/howto/setup" title="How to setup servers, group and SSH credentials" target="_blank">{{lang.words.article}}</a>
</div>
</div>
<div id="servers">
@ -89,20 +89,20 @@
<thead>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 25%;">
Service
{{lang.words.service|title()}}
</td>
<td class="padding10 first-collumn">
Actions
{{lang.words.actions|title()}}
</td>
<td class="padding10">Version</td>
<td style="width: 100%">Description</td>
<td><span onclick="loadServices()" class="refresh" title="Reload services"></span></td>
<td class="padding10">{{lang.words.version|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>
</tr>
</thead>
<tbody id="ajax-services-body"></tbody>
</table>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
You can read about services <a href="https://roxy-wi.org/services" title="Roxy-WI services" target="_blank">here</a>
{{lang.words.read|title()}} {{lang.words.about}} {{lang.words.services}} <a href="https://roxy-wi.org/services" title="Roxy-WI {{lang.words.services4}}" target="_blank">{{lang.words.here}}</a>
</div>
</div>
@ -110,25 +110,25 @@
<table class="overview">
<thead>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 25%;">Service</td>
<td class="padding10" style="width: 10%">Current version</td>
<td class="padding10" style="width: 10%">Latest version</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="padding10" style="width: 10%">{{lang.words.latest|title()}} {{lang.words.version}}</td>
<td style="width: 10%"></td>
<td style="width: 100%">Description</td>
<td><span onclick="loadupdatehapwi()" class="refresh" title="Reload Update"></span></td>
<td style="width: 100%">{{lang.words.desc|title()}}</td>
<td><span onclick="loadupdatehapwi()" class="refresh" title="{{lang.words.refresh|title()}}"></span></td>
</tr>
</thead>
<tbody id="ajax-updatehapwi-body"></tbody>
</table>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
<b style="font-size: 20px; display: block; padding-bottom: 10px;">Note:</b>
For updating you have to use Roxy-WI RPM or DEB. Read <a href="https://roxy-wi.org/installation" title="Roxy-WI installation" target="_blank">here</a>
how to start using repository
<b style="font-size: 20px; display: block; padding-bottom: 10px;">{{lang.words.note|title()}}:</b>
{{lang.admin_page.desc.for_updating}}. {{lang.words.read|title()}} <a href="https://roxy-wi.org/installation" title="Roxy-WI installation" target="_blank">{{lang.words.here}}</a>
{{lang.admin_page.desc.how_to_using_repo}}
<br /><br />
If the Roxy-WI server uses a proxy to connect to the Internet, add the proxy settings to yum.conf
{{lang.admin_page.desc.proxy_settings}}
<br /><br />
Read more about updating in <a href="https://roxy-wi.org/updates" title="Doc" target="_blank">docs</a>
and <a href="https://roxy-wi.org/changelog.py" title="Changelog" target="_blank">changelog</a>
{{lang.words.read|title()}} {{lang.words.about}} {{lang.words.updating}} <a href="https://roxy-wi.org/updates" title="Doc" target="_blank">docs</a>
{{lang.words.and}} <a href="https://roxy-wi.org/changelog" title="Changelog" target="_blank">changelog</a>
</div>
<div id="ajax-update"></div>
</div>
@ -157,7 +157,7 @@
width: 100
});
$("#slavefor-{{server.0}}" ).selectmenu({
width: 130
width: 115
});
$("#credentials-{{server.0}}" ).selectmenu({
width: 150

View File

@ -24,14 +24,14 @@
<table class="overview hover order-column display compact" id="alerts_table">
<thead>
<tr class="overviewHead">
<th class="padding10" style="width: 10%; padding-left: 10px;">Level</th>
<th>Host</th>
<th class="padding10" style="width: 10%; padding-left: 10px;">{{lang.words.level|title()}}</th>
<th>{{lang.words.host|title()}}</th>
{% if action != "checker_history" %}
<th>Port</th>
<th>{{lang.words.port|title()}}</th>
{% endif %}
<th>Alert</th>
<th>Date</th>
<th>Time</th>
<th>{{lang.words.alert|title()}}</th>
<th>{{lang.words.date|title()}}</th>
<th>{{lang.words.time|title()}}</th>
</tr>
</thead>
<tbody>
@ -47,7 +47,7 @@
{% endif %}
<span style="color: {{color}};"><b>{{t.1 |upper}}</b></span>
</td>
<td><a href="/app/smon.py?action=history&host={{t.2}}" title="Open history for {{t.2}} host">{{t.2}}</a></td>
<td><a href="/app/smon.py?action=history&host={{t.2}}" title="{{lang.words.open|title()}} {{lang.words.history}} {{lang.words.for}} {{t.2}} {{lang.words.host}}">{{t.2}}</a></td>
{% if action != "checker_history" %}
<td>{{t.3}}</td>
{% endif %}
@ -58,7 +58,7 @@
</tr>
{% endfor %}
{% else %}
<span class="alert alert-warning" style="margin-bottom: 0px;">Table is empty</span>
<span class="alert alert-warning" style="margin-bottom: 0px;">{{lang.words.table|title()}} {{lang.words.is}} {{lang.words.empty}}</span>
{% endif %}
</tbody>
</table>
</table>

View File

@ -1,18 +1,19 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<div style="text-align: center;">
<h4>Config {% if config_file_name != 'undefined' %}{{config_file_name.replace('92', '/')}}{%endif%} from {{serv}}</h4>
<h4>{{lang.words.config|title()}} {% if config_file_name != 'undefined' %}{{config_file_name.replace('92', '/')}}{%endif%} {{lang.words.from}} {{serv}} ({{hostname}})</h4>
<p class="accordion-expand-holder">
{% if role <= 3 %}
{% if not is_serv_protected or role <= 2 %}
<a class="ui-button ui-widget ui-corner-all" title="Edit this run config" id="edit_link" href="config.py?service={{service}}&serv={{serv}}&open=open&config_file_name={{config_file_name}}">Edit</a>
<a class="ui-button ui-widget ui-corner-all" title="Edit this run config" id="edit_link" href="config.py?service={{service}}&serv={{serv}}&open=open&config_file_name={{config_file_name}}">{{lang.words.edit|title()}}</a>
{% if service == 'haproxy' %}
<a class="ui-button ui-widget ui-corner-all" title="Add proxy" href="add.py#proxy">Add</a>
<a class="ui-button ui-widget ui-corner-all" title="{{lang.words.add|title()}} {{lang.words.proxy}}" href="add.py#proxy">{{lang.words.add|title()}}</a>
{% elif service == 'keepalived' %}
<a class="ui-button ui-widget ui-corner-all" title="Add VRRP" href="ha.py">Add</a>
<a class="ui-button ui-widget ui-corner-all" title="{{lang.words.add|title()}} VRRP" href="ha.py">{{lang.words.add|title()}}</a>
{% endif %}
{% endif %}
{% endif %}
<a class="accordion-expand-all ui-button ui-widget ui-corner-all" id="expand_link" href="#">Expand all</a>
<button id="raw">Raw</button>
<a class="accordion-expand-all ui-button ui-widget ui-corner-all" id="expand_link" href="#">{{lang.words.expand_all|title()}}</a>
<button id="raw">{{lang.words.raw|title()}}</button>
<button id="according" style="display: none;">According</button>
</p>
</div>
@ -208,7 +209,7 @@
{% if role %}
{% if service != 'keepalived' %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}</a>
</span>
{% endif %}
{% endif %}
@ -219,7 +220,7 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}</a>
</span>
{% endif %}
</span><div>
@ -229,12 +230,12 @@
</div><span class="param">{{- line -}}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}" target="_blank">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}" target="_blank">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
{%- set backend = line.split(' ') -%}
<span class="accordion-link">
<a href="/app/statsview.py?service=haproxy&serv={{-serv-}}#{{- backend[1]-}}" target="_blank">Stats</a>
<a href="/app/statsview.py?service=haproxy&serv={{-serv-}}#{{- backend[1]-}}" target="_blank">{{lang.words.stats|title()}}</a>
</span>
{%- set backend = backend|join('_') -%}
{%- do section_name.update({i: backend}) -%}
@ -246,12 +247,12 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
{% set backend = line.split(' ') %}
<span class="accordion-link">
<a href="/app/statsview.py?serv={{serv}}#{{ backend[1]}}" target="_blank">Stats</a>
<a href="/app/statsview.py?serv={{serv}}#{{ backend[1]}}" target="_blank">{{lang.words.stats|title()}}</a>
</span>
{% set backend = backend|join('_') %}
{% do section_name.update({i: backend}) %}
@ -263,12 +264,12 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
{% set backend = line.split(' ') %}
<span class="accordion-link">
<a href="/app/statsview.py?serv={{serv}}#{{ backend[1]}}" target="_blank">Stats</a>
<a href="/app/statsview.py?serv={{serv}}#{{ backend[1]}}" target="_blank">{{lang.words.stats|title()}}</a>
</span>
</span><div>
{% continue %}
@ -277,7 +278,7 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
</span><div>
@ -287,7 +288,7 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
</span><div>
@ -297,7 +298,7 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
</span><div>
@ -307,7 +308,7 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
</span><div>
@ -317,7 +318,7 @@
</div><span class="param">{{ line }}
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit/Delete</a>
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">{{lang.words.edit|title()}}/{{lang.words.delete|title()}}</a>
</span>
{% endif %}
</span><div>
@ -354,7 +355,7 @@
{%- set bind = bind.split(' ') -%}
<script>
{% set k = i - 1 %}
$('#{{-section_name[k]|replace("\n", "")-}}').html('<a href="http://{{-serv-}}:{{-bind[0]|replace("\n", "")-}}" title="Open {{serv-}}:{{-bind[0]|replace("\n", "")-}}" target="_blank">Open</a>')
$('#{{-section_name[k]|replace("\n", "")-}}').html('<a href="http://{{-serv-}}:{{-bind[0]|replace("\n", "")-}}" title="Open {{serv-}}:{{-bind[0]|replace("\n", "")-}}" target="_blank">{{lang.words.open|title()}}</a>')
</script>
{%- endif -%}
{%- endif -%}
@ -370,17 +371,17 @@
<input type="hidden" value="{{serv}}" name="serv">
<input type="hidden" value="{{configver}}" name="configver">
<input type="hidden" value="1" name="config">
<button type='submit' value='save' name='save' class='btn btn-default' title="Save config without reloading the service">Save</button>
<button type='submit' value='save' name='save' class='btn btn-default' title="{{lang.words.save|title()}} {{lang.words.config}} {{lang.words.without}} {{lang.words.reloading}} {{lang.words.the}} {{lang.words.service2}}">{{lang.words.save|title()}}</button>
{% if is_restart|int == 0 %}
<button type='submit' value='' name='' class='btn btn-default'>Upload and restart</button>
<button type='submit' value='' name='' class='btn btn-default'>{{lang.phrases.upload_and_restart|title()}}</button>
{% endif %}
{% if service != 'keepalived' %}
<button type='submit' value='reload' name='save' class='btn btn-default'>Upload and reload</button>
<button type='submit' value='reload' name='save' class='btn btn-default'>{{lang.phrases.upload_and_reload|title()}}</button>
{% endif %}
</form>
{% endif %}
{% endif %}
<div class="alert alert-info"><b>Note:</b> If you reconfigure Master server, Slave will be reconfigured automatically</div>
<div class="alert alert-info"><b>{{lang.words.note|title()}}:</b> {{lang.phrases.master_slave|title()}}</div>
</center>
{% endif %}
<script>

View File

@ -1,24 +1,26 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import input, checkbox, copy_to_clipboard %}
{% set thead = ' <thead>
<tr class="overviewHead">
<th class="padding10" style="padding-left: 10px; width: 50px;">Number</th>
<th>Target</th>
<th>Protocol</th>
<th>Source</th>
<th>Destination</th>
<th>Port</th>
<th class="padding10" style="padding-left: 10px; width: 50px;">'+lang.words.number|title()+'</th>
<th>'+lang.words.target|title()+'</th>
<th>'+lang.words.protocol|title()+'</th>
<th>'+lang.words.source|title()+'</th>
<th>'+lang.words.dest|title()+'</th>
<th>'+lang.words.port|title()+'</th>
</tr>
</thead>' %}
<div id="firewall_tabs">
<ul>
<li><a href="#input" title="Input firewall rules">Input</a></li>
<li><a href="#input" title="Input firewall rules">{{lang.words.w_input|title()}}</a></li>
<li><a href="#IN_public_allow" title="IN_public_allow firewall rules">IN_public_allow</a></li>
<li><a href="#output" title="Output firewall rules">Output</a></li>
<li><a href="#output" title="Output firewall rules">{{lang.words.output|title()}}</a></li>
</ul>
<div id="input">
<table class="overview">
{{thead}}
<tbody>
{% for p in input %}
{% for p in input_chain %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10" style="padding-left: 10px;">
{{p.split(' ')[0]}}
@ -76,7 +78,7 @@
<table class="overview">
{{thead}}
<tbody>
{% for p in output %}
{% for p in output_chain %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10" style="padding-left: 10px;">
{{p.split(' ')[0]}}
@ -102,9 +104,7 @@
</table>
</div>
</div>
<div class="alert alert-warning">
There are rules only from INPUT, IN_public_allow and OUTPUT chains
</div>
<div class="alert alert-warning">{{lang.phrases.fwd_warn}}</div>
<script>
$( function() {
$("#firewall_tabs").tabs();
@ -115,4 +115,4 @@
border: none !important;
width: 100% !important;
}
</style>
</style>

View File

@ -1,10 +1,11 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% for s in services %}
<tr class="{{ loop.cycle('odd', 'even') }}" id="{{s.0}}">
<td class="padding10 first-collumn">
{% if s.1.0 == 'active' or s.1.0 == 'RUNNING' %}
<span title="{{s.0}} is started"><span class="serverUp server-status"></span></span>
{% else %}
{% if (s.1.0 == 'inactive' or s.1.0 == 'failed' or s.1.0 == 'activating' or s.1.0 == 'STOPPED') and 'is not installed' not in s.3 %}
{% if (s.1.0 == 'inactive' or s.1.0 == 'failed' or s.1.0 == 'activating' or s.1.0 == 'STOPPED') and 'is not installed' not in s.3 %}
<span title="{{s.0}} is stopped"><span class="serverDown server-status"></span></span>
{% else %}
<span title="{{s.0}} is not installed"><span class="serverNone server-status"></span></span>
@ -15,20 +16,20 @@
<td class="padding10 first-collumn">
{% if 'is not installed' in s.3 or not s.3 %}
{% if s.0 in ('prometheus', 'grafana-server') %}
<a class="ui-button ui-widget ui-corner-all" onclick="openTab(10)" title="Install {{service_name}}">Install</a>
<a class="ui-button ui-widget ui-corner-all" onclick="openTab(10)" title="{{lang.words.install|title()}} {{service_name}}">{{lang.words.install|title()}}</a>
{% elif s.0 in ('rabbitmq-server', 'fail2ban') %}
<a class="ui-button ui-widget ui-corner-all" href="https://roxy-wi/services/{{s.0.split('-')[0]}}" title="Install {{s.0|title()}}" target="_blank">Install</a>
<a class="ui-button ui-widget ui-corner-all" href="https://roxy-wi/services/{{s.0.split('-')[0]}}" title="{{lang.words.install|title()}} {{s.0|title()}}" target="_blank">{{lang.words.install|title()}}</a>
{% else %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="Install {{service_name}}">Install</a>
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="{{lang.words.install|title()}} {{service_name}}">{{lang.words.install|title()}}</a>
{% endif %}
{% else %}
<a id="start-{{ s.0 }}" class="start" title="Start and enable {{s.0}} service">
<a id="start-{{ s.0 }}" class="start" title="{{lang.words.start|title()}} {{lang.words.and}} {{lang.words.enable}} {{s.0}} {{lang.words.service}}">
<span class="service-start" onclick="confirmAjaxServiceAction('start', '{{s.0}}')"></span>
</a>
<a id="restart-{{ s.2 }}" class="restart" title="Restart {{s.0}} service">
<a id="restart-{{ s.2 }}" class="restart" title="{{lang.words.restart|title()}} {{s.0}} {{lang.words.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">
<a id="stop-{{ s.0 }}" class="stop" title="{{lang.words.stop|title()}} {{lang.words.and}} {{lang.words.disable}} {{s.0}} {{lang.words.service}}">
<span class="service-stop" onclick="confirmAjaxServiceAction('stop', '{{s.0}}')"></span>
</a>
{% endif %}
@ -39,8 +40,25 @@
{% endif %}
</td>
<td>
{{ s.2 }}
{% if s.0 == 'roxy-wi-smon' %}
{% set description = lang.admin_page.desc.smon_desc %}
{% elif s.0 == 'roxy-wi-checker' %}
{% set description = lang.admin_page.desc.checker_desc %}
{% elif s.0 == 'roxy-wi-keep_alive' %}
{% set description = lang.admin_page.desc.auto_start_desc %}
{% elif s.0 == 'roxy-wi-metrics' %}
{% set description = lang.admin_page.desc.metrics_desc %}
{% elif s.0 == 'roxy-wi-portscanner' %}
{% set description = lang.admin_page.desc.p_s_desc %}
{% elif s.0 == 'roxy-wi-socket' %}
{% set description = lang.admin_page.desc.socket_desc %}
{% elif s.0 == 'roxy-wi-prometheus-exporter' %}
{% set description = 'Prometheus exporter' %}
{% else %}
{% set description = s.2 %}
{% endif %}
{{ description }}
</td>
<td></td>
</tr>
{% endfor %}
{% endfor %}

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import input, select, checkbox %}
{% if user_status == 0 %}
{% include 'include/no_sub.html' %}
@ -15,30 +16,30 @@
{% if s.3 == '* is not installed' and s.3 == '' %}
<div style="text-align: center;">
<br />
<h3>You have not installed Backends checker
Read <a href="https://roxy-wi.org/services/checker#installation" title="Checker installation" style="color: #5d9ceb;" target="_blank">hear</a>
how to install Checker service</h3>
<h3>{{lang.phrases.checker_not_installed}}
{{lang.words.read|title()}} <a href="https://roxy-wi.org/services/checker#installation" title="Checker {{lang.words.installation}}" style="color: #5d9ceb;" target="_blank">{{lang.words.here}}</a>
{{lang.phrases.how_to_install_checker}}</h3>
</div>
{% else %}
<div id="checker_tabs">
<ul id="checker-tabs-head">
<li><a href="#channels" title="Checker channels - Roxy-WI">Channels</a></li>
<li><a href="#checker_settings" title="Checker settings - Roxy-WI">Settings</a></li>
<li><a href="#channels" title="Checker {{lang.words.channels}} - Roxy-WI">{{lang.words.channels|title()}}</a></li>
<li><a href="#checker_settings" title="Checker {{lang.words.settings}} - Roxy-WI">{{lang.words.settings|title()}}</a></li>
</ul>
<div id="channels">
<table id="checker_table" class="overview">
<caption><h3>Telegram channels</h3></caption>
<caption><h3>Telegram {{lang.words.channels}}</h3></caption>
<tr class="overviewHead" style="width: 50%;">
<td class="padding10 first-collumn" style="width: 25%;">
<span title="Token that has given @father_bot">Token</span>
<span title="Token that has given @father_bot">{{lang.words.token|title()}}</span>
</td>
<td style="width: 20%;">Channel name</td>
<td style="width: 20%;">{{lang.words.channel|title()}}</td>
{% if page != "servers.py" %}
<td style="width: 25%;">Group</td>
<td style="width: 25%;">{{lang.words.group|title()}}</td>
{% endif %}
<td style="width: 100%;"></td>
<td></td>
<td><span onclick="loadchecker()" class="refresh" title="Reload Telegram channels"></span></td>
<td><span onclick="loadchecker()" class="refresh" title="{{lang.words.refresh2|title()}} Telegram {{lang.words.channels}}"></span></td>
</tr>
{% for telegram in telegrams %}
<tr id="telegram-table-{{telegram.id}}" class="{{ loop.cycle('odd', 'even') }}">
@ -53,7 +54,7 @@
{% if page != "servers.py" %}
<td>
<select id="telegramgroup-{{telegram.id}}" name="telegramgroup-{{telegram.id}}">
<option disabled selected>Choose group</option>
<option disabled selected>------</option>
{% for group in groups %}
{% if telegram.groups|string() == group.group_id|string() %}
<option value="{{ group.group_id }}" selected>{{ group.name }}</option>
@ -65,32 +66,32 @@
</td>
{% endif %}
<td>
<button title="Send a test message" onclick="checkTelegram({{telegram.id}})">Test</button>
<button title="Send a test message" onclick="checkTelegram({{telegram.id}})">{{lang.words.test|title()}}</button>
</td>
<td>
<a class="add" onclick="cloneTelegram({{telegram.id}})" id="clone-{{telegram.id}}" title="Copy the settings from {{telegram.chanel_name}}" style="cursor: pointer;"></a>
<a class="add" onclick="cloneTelegram({{telegram.id}})" id="clone-{{telegram.id}}" title="{{lang.words.w_copy|title()}} {{lang.words.the}} {{lang.words.settings}} {{telegram.chanel_name}}" style="cursor: pointer;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteTelegram({{telegram.id}})" title="Delete channel {{telegram.chanel_name}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteTelegram({{telegram.id}})" title="{{lang.words.delete|title()}} {{lang.words.channel}} {{telegram.chanel_name}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endfor %}
</table>
<br /><span class="add-button" title="Add telegram channel" id="add-telegram-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} Telegram {{lang.words.channel}}" id="add-telegram-button">+ {{lang.words.add|title()}}</span>
<br /><br />
<table id="checker_slack_table" class="overview">
<caption><h3>Slack channels</h3></caption>
<caption><h3>Slack {{lang.words.channels|title()}}</h3></caption>
<tr class="overviewHead" style="width: 50%;">
<td class="padding10 first-collumn" style="width: 25%;">
<span title="Token that has given with APP registration">Token</span>
<span title="Token that has given with APP registration">{{lang.words.token|title()}}</span>
</td>
<td style="width: 20%;">Channel name</td>
<td style="width: 20%;">{{lang.words.channel|title()}}</td>
{% if page != "servers.py" %}
<td style="width: 25%;">Group</td>
<td style="width: 25%;">{{lang.words.group|title()}}</td>
{% endif %}
<td style="width: 100%;"></td>
<td></td>
<td><span onclick="loadchecker()" class="refresh" title="Reload Slack channels"></span></td>
<td><span onclick="loadchecker()" class="refresh" title="{{lang.words.refresh2|title()}} Slack {{lang.words.channels}}"></span></td>
</tr>
{% for slack in slacks %}
<tr id="slack-table-{{slack.id}}" class="{{ loop.cycle('odd', 'even') }}">
@ -105,7 +106,7 @@
{% if page != "servers.py" %}
<td>
<select id="slackgroup-{{slack.id}}" name="slackgroup-{{slack.id}}">
<option disabled selected>Choose group</option>
<option disabled selected>------</option>
{% for group in groups %}
{% if slack.groups|string() == group.group_id|string() %}
<option value="{{ group.group_id }}" selected>{{ group.name }}</option>
@ -117,63 +118,63 @@
</td>
{% endif %}
<td>
<button title="Send a test message" onclick="checkSlack({{slack.id}})">Test</button>
<button title="{{lang.phrases.send_test_mes}}" onclick="checkSlack({{slack.id}})">{{lang.words.test|title()}}</button>
</td>
<td>
<a class="add" onclick="cloneSlack({{slack.id}})" id="clone-{{slack.id}}" title="Clone {{slack.chanel_name}}" style="cursor: pointer;"></a>
<a class="add" onclick="cloneSlack({{slack.id}})" id="clone-{{slack.id}}" title="{{lang.words.w_copy|title()}} {{lang.words.the}} {{lang.words.settings}} {{slack.chanel_name}}" style="cursor: pointer;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteSlack({{slack.id}})" title="Delete channel {{slack.chanel_name}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteSlack({{slack.id}})" title="{{lang.words.delete|title()}} {{lang.words.channel}} {{slack.chanel_name}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endfor %}
</table>
<br /><span class="add-button" title="Add Slack channel" id="add-slack-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} Slack {{lang.words.channel|title()}}" id="add-slack-button">+ {{lang.words.add|title()}}</span>
<br /><br />
<table class="overview">
<caption><h3>Test messages</h3></caption>
<caption><h3>{{lang.words.test2|title()}} {{lang.words.message}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 45%">Email</td>
<td style="width: 100%">Web panel</td>
<td class="padding10 first-collumn" style="width: 45%">{{lang.words.email|title()}}</td>
<td style="width: 100%">{{lang.words.web_panel|title()}}</td>
</tr>
<tr>
<td class="padding10 first-collumn">
<button title="Send a test message via Email" onclick="checkEmail()">Test</button>
<button title="{{lang.phrases.send_test_mes}} {{lang.words.via}} {{lang.words.email}}" onclick="checkEmail()">{{lang.words.test|title()}}</button>
</td>
<td>
<button title="Send a test message via Web panel" onclick="checkWebPanel()">Test</button>
<button title="{{lang.phrases.send_test_mes}} {{lang.words.via}} {{lang.words.web_panel}}" onclick="checkWebPanel()">{{lang.words.test|title()}}</button>
</td>
</tr>
</table>
<br /><br />
<div id="ajax-telegram"></div>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the description of all parameters <a href="https://roxy-wi.org/description/checker" title="Servers description" target="_blank">here</a>,
How to create and use Telegram bot in this <a href="https://roxy-wi.org/howto/create-telegram-bot" title="How to create Telegram bot and use it with Roxy-WI" target="_blank">article</a>,
How to create and use Slack APP in this <a href="https://roxy-wi.org/howto/create-slack-app" title="How to create Slack APP and use it with Roxy-WI" target="_blank">article</a>
{{lang.phrases.read_about_parameters}} <a href="https://roxy-wi.org/description/checker" title="Servers description" target="_blank">{{lang.words.here}}</a>,
{{lang.phrases.read_howto}} Telegram bot <a href="https://roxy-wi.org/howto/create-telegram-bot" title="How to create Telegram bot and use it with Roxy-WI" target="_blank">{{lang.words.article}}</a>,
{{lang.phrases.read_howto}} {{lang.words.use}} Slack APP <a href="https://roxy-wi.org/howto/create-slack-app" title="How to create Slack APP and use it with Roxy-WI" target="_blank">{{lang.words.article}}</a>
</div>
</div>
<div id="checker_settings">
<table class="overview checker_settings_table" id="checker_haproxy_table">
<caption><h3>HAProxy servers</h3></caption>
<caption><h3>HAProxy {{lang.words.servers}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Server</td>
<td class="first-collumn" title="Alert via Telegram">Telegram</td>
<td class="first-collumn" title="Alert via Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;" title="Alert via email">Email</td>
<td class="checkbox-head" style="width: 10%;" title="Alert about changing service status">Service</td>
<td class="checkbox-head" style="width: 10%;" title="Alert about changing backend status">Backend</td>
<td class="checkbox-head" style="width: 100%;" title="Alert if the number of connections is about to reach the limit">Maxconn</td>
<td><span onclick="loadchecker(1)" class="refresh" title="Reload"></span></td>
<td class="padding10 first-collumn">{{lang.words.server|title()}}</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Telegram">Telegram</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.email}}">{{lang.words.email|title()}}</td>
<td class="checkbox-head" style="width: 10%;" title="{{lang.phrases.alert_service_change_status}}">{{lang.words.service|title()}}</td>
<td class="checkbox-head" style="width: 10%;" title="{{lang.phrases.alert_backend_change_status}}">{{lang.words.backend|title()}}</td>
<td class="checkbox-head" style="width: 100%;" title="{{lang.phrases.alert_number_conn}}">Maxconn</td>
<td><span onclick="loadchecker(1)" class="refresh" title="{{lang.words.refresh2|title()}}"></span></td>
</tr>
{% for s in haproxy_servers %}
{% for h in haproxy_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 1 %}
<tr id="haproxy_server_tr_id-{{h.id}}">
<td class="padding10 first-collumn" id="haproxy_server_name-{{h.id}}">{{s.1}}</td>
<td id="haproxy_server_telegram-{{h.id}}" title="Alert via this channel">
<td id="haproxy_server_telegram-{{h.id}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="haproxy_server_telegram_channel-{{h.id}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in telegrams %}
{% if h.telegram_id|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -183,9 +184,9 @@
{% endfor %}
</select>
</td>
<td id="haproxy_server_slack-{{s.0}}" title="Alert via this channel">
<td id="haproxy_server_slack-{{s.0}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="haproxy_server_slack_channel-{{h.id}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -195,7 +196,7 @@
{% endfor %}
</select>
</td>
<td class="checkbox" title="Alert via email">
<td class="checkbox" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.email}}">
{% set id = 'haproxy_server_email-' + h.id|string() %}
{% if h.email == 1 %}
{{ checkbox(id, checked='checked') }}
@ -206,25 +207,25 @@
<td class="checkbox">
{% set id = 'haproxy_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
{{ checkbox(id, checked='checked', title='Alert about changing service status') }}
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
{% else %}
{{ checkbox(id, title='Alert about changing service status') }}
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
{% endif %}
</td>
<td class="checkbox">
{% set id = 'haproxy_server_backend-' + h.id|string() %}
{% if h.backend_alert == 1 %}
{{ checkbox(id, checked='checked', title='Alert about changing backend status') }}
{{ checkbox(id, checked='checked', title=lang.phrases.alert_backend_change_status) }}
{% else %}
{{ checkbox(id, title='Alert about changing backend status') }}
{{ checkbox(id, title=lang.phrases.alert_backend_change_status) }}
{% endif %}
</td>
<td class="checkbox">
{% set id = 'haproxy_server_maxconn-' + h.id|string() %}
{% if h.maxconn_alert == 1 %}
{{ checkbox(id, checked='checked', title='Alert if the number of connections is about to reach the limit') }}
{{ checkbox(id, checked='checked', title=lang.phrases.alert_number_conn) }}
{% else %}
{{ checkbox(id, title='Alert if the number of connections is about to reach the limit') }}
{{ checkbox(id, title=lang.phrases.alert_number_conn) }}
{% endif %}
</td>
<td></td>
@ -234,21 +235,21 @@
{% endfor %}
</table>
<table class="overview checker_settings_table" id="checker_nginx_table">
<caption><h3>NGINX servers</h3></caption>
<caption><h3>NGINX {{lang.words.servers}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Server</td>
<td class="first-collumn" title="Alert via Telegram">Telegram</td>
<td class="first-collumn" title="Alert via Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;" title="Alert via Email">Email</td>
<td class="checkbox-head" style="width: 100%;" title="Alert about changing service status">Service</td>
<td><span onclick="loadchecker(1)" class="refresh" title="Reload"></span></td>
<td class="padding10 first-collumn">{{lang.words.server|title()}}</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Telegram">Telegram</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.email}}">{{lang.words.email|title()}}</td>
<td class="checkbox-head" style="width: 100%;" title={{lang.phrases.alert_service_change_status}}>{{lang.words.service|title()}}</td>
<td><span onclick="loadchecker(1)" class="refresh" title="{{lang.words.refresh2|title()}}"></span></td>
</tr>
{% for s in nginx_servers %}
{% for h in nginx_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 2 %}
<tr id="nginx_server_tr_id-{{h.id}}">
<td class="padding10 first-collumn" id="nginx_server_name-{{h.id}}">{{s.1}}</td>
<td id="nginx_server_telegram-{{h.id}}" title="Alert via this channel">
<td id="nginx_server_telegram-{{h.id}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="nginx_server_telegram_channel-{{h.id}}">
<option value="0">Disabled</option>
{% for t in telegrams %}
@ -260,9 +261,9 @@
{% endfor %}
</select>
</td>
<td id="nginx_server_slack-{{h.id}}" title="Alert via this channel">
<td id="nginx_server_slack-{{h.id}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="nginx_server_slack_channel-{{h.id}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -275,17 +276,17 @@
<td class="checkbox">
{% set id = 'nginx_server_email-' + h.id|string() %}
{% if h.email == 1 %}
{{ checkbox(id, checked='checked', title='Alert via email') }}
{{ checkbox(id, checked='checked', title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
{% else %}
{{ checkbox(id, title='Alert via email') }}
{{ checkbox(id, title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
{% endif %}
</td>
<td class="checkbox">
{% set id = 'nginx_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
{{ checkbox(id, checked='checked', title='Alert about changing service status') }}
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
{% else %}
{{ checkbox(id, title='Alert about changing service status') }}
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
{% endif %}
</td>
<td></td>
@ -295,23 +296,23 @@
{% endfor %}
</table>
<table class="overview checker_settings_table" id="checker_apache_table">
<caption><h3>Apache servers</h3></caption>
<caption><h3>Apache {{lang.words.servers}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Server</td>
<td class="first-collumn" title="Alert via Telegram">Telegram</td>
<td class="first-collumn" title="Alert via Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;">Email</td>
<td class="checkbox-head" style="width: 100%;" title="Alert about changing service status">Service</td>
<td><span onclick="loadchecker(1)" class="refresh" title="Reload"></span></td>
<td class="padding10 first-collumn">{{lang.words.server|title()}}</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Telegram">Telegram</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;">{{lang.words.email|title()}}</td>
<td class="checkbox-head" style="width: 100%;" title="{{lang.phrases.alert_service_change_status}}">{{lang.words.service|title()}}</td>
<td><span onclick="loadchecker(1)" class="refresh" title="{{lang.words.refresh2|title()}}"></span></td>
</tr>
{% for s in apache_servers %}
{% for h in apache_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 4 %}
<tr id="apache_server_tr_id-{{h.id}}">
<td class="padding10 first-collumn" id="apache_server_name-{{h.id}}">{{s.1}}</td>
<td id="apache_server_telegram-{{h.id}}" title="Alert via this channel">
<td id="apache_server_telegram-{{h.id}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="apache_server_telegram_channel-{{h.id}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in telegrams %}
{% if h.telegram_id|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -321,9 +322,9 @@
{% endfor %}
</select>
</td>
<td id="apache_server_slack-{{h.id}}" title="Alert via this channel">
<td id="apache_server_slack-{{h.id}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="apache_server_slack_channel-{{h.id}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -336,17 +337,17 @@
<td class="checkbox">
{% set id = 'apache_server_email-' + h.id|string() %}
{% if h.email == 1 %}
{{ checkbox(id, checked='checked', title='Alert via email') }}
{{ checkbox(id, checked='checked', title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
{% else %}
{{ checkbox(id, title='Alert via email') }}
{{ checkbox(id, title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
{% endif %}
</td>
<td class="checkbox">
{% set id = 'apache_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
{{ checkbox(id, checked='checked', title='Alert about changing service status') }}
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
{% else %}
{{ checkbox(id, title='Alert about changing service status') }}
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
{% endif %}
</td>
<td></td>
@ -356,24 +357,24 @@
{% endfor %}
</table>
<table class="overview checker_settings_table" id="checker_keepalived_table">
<caption><h3>Keepalived servers</h3></caption>
<caption><h3>Keepalived {{lang.words.servers}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Server</td>
<td class="first-collumn" title="Alert via Telegram">Telegram</td>
<td class="first-collumn" title="Alert via Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;">Email</td>
<td class="checkbox-head" style="width: 10%;" title="Alert about changing service status">Service</td>
<td class="checkbox-head" style="width: 100%;" title="Alert about changing Master/Backup status">Status</td>
<td><span onclick="loadchecker(1)" class="refresh" title="Reload"></span></td>
<td class="padding10 first-collumn">{{lang.words.server|title()}}</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Telegram">Telegram</td>
<td class="first-collumn" title="{{lang.words.alert|title()}} {{lang.words.via}} Slack">Slack</td>
<td class="checkbox-head" style="width: 10%;">{{lang.words.email|title()}}</td>
<td class="checkbox-head" style="width: 10%;" title="{{lang.phrases.alert_service_change_status}}">{{lang.words.service|title()}}</td>
<td class="checkbox-head" style="width: 100%;" title="{{lang.phrases.alert_master_backup}}">{{lang.words.status|title()}}</td>
<td><span onclick="loadchecker(1)" class="refresh" title="{{lang.words.refresh2|title()}}"></span></td>
</tr>
{% for s in keepalived_servers %}
{% for h in keepalived_settings %}
{% if h.server_id|string() == s.0|string() and h.service_id == 3 %}
<tr id="keepalived_server_tr_id-{{h.id}}">
<td class="padding10 first-collumn" id="keepalived_server_name-{{h.id}}">{{s.1}}</td>
<td id="keepalived_server_telegram-{{h.id}}" title="Alert via this channel">
<td id="keepalived_server_telegram-{{h.id}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="keepalived_server_telegram_channel-{{h.id}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in telegrams %}
{% if h.telegram_id|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -383,9 +384,9 @@
{% endfor %}
</select>
</td>
<td id="keepalived_server_slack-{{h.id}}" title="Alert via this channel">
<td id="keepalived_server_slack-{{h.id}}" title="{{lang.words.alert|title()}} {{lang.words.via}} {{lang.words.this3}} {{lang.words.channel}}">
<select id="keepalived_server_slack_channel-{{h.id}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in slacks %}
{% if h.slack_id|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -398,25 +399,25 @@
<td class="checkbox">
{% set id = 'keepalived_server_email-' + h.id|string() %}
{% if h.email == 1 %}
{{ checkbox(id, checked='checked', title='Alert via email') }}
{{ checkbox(id, checked='checked', title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
{% else %}
{{ checkbox(id, title='Alert via email') }}
{{ checkbox(id, title=lang.words.alert|title()+' '+lang.words.via + ' '+lang.words.email) }}
{% endif %}
</td>
<td class="checkbox">
{% set id = 'keepalived_server_status-' + h.id|string() %}
{% if h.service_alert == 1 %}
{{ checkbox(id, checked='checked', title='Alert about changing service status') }}
{{ checkbox(id, checked='checked', title=lang.phrases.alert_service_change_status) }}
{% else %}
{{ checkbox(id, title='Alert about changing service status') }}
{{ checkbox(id, title=lang.phrases.alert_service_change_status) }}
{% endif %}
</td>
<td class="checkbox">
{% set id = 'keepalived_server_backend-' + h.id|string() %}
{% if h.backend_alert == 1 %}
{{ checkbox(id, checked='checked', title='Alert about changing Master/Backup status') }}
{{ checkbox(id, checked='checked', title=lang.phrases.alert_master_backup) }}
{% else %}
{{ checkbox(id, title='Alert about changing Master/Backup status') }}
{{ checkbox(id, title=lang.phrases.alert_master_backup) }}
{% endif %}
</td>
<td></td>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% set current_ver = versions.0 %}
{% set new_ver = versions.1 %}
{% set current_ver_without_dots = versions.2 %}
@ -9,10 +10,10 @@
<td>
<b
{% if new_ver_without_dots > current_ver_without_dots and new_ver != "Sorry cannot get current version" %}
title="There is a newer version Roxy-WI"
title=lang.admin_page.desc.a_new_version+" Roxy-WI"
style="color: var(--red-color)"
{% else %}
title="There is not a newer version Roxy-WI"
title=lang.admin_page.desc.no_new_version+" Roxy-WI"
style="color: var(--green-color)"
{% endif %}
>
@ -24,11 +25,11 @@
</td>
<td>
{% 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" onclick="updateService('roxy-wi')" title="Update Roxy-WI">Update</a>
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('roxy-wi')" title="{{lang.words.w_update|title()}} Roxy-WI">{{lang.words.w_update|title()}}</a>
{% endif %}
</td>
<td>
The main application
{{lang.admin_page.desc.main_app}}
</td>
<td></td>
</tr>
@ -43,7 +44,7 @@
{% if s.3|float < smon_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% set description = 'SMON stands for <b>S</b>imple <b>MON</b>itoring' %}
{% set description = lang.admin_page.desc.smon_desc %}
{% elif s.0 == 'roxy-wi-checker' %}
{% set service_name = 'Checker' %}
{% set service_link = 'checker' %}
@ -51,7 +52,7 @@
{% if s.3|float < checker_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% set description = 'Checker is designed for monitoring HAProxy, Nginx, Apache and Keepalived services as well as HAProxy backends and maxconn' %}
{% set description = lang.admin_page.desc.checker_desc %}
{% elif s.0 == 'roxy-wi-keep_alive' %}
{% set service_name = 'Auto start' %}
{% set service_link = 'auto_start' %}
@ -59,7 +60,7 @@
{% if s.3|float < keep_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% set description = 'The Auto Start service allows to restart the HAProxy, NGINX, Apache and Keepalived services if they are down' %}
{% set description = lang.admin_page.desc.auto_start_desc %}
{% elif s.0 == 'roxy-wi-metrics' %}
{% set service_name = 'Metrics' %}
{% set service_link = 'metrics' %}
@ -67,7 +68,7 @@
{% if s.3|float < metrics_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% set description = 'Collects number of connections for HAProxy, NGINX, Apache and HAProxy WAF services' %}
{% set description = lang.admin_page.desc.metrics_desc %}
{% elif s.0 == 'roxy-wi-portscanner' %}
{% set service_name = 'Port scanner' %}
{% set service_link = 'portscanner' %}
@ -75,7 +76,7 @@
{% if s.3|float < portscanner_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% set description = 'Probes and saves a server or host for open ports' %}
{% set description = lang.admin_page.desc.p_s_desc %}
{% elif s.0 == 'roxy-wi-socket' %}
{% set service_name = 'Socket service' %}
{% set service_link = 'socket' %}
@ -83,7 +84,7 @@
{% if s.3|float < socket_ver|float %}
{% set is_need_update = 1 %}
{% endif %}
{% set description = 'Socket is a service for sending alerts and notifications' %}
{% set description = lang.admin_page.desc.socket_desc %}
{% elif s.0 == 'roxy-wi-prometheus-exporter' %}
{% set service_name = 'Prometheus exporter' %}
{% set service_link = 'prometheus-exporter' %}
@ -94,16 +95,16 @@
{% set description = 'Prometheus exporter' %}
{% endif %}
<td class="padding10 first-collumn">
<a href="{{desc_link}}" title="Read more about {{service_name}}" target="_blank" class="link" rel="noopener noreferrer">{{service_name}}</a>
<a href="{{desc_link}}" title="{{lang.words.read|title()}} {{lang.words.more}} {{lang.words.about}} {{service_name}}" target="_blank" class="link" rel="noopener noreferrer">{{service_name}}</a>
</td>
<td>
{% if s.3 != '* is not installed' and s.3 != '' %}
<b id="current-version-{{s.0}}"
{% if is_need_update %}
title="There is a newer version {{service_name}}"
title="{{lang.admin_page.desc.a_new_version}} {{service_name}}"
style="color: var(--red-color)"
{% else %}
title="There is not a newer version {{service_name}}"
title="{{lang.admin_page.desc.no_new_version}} {{service_name}}"
style="color: var(--green-color)"
{% endif %}
>
@ -133,15 +134,15 @@
<td>
{% if 'is not installed' not in s.3 and s.3 != '' %}
{% if is_need_update %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}')" title="Update {{service_name}}">Update</a>
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}')" title="{{lang.words.w_update|title()}} {{service_name}}">{{lang.words.w_update|title()}}</a>
{% endif %}
{% else %}
{% if s.0 in ('prometheus', 'grafana-server') %}
<a class="ui-button ui-widget ui-corner-all" onclick="openTab(10)" title="Install {{service_name}}">Install</a>
<a class="ui-button ui-widget ui-corner-all" onclick="openTab(10)" title="{{lang.words.install|title()}} {{service_name}}">{{lang.words.install|title()}}</a>
{% elif s.0 in ('rabbitmq-server', 'fail2ban') %}
<a class="ui-button ui-widget ui-corner-all" href="https://roxy-wi/services/{{s.0.split('-')[0]}}" title="Install {{s.0|title()}}" target="_blank">Install</a>
<a class="ui-button ui-widget ui-corner-all" href="https://roxy-wi/services/{{s.0.split('-')[0]}}" title="{{lang.words.install|title()}} {{s.0|title()}}" target="_blank">{{lang.words.install|title()}}</a>
{% else %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="Install {{service_name}}">Install</a>
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="{{lang.words.install|title()}} {{service_name}}">{{lang.words.install|title()}}</a>
{% endif %}
{% endif %}
</td>

View File

@ -54,7 +54,7 @@
</span>
</td>
<td>
<a class="delete" onclick="confirmDeleteGit({{b.id}})" title="Delete git {{b.server}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteGit({{b.id}})" title="{{lang.words.delete|title()}} git {{b.server}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endif %}

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% set waf_modes = [] %}
{% do waf_modes.append("On") %}
{% do waf_modes.append("Off") %}
@ -13,31 +14,31 @@
{% if service.2|int() >= 1 %}
<span class="serverUp server-status" title="running {{service.2 }} processes"></span>
{% else %}
<span class="serverDown server-status" title="WAF is stopped"></span>
<span class="serverDown server-status" title="WAF {{lang.words.is}} {{lang.words.stopped}} "></span>
{% endif %}
<a href="/app/logs.py?serv={{ service.1 }}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00&waf=1" title="View {{service.0 }}'s WAF logs" class="logs_link">
<a href="/app/logs.py?serv={{ service.1 }}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00&waf=1" title="{{lang.words.view|title()}} {{service.0 }}'s WAF {{lang.words.logs}}" class="logs_link">
{{ service.0 }}
</a>
{% else %}
<span class="serverNone server-status" title="WAF is not installed"></span> <span title="WAF is not installed">{{ service.0 }}</span>
<span class="serverNone server-status" title="WAF {{lang.words.is}} {{lang.words.not}} {{lang.words.installed}}"></span> <span title="WAF {{lang.words.is}} {{lang.words.not}} {{lang.words.installed}}">{{ service.0 }}</span>
{% endif %}
</td>
{{service.3}}
{% if service.3 == "On" or service.3 == "Off" or service.3 == "DetectionOnly" %}
<td>
{% if role <= 2 %}
<a id="{{ service.1 }}" class="start-waf" title="Start WAF service">
<a id="{{ service.1 }}" class="start-waf" title="{{lang.words.start|title()}} WAF {{lang.words.service}}">
<span class="service-start" onclick="confirmAjaxAction('start', '{{service_name}}', '{{service.1}}')"></span>
</a>
<a id="{{ service.1 }}" class="stop-waf" title="Stop WAF service">
<a id="{{ service.1 }}" class="stop-waf" title="{{lang.words.stop|title()}} WAF {{lang.words.service}}">
<span class="service-stop" onclick="confirmAjaxAction('stop', '{{service_name}}', '{{service.1}}')"></span>
</a>
{% if waf_service == 'haproxy' %}
<a id="{{ service.1 }}" class="restart-waf" title="Restart WAF service">
<a id="{{ service.1 }}" class="restart-waf" title="{{lang.words.restart|title()}} WAF {{lang.words.service}}">
<span class="service-reload" onclick="confirmAjaxAction('restart', 'waf', '{{service.1}}')"></span>
</a>
{% else %}
<a id="{{ service.1 }}" class="reload-waf" title="Reload WAF service">
<a id="{{ service.1 }}" class="reload-waf" title="{{lang.words.reload|title()}} WAF {{lang.words.service}}">
<span class="service-reload" onclick="confirmAjaxAction('reload', 'nginx', '{{service.1}}')"></span>
</a>
{% endif %}
@ -69,21 +70,21 @@
{% endif %}
<td>
{% if role <= 2 %}
<a href="/app/waf.py?service={{waf_service}}&manage_rules=1&serv={{service.1}}" class="ui-button ui-widget ui-corner-all">Open</a>
<a href="/app/waf.py?service={{waf_service}}&manage_rules=1&serv={{service.1}}" class="ui-button ui-widget ui-corner-all">{{lang.words.open|title()}}</a>
{% endif %}
</td>
<td>
{% if waf_service == 'haproxy' %}
<a href="/app/logs.py?service={{waf_service}}&serv={{ service.1 }}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00&waf=1" class="ui-button ui-widget ui-corner-all" title="View log">View</a>
<a href="/app/logs.py?service={{waf_service}}&serv={{ service.1 }}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00&waf=1" class="ui-button ui-widget ui-corner-all" title="{{lang.words.view|title()}} {{lang.words.log}}">{{lang.words.view|title()}}</a>
{% elif waf_service == 'nginx' %}
<a href="/app/logs.py?service={{waf_service}}&serv={{ service.1 }}&rows=10&grep=ModSecurity&hour=00&minut=00&hour1=24&minut1=00&file=error.log&waf=0" class="ui-button ui-widget ui-corner-all" title="View log">View</a>
<a href="/app/logs.py?service={{waf_service}}&serv={{ service.1 }}&rows=10&grep=ModSecurity&hour=00&minut=00&hour1=24&minut1=00&file=error.log&waf=0" class="ui-button ui-widget ui-corner-all" title="{{lang.words.view|title()}} {{lang.words.log}}">{{lang.words.view|title()}}</a>
{% endif %}
</td>
<td></td>
{% else %}
{% if role <= 2 %}
<td colspan="6">
<a title="Install WAF"><button onclick="installWaf('{{ service.1 }}')">Install</button></a>
<a title="{{lang.words.install|title()}} WAF"><button onclick="installWaf('{{ service.1 }}')">{{lang.words.install|title()}}</button></a>
</td>
{% endif %}
{% endif %}
@ -105,4 +106,4 @@
<style>
.ui-selectmenu-button.ui-button {width: 10em;}
.fa-play, .fa-stop, .fa-sync-alt { margin-bottom: -1px; }
</style>
</style>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import input, select, checkbox %}
{% from 'include/provisioning/variables.html' import generate_opt_options, get_nice_name %}
{% for s in server %}

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import input, select, checkbox %}
{% from 'include/provisioning/variables.html' import get_nice_name, generate_opt_options %}
{% for s in server %}

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import input, select, checkbox %}
{% from 'include/provisioning/variables.html' import generate_opt_options, get_nice_name %}
{% for s in server %}

View File

@ -1,9 +1,10 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<table class="overview">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn">Port</th>
<th>State</th>
<th>Service</th>
<th class="padding10 first-collumn">{{lang.words.port|title()}}</th>
<th>{{lang.words.state|title()}}</th>
<th>{{lang.words.service|title()}}</th>
</tr>
</thead>
<tbody>
@ -27,4 +28,4 @@
{% for i in info %}
{{i}}<br />
{% endfor %}
</div>
</div>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import copy_to_clipboard %}
<script>
$(document).ready(function() {
@ -19,13 +20,13 @@
<table class="overview hover order-column display compact" id="sessions_table">
<thead>
<tr class="overviewHead">
<th class="padding10" style="padding-left: 15px;">Protocol</th>
<th>Source</th>
<th>Frontend</th>
<th>Backend</th>
<th>Age</th>
<th>Rate</th>
<th>Expire</th>
<th class="padding10" style="padding-left: 15px;">{{lang.words.protocol|title()}}</th>
<th>{{lang.words.source|title()}}</th>
<th>{{lang.words.frontend|title()}}</th>
<th>{{lang.words.backend|title()}}</th>
<th>{{lang.words.age|title()}}</th>
<th>{{lang.words.rate|title()}}</th>
<th>{{lang.words.expire|title()}}</th>
<th></th>
<th></th>
</tr>
@ -59,13 +60,13 @@
{% endif %}
</td>
<td>
<a class="info" title="Get more info about this session" style="cursor: pointer;" onclick="getSessionInfo('{{s.strip().split(':')[0]}}')"></a>
<a class="info" title="{{lang.words.w_get|title()}} {{lang.words.more}} {{lang.words.info}}" style="cursor: pointer;" onclick="getSessionInfo('{{s.strip().split(':')[0]}}')"></a>
</td>
<td>
<a class="delete" title="Delete this session" style="cursor: pointer;" onclick="deleteSession(this, '{{s.strip().split(':')[0]}}')"></a>
<a class="delete" title="{{lang.words.delete|title()}}" style="cursor: pointer;" onclick="deleteSession(this, '{{s.strip().split(':')[0]}}')"></a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</table>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import copy_to_clipboard %}
{% if style == 'new' %}
{% if for_delver == '1' %}
@ -55,18 +56,18 @@
<label for="new_select_all" id="new_label_select_all"></label>
<input type="checkbox" id="new_select_all">
</th>
<th>User</th>
<th>{{lang.words.user|title()}}</th>
<th class="padding10 first-collumn" style="width: 30%">
Local path
{{lang.words.local|title()}} {{lang.words.path}}
</th>
<th class="padding10 first-collumn" style="width: 10%">
Remote path
{{lang.words.remote|title()}} {{lang.words.path}}
</th>
<th class="padding10 first-collumn" style="width: 35%">
Diff
{{lang.words.diff|title()}}
</th>
<th style="width: 10%">
Created
{{lang.words.created|title()}}
</th>
<th></th>
</tr>
@ -92,9 +93,9 @@
<td>{{ copy_to_clipboard(id=c.remote_path, value=c.remote_path) }}</td>
<td>
{% if c.diff == '' %}
No diff
{{lang.words.no|title()}} {{lang.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">Show diff</a>
<a id="link_show_diff_{{c.id}}" onclick="show_diff('{{c.id}}')" title="Show a difference between this config and previous one" class="link">{{lang.words.show|title()}} {{lang.words.diff2}}</a>
<div id="show_diff_{{c.id}}" style="display: none;">
{% set stdout = c.diff.split('\n') %}
{% include 'ajax/compare.html' %}
@ -104,8 +105,8 @@
<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="View and upload this version of the config" style="margin-top: -6px;">
View/Upload
class="ui-button ui-widget ui-corner-all" title="{{lang.phrases.view_and_upload}}" style="margin-top: -6px;">
{{lang.words.view|title()}}/{{lang.words.upload|title()}}
</a>
</td>
</tr>
@ -117,7 +118,7 @@
<input type="hidden" value="del" name="del">
<input type="hidden" value="{{style}}" name="style">
<p>
<button type="submit" value="" name="" class="btn btn-default">Delete</button>
<button type="submit" value="" name="" class="btn btn-default">{{lang.words.delete|title()}}</button>
</p>
</form>
{% else %}
@ -137,7 +138,7 @@
<input type="hidden" value="{{serv}}" name="serv">
<input type="hidden" value="open" name="open">
<input type="hidden" value="{{service}}" name="service" id="service">
<a class="ui-button ui-widget ui-corner-all" id="show" title="Enter" onclick="showUploadConfig()">Select</a>
<a class="ui-button ui-widget ui-corner-all" id="show" title="{{lang.words.enter|title()}}" onclick="showUploadConfig()">{{lang.words.select2|title()}}</a>
</p>
<script>
$( "select" ).selectmenu();
@ -156,14 +157,14 @@
<label for="{{file}}"> {{file.split('-', maxsplit=1)[1]}} </label><input type="checkbox" value="{{file}}" name="{{file}}" id="{{file}}">
<a href="/app/versions.py?service={{service}}&serv={{serv}}&open=open&configver={{file}}"
class="ui-button ui-widget ui-corner-all" title="View and upload this version of the config" style="margin-top: -6px;">
View/Upload
{{lang.words.view|title()}}/{{lang.words.upload|title()}}
</a><br />
{% endfor %}
<input type="hidden" value="{{serv}}" name="serv">
<input type="hidden" value="open" name="open">
<input type="hidden" value="del" name="del">
<p>
<button type="submit" value="" name="" class="btn btn-default">Delete</button>
<button type="submit" value="" name="" class="btn btn-default">{{lang.words.delete|title()}}</button>
</p>
</form>
</center>
@ -183,7 +184,7 @@
</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()">Select</a>
<a class="ui-button ui-widget ui-corner-all" id="show" title="Enter" onclick="showUploadConfig()">{{lang.words.select2|title()}}</a>
</p>
<script>
$( "select" ).selectmenu();
@ -203,4 +204,4 @@
}
});
$("input[type=submit], button").button();
</script>
</script>

View File

@ -1,5 +1,6 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<select autofocus required name="log_files" id="log_files" style="width: 200px;">
<option disabled selected>Select a log file</option>
<option disabled selected>{{lang.phrases.select_file}}</option>
{% for file in return_files.split() %}
{% if file == config_file_name %}
<option value="{{ file.split('/')[-1] }}" selected>{{ file.split('/')[-1] }}</option>

View File

@ -1,5 +1,6 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import input, checkbox %}
{% for s in smon %}
<tr class="newserver" id="smon-{{s.0}}">
{% include 'include/smon_server.html' %}
{% endfor %}
{% endfor %}

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% for s in sub %}
{% if s.Plan == 'user' %}
{% set plan = 'Home' %}
@ -13,18 +14,18 @@
{% set plan = 'Free' %}
{% endif %}
<tr class="odd">
<td class="padding10 first-collumn-wi">Plan</td>
<td class="padding10 first-collumn-wi">{{lang.words.plan|title()}}</td>
<td>{{plan}}</td>
</tr>
<tr class="even">
<td class="padding10 first-collumn-wi">Status</td>
<td class="padding10 first-collumn-wi">{{lang.words.status|title()}}</td>
<td>
{% if plan == 'Free' %}
N/A
{% else %}
<span
{% if s.Status|int() == 1 %}
style="color: var(--green-color); font-weight: bold">Active
style="color: var(--green-color); font-weight: bold">{{lang.words.active|title()}}
{% else %}
style="color: var(--red-color); font-weight: bold">Blocked
{% endif %}
@ -33,7 +34,7 @@
</td>
</tr>
<tr class="odd">
<td class="padding10 first-collumn-wi">Pay method</td>
<td class="padding10 first-collumn-wi">{{lang.words.pay_method|title()}}</td>
<td>
{% if plan == 'Free' %}
N/A

View File

@ -1,4 +1,5 @@
<td class="padding20" style="width: 70%">Current group</td>
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<td class="padding20" style="width: 70%">{{lang.words.current2|title()}} {{lang.words.group}}</td>
<td>
<select id="newCurrentGroup" name="newCurrentGroup">
{% for g in groups %}

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<style>
.select-css {
display: block;
@ -54,7 +55,7 @@
</style>
<table class="overview">
<tr style="border: none;">
<td class="padding20" style="width: 40%;"><b>Select one or more groups</b></td>
<td class="padding20" style="width: 40%;"><b>{{lang.words.select|title()}} {{lang.words.one}} {{lang.words.or}} {{lang.words.more}} {{lang.words.groups2}}</b></td>
<td>
<select id="usergroup-{{id}}" name="usergroup-{{id}}" multiple class="select-css">
{% for group in groups %}
@ -67,4 +68,4 @@
</select>
</td>
</tr>
</table>
</table>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<style>
.select-css {
display: block;
@ -54,7 +55,7 @@
</style>
<table class="overview">
<tr style="border: none;">
<td class="padding20" style="width: 40%;"><b>Select one or more services</b></td>
<td class="padding20" style="width: 40%;"><b>{{lang.words.select|title()}} {{lang.words.one2}} {{lang.words.or}} {{lang.words.more}} {{lang.words.services2}}</b></td>
<td>
<select id="userservice-{{id}}" name="userservice-{{id}}" multiple class="select-css">
{% for s in services %}
@ -67,4 +68,4 @@
</select>
</td>
</tr>
</table>
</table>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% set counter = 0 %}
{% for USER in users %}
{% set counter = counter + loop.index0 %}
@ -5,16 +6,16 @@
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn-wi">
{% if USER.last_login %}
<span class="serverUp" style="margin-right: 5px;" title="{{USER.username}} is online"></span>
<span class="serverUp" style="margin-right: 5px;" title="{{USER.username}} {{lang.words.is_online}}"></span>
{% else %}
<span class="serverNone" style="margin-right: 5px;" title="{{USER.username}} is offline"></span>
<span class="serverNone" style="margin-right: 5px;" title="{{USER.username}} {{lang.words.is_offline}}"></span>
{% endif %}
{% if USER.last_login_date == '0000-00-00 00:00:00' %}
{% set last_login_date = 'Never' %}
{% set last_login_date = lang.words.never %}
{% else %}
{% set last_login_date = USER.last_login_date %}
{% endif %}
<span title="Last activity: {{last_login_date}}, IP: {{USER.last_login_ip}}">{{ USER.username }}</span>
<span title="{{lang.words.last|title()}} {{lang.words.activity}}: {{last_login_date}}, IP: {{USER.last_login_ip}}">{{ USER.username }}</span>
</td>
<td class="third-collumn-wi">
{% for group in users_groups %}
@ -31,16 +32,16 @@
<tr style="display: none;" class="show-users {{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn-wi">
{% if USER.last_login %}
<span class="serverUp" style="margin-right: 5px;" title="{{USER.username}} is online"></span>
<span class="serverUp" style="margin-right: 5px;" title="{{USER.username}} {{lang.words.is_online}}"></span>
{% else %}
<span class="serverNone" style="margin-right: 5px;" title="{{USER.username}} is offline"></span>
<span class="serverNone" style="margin-right: 5px;" title="{{USER.username}} {{lang.words.is_offline}}"></span>
{% endif %}
{% if USER.last_login_date == '0000-00-00 00:00:00' %}
{% set last_login_date = 'Never' %}
{% set last_login_date = lang.words.never %}
{% else %}
{% set last_login_date = USER.last_login_date %}
{% endif %}
<span title="Last activity: {{last_login_date}}, IP: {{USER.last_login_ip}}">{{ USER.username }}</span>
<span title="{{lang.words.last|title()}} {{lang.words.activity}}: {{last_login_date}}, IP: {{USER.last_login_ip}}">{{ USER.username }}</span>
</td>
<td class="third-collumn-wi">
{% for group in users_groups %}

View File

@ -1,7 +1,10 @@
{% if update %}
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% endif %}
<div class="sort_menu">
<a href="#" title="Do not sort by status" onclick="showSmon('not_sort')">Do not sort</a> |
<a href="#" id="sort_by_status" title="Sort by status" onclick="sort_by_status()">Sort by status</a> |
<a href="#" title="SMOM Dashboard - Roxy-WI" onclick="showSmon('refresh');">Refresh</a>
<a href="#" title="{{lang.smon_page.desc.do_not_sort_by_status}}" onclick="showSmon('not_sort')">{{lang.smon_page.desc.do_not_sort}}</a> |
<a href="#" id="sort_by_status" title="{{lang.smon_page.desc.sort_status}}" onclick="sort_by_status()">{{lang.smon_page.desc.sort_status}}</a> |
<a href="#" title="SMOM: {{lang.words.dashboard|title()}} - Roxy-WI" onclick="showSmon('refresh');">{{lang.words.refresh|title()}}</a>
<span style="padding-left: 20px;">
{% set down = [] %}
{% set up = [] %}
@ -17,7 +20,7 @@
{% if dis.append(s.group) %} {% endif %}
{% endif %}
{% endfor %}
<b>Status summary: UP: {{up|length}}, DOWN: {{down|length}}, Disabled: {{dis|length}}</b>
<b>{{lang.smon_page.desc.status_summary}}: {{lang.smon_page.desc.UP}}: {{up|length}}, {{lang.smon_page.desc.DOWN}}: {{down|length}}, {{lang.words.disabled|title()}}: {{dis|length}}</b>
<span>
</div>
{% set group = [] %}
@ -48,10 +51,10 @@
{% else %}
<div class="smon_services dis div-server-head-dis"
{% endif %}
title="Enabled checks:
Port check{% if s.http %},
HTTP status check: {{s.http.split(':')[0]}}://{{s.ip}}:{{s.port}}{{s.http.split(':')[1]}}
{% if s.body and s.body is not none %}, Body response check: {{s.body}}{% endif %}
title="{{lang.smon_page.desc.enabled_checks}}:
{{lang.phrases.port_check|title()}}{% if s.http %},
{{lang.smon_page.desc.http_status_check}}: {{s.http.split(':')[0]}}://{{s.ip}}:{{s.port}}{{s.http.split(':')[1]}}
{% if s.body and s.body is not none %}, {{lang.smon_page.desc.body_status_check}}: {{s.body}}{% endif %}
{% endif %}">
<div class="ip">
{% if s.ip|string|length > 23 %}
@ -63,7 +66,7 @@ HTTP status check: {{s.http.split(':')[0]}}://{{s.ip}}:{{s.port}}{{s.http.split(
{% else %}
<span>
{% endif %}
<a href="smon.py?action=history&host={{s.ip}}" title="View history for {{s.ip}} host" class="link">{{s.ip}}:{{s.port}}</a>
<a href="smon.py?action=history&host={{s.ip}}" title="{{lang.words.view|title()}} {{lang.words.history}} {{lang.words.for}} {{s.ip}} {{lang.words.host}}" class="link">{{s.ip}}:{{s.port}}</a>
</span>
</span>
</div>
@ -71,28 +74,28 @@ HTTP status check: {{s.http.split(':')[0]}}://{{s.ip}}:{{s.port}}{{s.http.split(
{% if s.desc is not none %}
<b>{{s.desc}}</b>
{% else %}
Desc: None
{{lang.words.desc|title()}}: None
{% endif %}
</div>
<div class="desc">
{% if s.en == 1 %}
{% if s.status == 1 and s.http_status == 1 and s.body_status == 1 %}
Uptime: <time class="timeago" datetime="{{s.time_state}}">{{s.time_state}}</time>
{{lang.words.uptime}}: <time class="timeago" datetime="{{s.time_state}}">{{s.time_state}}</time>
{% elif s.status == 0 or s.http_status == 0 or s.body_status == 0 %}
Downtime: <time class="timeago" datetime="{{s.time_state}}">{{s.time_state}}</time>
{{lang.words.downtime}}: <time class="timeago" datetime="{{s.time_state}}">{{s.time_state}}</time>
{% else %}
Uptime: N/A
{{lang.words.uptime}}: N/A
{% endif %}
{% else %}
Uptime: N/A
{{lang.words.uptime}}: N/A
{% endif %}
</div>
<div class="res_time">
{% if s.en == 1 %}
{% if s.status == 1 %}
Resp time:
{{lang.smon_page.desc.resp_time}}:
{% else %}
Last resp time:
{{lang.smon_page.desc.last_resp_time}}:
{% endif %}
{% if s.responce_time %}
<span title="{{s.responce_time}} ms">{{s.responce_time|truncate(9)}} ms</span>
@ -107,38 +110,38 @@ HTTP status check: {{s.http.split(':')[0]}}://{{s.ip}}:{{s.port}}{{s.http.split(
{% if s.status == 1 and s.http_status == 1 and s.body_status == 1 %}
<div class="up">
<center>
UP
{{lang.smon_page.desc.UP}}
</center>
</div>
{% elif s.http_status == 0 %}
<div class="down">
<center style="padding-top: 7px;">
HTTP FAILURE
{{lang.smon_page.desc.HTTP_FAILURE}}
</center>
</div>
{% elif s.body_status == 0 %}
<div class="down">
<center style="padding-top: 7px;">
BODY FAILURE
{{lang.smon_page.desc.BODY_FAILURE}}
</center>
</div>
{% elif s.status == 3 %}
<div class="unknown">
<center style="padding-top: 7px;">
UNKNOWN
{{lang.smon_page.desc.UNKNOWN}}
</center>
</div>
{% else %}
<div class="down">
<center style="padding-top: 7px;">
PORT DOWN
{{lang.smon_page.desc.PORT_DOWN}}
</center>
</div>
{% endif %}
{% else %}
<div class="disable">
<center>
Disabled
{{lang.words.disabled|title()}}
</center>
</div>
{% endif %}
@ -151,4 +154,4 @@ HTTP status check: {{s.http.split(':')[0]}}://{{s.ip}}:{{s.port}}{{s.http.split(
{% if sort == 'by_status' %}
sort_by_status();
{% endif %}
</script>
</script>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import copy_to_clipboard %}
{% if table[0] != '' %}
{% set headers = table[0].split(':')[1] %}
@ -22,19 +23,19 @@
<table class="overview">
<tr class="overviewHead">
<td class="padding10 first-collumn">
Table name: {{tables_head.0}}
{{lang.words.table|title()}} {{lang.words.name}}: {{tables_head.0}}
</td>
<td class="padding10 first-collumn">
Type: {{tables_head.1}}
{{lang.words.type|title()}}: {{tables_head.1}}
</td>
<td class="padding10 first-collumn">
Size: {{tables_head.2|int() / 1024 / 1024}} Mb
{{lang.words.size|title()}}: {{tables_head.2|int() / 1024 / 1024}} Mb
</td>
<td class="padding10 first-collumn">
Used: {{tables_head.3}}
{{lang.words.used|title()}}: {{tables_head.3}}
</td>
<td>
<button title="Clear table {{tables_head.0}}" onclick="clearTable('{{tables_head.0}}')">Clear table</button>
<button title="{{lang.words.w_clear|title()}} {{lang.words.table}} {{tables_head.0}}" onclick="clearTable('{{tables_head.0}}')">{{lang.words.w_clear|title()}} {{lang.words.table}}</button>
</td>
</tr>
</table>
@ -136,13 +137,13 @@
</td>
{% endif %}
<td>
<a class="delete" title="Delete this entry" style="cursor: pointer;" onclick="deleteTableEntry(this, '{{tables_head.0.strip()}}', '{{body.1.split('=')[1]}}')"></a>
<a class="delete" title="{{lang.words.delete|title()}} {{lang.words.this}} {{lang.words.entry}}" style="cursor: pointer;" onclick="deleteTableEntry(this, '{{tables_head.0.strip()}}', '{{body.1.split('=')[1]}}')"></a>
</td>
</tr>
{% endif %}
{% endfor %}
{% else %}
<span class="alert alert-warning" style="margin-bottom: 0px;">Table is empty</span>
<span class="alert alert-warning" style="margin-bottom: 0px;">{{lang.words.table|title()}} {{lang.words.is}} {{lang.words.w_empty}}</span>
{% endif %}
</tbody>
</table>
</table>

View File

@ -1,3 +1,4 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'include/input_macros.html' import copy_to_clipboard %}
{%- for t in table %}
{%- if t.1.0 != '' -%}
@ -23,19 +24,19 @@
<table class="overview">
<tr class="overviewHead">
<td class="padding10 first-collumn">
Table name:{{t.0.0}}
{{lang.words.table|title()}} {{lang.words.name}}:{{t.0.0}}
</td>
<td class="padding10 first-collumn">
Type: {{t.0.1}}
{{lang.words.type|title()}}: {{t.0.1}}
</td>
<td class="padding10 first-collumn">
Size: {{t.0.2|int() / 1024 / 1024}} Mb
{{lang.words.size|title()}}: {{t.0.2|int() / 1024 / 1024}} Mb
</td>
<td class="padding10 first-collumn">
Used: {{t.0.3}}
{{lang.words.used|title()}}: {{t.0.3}}
</td>
<td>
<button title="Clear table {{t.0.0}}" onclick="clearTable('{{t.0.0}}')">Clear table</button>
<button title="{{lang.words.w_clear|title()}} {{lang.words.table}} {{t.0.0}}" onclick="clearTable('{{t.0.0}}')">{{lang.words.w_clear|title()}} {{lang.words.table}}</button>
</td>
</tr>
</table>
@ -135,7 +136,7 @@
</td>
{% endif %}
<td>
<a class="delete" title="Delete this entry" style="cursor: pointer;" onclick="deleteTableEntry(this, '{{t.0.0.strip()}}', '{{body.1.split('=')[1]}}')"></a>
<a class="delete" title="{{lang.words.delete|title()}} {{lang.words.this}} {{lang.words.entry}}" style="cursor: pointer;" onclick="deleteTableEntry(this, '{{t.0.0.strip()}}', '{{body.1.split('=')[1]}}')"></a>
</td>
</tr>
{% endif %}
@ -143,7 +144,7 @@
</tbody>
</table>
{% else %}
<span class="alert alert-warning" style="margin-bottom: 0px;">Table is empty</span>
<span class="alert alert-warning" style="margin-bottom: 0px;">{{lang.words.table|title()}} {{lang.words.is}} {{lang.words.w_empty}}</span>
{% endif %}
<br />
<br />

View File

@ -1,25 +1,25 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<table style="min-width: 40%;" id="body_table_metrics">
{% if service == 'haproxy' %}
<tr>
<th class="padding10 first-collumn overviewTr" rowspan=2>Server</th>
<th colspan=3>Average sessions</th>
<th colspan=3>Peak sessions</th>
<th colspan=3>Average connections</th>
<th colspan=3>Peak connections</th>
<th class="padding10 first-collumn overviewTr" rowspan=2>{{lang.words.server|title}}</th>
<th colspan=3>{{lang.words.average}} {{lang.words.sessions}}</th>
<th colspan=3>{{lang.words.peak|title()}} {{lang.words.sessions}}</th>
<th colspan=3>{{lang.words.average}} {{lang.words.connections}}</th>
<th colspan=3>{{lang.words.peak|title()}} {{lang.words.connections2}}</th>
</tr>
<tr class="overviewHead">
<th>1 hour</th>
<th>24 hours</th>
<th>3 days</th>
<th>1 hour</th>
<th>24 hours</th>
<th>3 days</th>
<th>1 hour</th>
<th>24 hours</th>
<th>3 days</th>
<th>1 hour</th>
<th>24 hours</th>
<th>3 days</th>
<th>1 {{lang.words.hour}}</th>
<th>24 {{lang.words.hours}}</th>
<th>3 {{lang.words.days}}</th>
<th>1 {{lang.words.hour}}</th>
<th>24 {{lang.words.hours}}</th>
<th>3 {{lang.words.days}}</th>
<th>1 {{lang.words.hour}}</th>
<th>24 {{lang.words.hours}}</th>
<th>3 {{lang.words.days}}</th>
<th>1 {{lang.words.hour}}</th>
<th>24 {{lang.words.hours}}</th>
<th>3 {{lang.words.days}}</th>
</tr>
{% for state in table_stat %}
<tr class="{{ loop.cycle('odd', 'even') }}">
@ -38,30 +38,4 @@
<td>{{ state.13 }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<th class="padding10 first-collumn overviewTr" rowspan=2>Server</th>
<th colspan=3>Average connections</th>
<th colspan=3>Peak connections</th>
</tr>
<tr class="overviewHead">
<th>1 hour</th>
<th>24 hours</th>
<th>3 days</th>
<th>1 hour</th>
<th>24 hours</th>
<th>3 days</th>
</tr>
{% for state in table_stat %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10 first-collumn"><span title="{{ state.0 }}">{{ state.1 }}</span></td>
<td>{{ state.2 }}</td>
<td>{{ state.3 }}</td>
<td>{{ state.4 }}</td>
<td>{{ state.5 }}</td>
<td>{{ state.6 }}</td>
<td>{{ state.7 }}</td>
</tr>
{% endfor %}
{% endif %}
</table>

View File

@ -1,10 +1,20 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
<html lang="en">
<head>
<title>{{title}}</title>
<title>{% block title %}{% endblock %}</title>
<meta charset="UTF-8">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta id="translate" style="display: none;" data-delete="{{lang.words.delete|title()}}" data-cancel="{{lang.words.cancel|title()}}" data-add="{{lang.words.add|title()}}" \
data-superAdmin_pass="{{lang.phrases.superAdmin_pass}}" data-superAdmin_services="{{lang.phrases.superAdmin_services}}" data-change="{{lang.words.change|title()}}"
data-change2="{{lang.words.change2|title()}}" data-password="{{lang.words.password}}" data-groups="{{lang.words.groups}}" data-save="{{lang.words.save|title()}}"
data-manage="{{lang.words.manage|title()}}" data-services3="{{lang.words.services3}}" data-logout="{{lang.words.logout|title()}}"
data-something_wrong="{{lang.words.something_wrong}}" data-check_logs="{{lang.words.check_logs}}" data-wait_mess="{{lang.phrases.wait_mess}}"
data-just_save="{{lang.words.just|title()}} {{lang.words.save}}" data-upload_and_restart="{{lang.phrases.upload_and_restart|title()}}"
data-are_you_sure="{{lang.phrases.are_you_sure}}" data-upload_and_reload="{{lang.phrases.upload_and_reload|title()}}" data-select_server="{{lang.errors.select_server}}"
data-empty_name="{{lang.errors.empty_name}}" data-edit="{{lang.words.edit|title()}}" data-close="{{lang.words.close|title()}}"
data-generated_config="{{lang.words.generated|title()}} {{lang.words.config}}" />
{% if title == 'Login page' %}
<meta name="viewport" content="width=device-width, user-scalable=1">
{% endif %}
@ -65,22 +75,22 @@
<nav id="menu">
<ul class="menu">
{% if user %}
<li><a href="/app/overview.py" title="Server and service status" class="overview-link ">Overview</a></li>
<li><a href="/app/overview.py" title="{{lang.menu_links.overview.title}}" class="overview-link ">{{lang.menu_links.overview.link}}</a></li>
{% if '1' in user_services %}
<li class="p_menu">
<a href="/app/hapservers.py?service=haproxy" title="HAProxy servers overview" class="config-show">HAProxy</a>
<a href="/app/hapservers.py?service=haproxy" title="{{lang.menu_links.hapservers.haproxy.title}}" class="config-show">HAProxy</a>
<ul class="v_menu">
<li><a href="/app/hapservers.py?service=haproxy" title="HAProxy servers overview" class="overview-link head-submenu">Overview</a> </li>
<li><a href="/app/config.py?service=haproxy" title="Working with HAProxy configs" class="edit head-submenu">Configs</a></li>
<li><a href="/app/statsview.py?service=haproxy" title="HAProxy statistics " class="stats head-submenu">Stats</a></li>
<li><a href="/app/logs.py?service=haproxy" title="HAProxy logs " class="logs head-submenu">Logs</a></li>
<li><a href="/app/hapservers.py?service=haproxy" title="{{lang.menu_links.hapservers.haproxy.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a> </li>
<li><a href="/app/config.py?service=haproxy" title="{{lang.menu_links.config.haproxy.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
<li><a href="/app/statsview.py?service=haproxy" title="{{lang.menu_links.stats.haproxy.title}}" class="stats head-submenu">{{lang.menu_links.stats.link}}</a></li>
<li><a href="/app/logs.py?service=haproxy" title="HAProxy {{lang.menu_links.logs.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
<li><a href="/app/runtimeapi.py" title="Runtime API" class="runtime head-submenu">Runtime API</a></li>
<li><a href="/app/metrics.py?service=haproxy" title="HAProxy's metrics" class="metrics head-submenu">Metrics</a></li>
<li><a href="/app/metrics.py?service=haproxy" title="HAProxy {{lang.menu_links.metrics.title}}" class="metrics head-submenu">{{lang.menu_links.metrics.link}}</a></li>
{% if role <= 3 %}
<li><a href="/app/add.py#proxy" title="Add proxy: Create proxy" class="add-proxy head-submenu" id="add1">Add proxy</a></li>
<li><a href="/app/versions.py?service=haproxy" title="Working with versions HAProxy configs" class="version head-submenu">Versions</a></li>
<li><a href="/app/add.py#ssl" title="Add proxy: Upload SSL certificates" class="cert head-submenu" id="add3">SSL</a></li>
<li><a href="/app/add.py#lists" title="Add proxy: Create and upload whitelists or blacklists" class="lists head-submenu" id="add7">Lists</a></li>
<li><a href="/app/add.py#proxy" title="{{lang.menu_links.add_proxy.title}}" class="add-proxy head-submenu" id="add1">{{lang.menu_links.add_proxy.link}}</a></li>
<li><a href="/app/versions.py?service=haproxy" title="{{lang.menu_links.versions.haproxy.title}}" class="version head-submenu">{{lang.menu_links.versions.link}}</a></li>
<li><a href="/app/add.py#ssl" title="{{lang.menu_links.ssl.title}}" class="cert head-submenu" id="add3">{{lang.menu_links.ssl.link}}</a></li>
<li><a href="/app/add.py#lists" title="{{lang.menu_links.lists.title}}" class="lists head-submenu" id="add7">{{lang.menu_links.lists.link}}</a></li>
<li><a href="/app/waf.py?service=haproxy" title="Web application firewall" class="waf-menu head-submenu">WAF</a> </li>
{% endif %}
</ul>
@ -88,17 +98,17 @@
{% endif %}
{% if '2' in user_services %}
<li class="p_menu">
<a href="/app/hapservers.py?service=nginx" title="Overview NGINX servers" class="nginx-menu">NGINX</a>
<a href="/app/hapservers.py?service=nginx" title="{{lang.menu_links.hapservers.nginx.title}}" class="nginx-menu">NGINX</a>
<ul class="v_menu">
<li><a href="/app/hapservers.py?service=nginx" title="Overview NGINX servers" class="overview-link head-submenu">Overview</a></li>
<li><a href="/app/config.py?service=nginx" title="Working with NGINX configs" class="edit head-submenu">Configs</a></li>
<li><a href="/app/statsview.py?service=nginx" title="NGINX statistics" class="stats head-submenu">Stats</a></li>
<li><a href="/app/logs.py?service=nginx" title="NGINX logs " class="logs head-submenu">Logs</a></li>
<li><a href="/app/metrics.py?service=nginx" title="NGINX's metrics" class="metrics head-submenu">Metrics</a></li>
<li><a href="/app/hapservers.py?service=nginx" title="{{lang.menu_links.hapservers.nginx.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a></li>
<li><a href="/app/config.py?service=nginx" title="{{lang.menu_links.config.nginx.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
<li><a href="/app/statsview.py?service=nginx" title="{{lang.menu_links.stats.nginx.title}}" class="stats head-submenu">{{lang.menu_links.stats.link}}</a></li>
<li><a href="/app/logs.py?service=nginx" title="NGINX {{lang.menu_links.logs.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
<li><a href="/app/metrics.py?service=nginx" title="NGINX {{lang.menu_links.metrics.title}}" class="metrics head-submenu">{{lang.menu_links.metrics.link}}</a></li>
{% if role <= 3 %}
<li><a href="/app/add_nginx.py#proxy" title="Add proxy: Create proxy" class="add-proxy head-submenu">Add proxy</a></li>
<li><a href="/app/versions.py?service=nginx" title="Working with versions NGINX configs" class="version head-submenu">Versions</a></li>
<li><a href="/app/add.py?service=nginx#ssl" title="Add proxy: Upload SSL certificates" class="cert head-submenu">SSL</a></li>
<li><a href="/app/add_nginx.py#proxy" title="{{lang.menu_links.add_proxy.title}}" class="add-proxy head-submenu">{{lang.menu_links.add_proxy.link}}</a></li>
<li><a href="/app/versions.py?service=nginx" title="{{lang.menu_links.versions.nginx.title}}" class="version head-submenu">{{lang.menu_links.versions.link}}</a></li>
<li><a href="/app/add.py?service=nginx#ssl" title="{{lang.menu_links.ssl.title}}" class="cert head-submenu">{{lang.menu_links.ssl.link}}</a></li>
<li><a href="/app/waf.py?service=nginx" title="Web application firewall" class="waf-menu head-submenu">WAF</a> </li>
{% endif %}
</ul>
@ -106,16 +116,16 @@
{% endif %}
{% if '4' in user_services %}
<li class="p_menu">
<a href="/app/hapservers.py?service=apache" title="Overview Apache servers" class="apache-menu">Apache</a>
<a href="/app/hapservers.py?service=apache" title="{{lang.menu_links.hapservers.apache.title}}" class="apache-menu">Apache</a>
<ul class="v_menu">
<li><a href="/app/hapservers.py?service=apache" title="Overview Apache servers" class="overview-link head-submenu">Overview</a></li>
<li><a href="/app/config.py?service=apache" title="Working with Apache configs" class="edit head-submenu">Configs</a></li>
<li><a href="/app/statsview.py?service=apache" title="Apache statistics" class="stats head-submenu">Stats</a></li>
<li><a href="/app/logs.py?service=apache" title="Apache logs " class="logs head-submenu">Logs</a></li>
<li><a href="/app/metrics.py?service=apache" title="Apache's metrics" class="metrics head-submenu">Metrics</a></li>
<li><a href="/app/hapservers.py?service=apache" title="{{lang.menu_links.hapservers.apache.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a></li>
<li><a href="/app/config.py?service=apache" title="{{lang.menu_links.config.apache.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
<li><a href="/app/statsview.py?service=apache" title="{{lang.menu_links.stats.apache.title}}" class="stats head-submenu">{{lang.menu_links.stats.link}}</a></li>
<li><a href="/app/logs.py?service=apache" title="Apache {{lang.menu_links.logs.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
<li><a href="/app/metrics.py?service=apache" title="Apache {{lang.menu_links.metrics.title}}" class="metrics head-submenu">{{lang.menu_links.metrics.link}}</a></li>
{% if role <= 3 %}
<li><a href="/app/versions.py?service=apache" title="Working with versions Apache configs" class="version head-submenu">Versions</a></li>
<li><a href="/app/add.py?service=apache#ssl" title="Add proxy: Upload SSL certificates" class="cert head-submenu" id="add3">SSL</a></li>
<li><a href="/app/versions.py?service=apache" title="{{lang.menu_links.versions.apache.title}}" class="version head-submenu">{{lang.menu_links.versions.link}}</a></li>
<li><a href="/app/add.py?service=apache#ssl" title="{{lang.menu_links.ssl.title}}" class="cert head-submenu" id="add3">{{lang.menu_links.ssl.link}}</a></li>
{% endif %}
</ul>
</li>
@ -123,60 +133,60 @@
{% if '3' in user_services %}
{% if role <= 2 %}
<li class="p_menu">
<a href="/app/hapservers.py?service=keepalived" title="Overview Keepalived servers" class="ha">Keepalived</a>
<a href="/app/hapservers.py?service=keepalived" title="{{lang.menu_links.hapservers.keepalived.title}}" class="ha">Keepalived</a>
<ul class="v_menu">
<li><a href="/app/hapservers.py?service=keepalived" title="Overview Keepalived servers" class="overview-link head-submenu">Overview</a> </li>
<li><a href="/app/ha.py" title="Create and configure HA cluster" class="keepalived head-submenu">HA</a></li>
<li><a href="/app/config.py?service=keepalived" title="Working with Keepalived configs" class="edit head-submenu">Configs</a></li>
<li><a href="/app/logs.py?service=keepalived" title="Keepalived logs " class="logs head-submenu">Logs</a></li>
<li><a href="/app/versions.py?service=keepalived" title="Working with versions Keepalived configs" class="version head-submenu keepalived_versions">Versions</a></li>
<li><a href="/app/hapservers.py?service=keepalived" title="{{lang.menu_links.hapservers.keepalived.title}}" class="overview-link head-submenu">{{lang.menu_links.hapservers.link}}</a> </li>
<li><a href="/app/ha.py" title="{{lang.menu_links.ha.title}}" class="keepalived head-submenu">HA</a></li>
<li><a href="/app/config.py?service=keepalived" title="{{lang.menu_links.config.keepalived.title}}" class="edit head-submenu">{{lang.menu_links.config.link}}</a></li>
<li><a href="/app/logs.py?service=keepalived" title="Keepalived {{lang.menu_links.stats.title}}" class="logs head-submenu">{{lang.menu_links.logs.link}}</a></li>
<li><a href="/app/versions.py?service=keepalived" title="{{lang.menu_links.versions.keepalived.title}}" class="version head-submenu keepalived_versions">{{lang.menu_links.versions.link}}</a></li>
</ul>
</li>
{% endif %}
{% endif %}
<li class="p_menu">
<a href="/app/smon.py?action=view" title="Monitoring tools" class="stats">Monitoring</a>
<a href="/app/smon.py?action=view" title="{{lang.menu_links.monitoring.title}}" class="stats">{{lang.menu_links.monitoring.link}}</a>
<ul class="v_menu">
<li><a href="/app/smon.py?action=view" title="SMON Dashboard" class="overview-link head-submenu">SMON Dashboard</a></li>
<li><a href="/app/smon.py?action=history" title="SMON History" class="lists head-submenu">SMON History</a></li>
<li><a href="/app/smon.py?action=view" title="{{lang.menu_links.monitoring.smon.dashboard}}" class="overview-link head-submenu">{{lang.menu_links.monitoring.smon.dashboard}}</a></li>
<li><a href="/app/smon.py?action=history" title="{{lang.menu_links.monitoring.smon.history}}" class="lists head-submenu">{{lang.menu_links.monitoring.smon.history}}</a></li>
{% if role <= 3 %}
<li><a href="/app/smon.py?action=add" title="SMON admin panel" class="edit head-submenu">SMON Admin panel</a></li>
<li><a href="/app/smon.py?action=add" title="{{lang.menu_links.monitoring.smon.admin}}" class="edit head-submenu">{{lang.menu_links.monitoring.smon.admin}}</a></li>
{% endif %}
<li><a href="/app/smon.py?action=checker_history" title="Checker History" class="lists head-submenu">Checker History</a></li>
<li><a href="/app/portscanner.py" title="Port scanner" class="port-scanner head-submenu">Port scanner</a></li>
<li><a href="/app/nettools.py" title="Network tools" class="net-tools head-submenu">Network tools</a></li>
<li><a href="/app/smon.py?action=checker_history" title="{{lang.menu_links.monitoring.checker_history}}" class="lists head-submenu">{{lang.menu_links.monitoring.checker_history}}</a></li>
<li><a href="/app/portscanner.py" title="{{lang.menu_links.monitoring.port_scan}}" class="port-scanner head-submenu">{{lang.menu_links.monitoring.port_scan}}</a></li>
<li><a href="/app/nettools.py" title="{{lang.menu_links.monitoring.net_tools}}" class="net-tools head-submenu">{{lang.menu_links.monitoring.net_tools}}</a></li>
</ul>
</li>
{% if role <= 2 %}
<li class="p_menu">
<a href="/app/servers.py#users" title="Servers manage" class="runtime">Servers</a>
<a href="/app/servers.py#users" title="{{lang.menu_links.servers.title}}" class="runtime">{{lang.menu_links.servers.link}}</a>
<ul class="v_menu">
<li><a href="/app/servers.py#users" title="Servers: Manage users" class="users head-submenu">Users</a></li>
<li><a href="/app/servers.py#servers" title="Servers: Manage servers" class="runtime servers head-submenu">Servers</a></li>
<li><a href="/app/servers.py#ssh" title="Servers: Manage SSH credentials" class="admin ssh head-submenu">SSH credentials</a></li>
<li><a href="/app/servers.py#checker" title="Servers: Manage Checker" class="checker head-submenu">Checker</a></li>
<li><a href="/app/servers.py#settings" title="Servers: Manage Roxy-WI settings" class="settings head-submenu">Settings</a></li>
<li><a href="/app/servers.py#installproxy" title="Servers: Proxy service installation" class="hap-menu installproxy head-submenu">Proxy installation</a> </li>
<li><a href="/app/servers.py#installmon" title="Servers: Monitoring service installation" class="hap1 installmon head-submenu">Monitoring installation</a> </li>
<li><a href="/app/provisioning.py" title="Servers: Provisioning" class="hap1 head-submenu">Server provisioning</a> </li>
<li><a href="/app/servers.py#backup" title="Servers: Backup configs" class="backup head-submenu">Backups</a> </li>
<li><a href="/app/viewlogs.py?type=2" title="Servers: View internal logs" class="logs head-submenu">Internal logs</a></li>
<li><a href="/app/servers.py#users" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} {{lang.words.users2}}" class="users head-submenu">{{lang.words.users|title()}}</a></li>
<li><a href="/app/servers.py#servers" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} {{lang.words.servers2}}" class="runtime servers head-submenu">{{lang.words.servers|title()}}</a></li>
<li><a href="/app/servers.py#ssh" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} SSH {{lang.words.creds2}}" class="admin ssh head-submenu">SSH {{lang.words.creds|title()}}</a></li>
<li><a href="/app/servers.py#checker" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} Checker" class="checker head-submenu">Checker</a></li>
<li><a href="/app/servers.py#settings" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.settings2}}" class="settings head-submenu">{{lang.words.settings|title()}}</a></li>
<li><a href="/app/servers.py#installproxy" title="{{lang.words.servers|title()}}: {{lang.words.proxy|title()}} {{lang.words.services}} {{lang.words.installation}}" class="hap-menu installproxy head-submenu">{{lang.words.proxy|title()}} {{lang.words.installation}}</a> </li>
<li><a href="/app/servers.py#installmon" title="{{lang.words.servers|title()}}: {{lang.words.monitoring|title()}} {{lang.words.services}} {{lang.words.installation}}" class="hap1 installmon head-submenu">{{lang.words.monitoring|title()}} {{lang.words.installation}}</a> </li>
<li><a href="/app/provisioning.py" title="{{lang.words.servers|title()}}: {{lang.words.provisioning|title()}}" class="hap1 head-submenu">{{lang.words.servers|title()}} {{lang.words.provisioning|title()}}</a> </li>
<li><a href="/app/servers.py#backup" title="{{lang.words.servers|title()}}: {{lang.words.backup|title()}} {{lang.words.configs2}}" class="backup head-submenu">{{lang.words.backup|title()}}</a> </li>
<li><a href="/app/viewlogs.py?type=2" title="{{lang.words.servers|title()}}: {{lang.words.view|title()}} {{lang.words.internal2}} {{lang.words.logs2}}" class="logs head-submenu">{{lang.words.internal|title()}} {{lang.words.logs}}</a></li>
</ul>
</li>
{% endif %}
{% if role <= 1 %}
<li class="p_menu" id="admin-area">
<a href="/app/users.py#users" title="Admin area" class="admin">Admin area</a>
<a href="/app/users.py#users" title="{{lang.menu_links.admin_area.title}}" class="admin">{{lang.menu_links.admin_area.link}}</a>
<ul class="v_menu">
<li><a href="/app/users.py#users" title="Admin area: Manage users" class="users head-submenu" id="admin-area-users">Users</a></li>
<li><a href="/app/users.py#groups" title="Admin area: Manage groups" class="group groups head-submenu" id="admin-area-groups">Groups</a></li>
<li><a href="/app/users.py#servers" title="Admin area: Manage servers" class="runtime servers head-submenu" id="admin-area-servers">Servers</a></li>
<li><a href="/app/users.py#ssh" title="Admin area: Manage SSH credentials" class="admin ssh head-submenu" id="admin-area-ssh">SSH credentials</a></li>
<li><a href="/app/users.py#checker" title="Admin area: Checker" class="checker head-submenu" id="admin-area-checker">Checker</a></li>
<li><a href="/app/users.py#settings" title="Admin area: Manage Roxy-WI settings" class="settings head-submenu" id="admin-area-settings">Settings</a></li>
<li><a href="/app/users.py#services" title="Admin area: Manage Roxy-WI services" class="services head-submenu" id="admin-area-services">Services</a></li>
<li><a href="/app/viewlogs.py" title="Admin area: View internal logs" class="logs head-submenu" id="admin-area-logs">Internal logs</a></li>
<li><a href="/app/users.py#updatehapwi" title="Admin area: Update Roxy-WI" class="upload updatehapwi head-submenu" id="admin-area-update">Update</a></li>
<li><a href="/app/users.py#users" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.users2}}" class="users head-submenu" id="admin-area-users">{{lang.words.users|title()}}</a></li>
<li><a href="/app/users.py#groups" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.groups3}}" class="group groups head-submenu" id="admin-area-groups">{{lang.words.groups|title()}}</a></li>
<li><a href="/app/users.py#servers" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.servers2}}" class="runtime servers head-submenu" id="admin-area-servers">{{lang.words.servers|title()}}</a></li>
<li><a href="/app/users.py#ssh" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} SSH {{lang.words.creds2}}" class="admin ssh head-submenu" id="admin-area-ssh">SSH {{lang.words.creds|title()}}</a></li>
<li><a href="/app/users.py#checker" title="{{lang.words.admin_area|title()}}: Checker" class="checker head-submenu" id="admin-area-checker">Checker</a></li>
<li><a href="/app/users.py#settings" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.settings2}}" class="settings head-submenu" id="admin-area-settings">{{lang.words.settings|title()}}</a></li>
<li><a href="/app/users.py#services" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.services3}}" class="services head-submenu" id="admin-area-services">{{lang.words.services|title()}}</a></li>
<li><a href="/app/viewlogs.py" title="{{lang.words.admin_area|title()}}: {{lang.words.view|title()}} {{lang.words.internal2}} {{lang.words.logs2}}" class="logs head-submenu" id="admin-area-logs">{{lang.words.internal|title()}} {{lang.words.logs}}</a></li>
<li><a href="/app/users.py#updatehapwi" title="{{lang.words.admin_area|title()}}: {{lang.words.w_update|title()}} Roxy-WI" class="upload updatehapwi head-submenu" id="admin-area-update">{{lang.words.w_update|title()}}</a></li>
</ul>
</li>
{% endif %}
@ -188,14 +198,20 @@
<div class="container">
{% if h2 %}
<h2>
{{title}}
{% block h2 %}{% endblock %}
{% include 'include/login.html' %}
{% if autorefresh %}
<span class="auto-refresh">
<a onclick="pauseAutoRefresh()" class="auto-refresh-pause" style="display: none; margin-top: 4px;"></a>
<a onclick="pauseAutoResume()" class="auto-refresh-resume" style="display: none; margin-top: 4px;"></a>
<span id="0" class="auto-refresh-span"><span class="auto-refresh-reload auto-refresh-reload-icon"></span> Auto-refresh</span>
<span id="1" style="display: none;" class="auto-refresh-span"><span class="auto-refresh-reload auto-refresh-reload-icon"></span> Auto-refresh</span>
<span id="0" class="auto-refresh-span">
<span class="auto-refresh-reload auto-refresh-reload-icon"></span>
{{lang.words.auto|title()}}-{{lang.words.refresh}}
</span>
<span id="1" style="display: none;" class="auto-refresh-span">
<span class="auto-refresh-reload auto-refresh-reload-icon"></span>
{{lang.words.auto|title()}}-{{lang.words.refresh}}
</span>
</span>
{% endif %}
</h2>
@ -203,38 +219,38 @@
{% if autorefresh %}
<div class="auto-refresh-div">
<div class="auto-refresh-head">
Refresh Interval
{{lang.words.refresh|title()}} {{lang.words.interval|title()}}
</div>
<div class="auto-refresh-interval">
<div class="auto-refresh-ul">
<ul style="width: 130px;">
<li>
<a class="ui-button ui-widget ui-corner-all" onclick="setRefreshInterval(0)" title="Turn off auto-refresh">No auto-refresh</a>
<a class="ui-button ui-widget ui-corner-all" onclick="setRefreshInterval(0)" title="Turn off auto-refresh">{{lang.words.no|title()}} {{lang.words.auto}}-{{lang.words.refresh}}</a>
</li>
</ul>
</div>
<div class="auto-refresh-ul" id="secIntervals">
<ul style="width: 100px;">
<li><a title="Auto-refresh every 5 seconds" onclick="setRefreshInterval(5000)">5 seconds</a></li>
<li><a title="Auto-refresh every 10 seconds" onclick="setRefreshInterval(10000)">10 seconds</a></li>
<li><a title="Auto-refresh every 30 seconds" onclick="setRefreshInterval(30000)">30 seconds</a></li>
<li><a title="Auto-refresh ever 45 seconds" onclick="setRefreshInterval(45000)">45 seconds</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 5 {{lang.words.seconds2}}" onclick="setRefreshInterval(5000)">5 {{lang.words.seconds2}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 10 {{lang.words.seconds2}}" onclick="setRefreshInterval(10000)">10 {{lang.words.seconds2}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 30 {{lang.words.seconds2}}" onclick="setRefreshInterval(30000)">30 {{lang.words.seconds2}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 45 {{lang.words.seconds2}}" onclick="setRefreshInterval(45000)">45 {{lang.words.seconds2}}</a></li>
</ul>
</div>
<div class="auto-refresh-ul">
<ul style="width: 100px;">
<li><a title="Auto-refresh every 1 minute" onclick="setRefreshInterval(60000)">1 minute</a></li>
<li><a title="Auto-refresh every 5 minutes" onclick="setRefreshInterval(300000)">5 minutes</a></li>
<li><a title="Auto-refresh every 15 minutes" onclick="setRefreshInterval(900000)">15 minutes</a></li>
<li><a title="Auto-refresh ever 30 minutes" onclick="setRefreshInterval(1800000)">30 minutes</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every2}} 1 minute" onclick="setRefreshInterval(60000)">1 {{lang.words.minute}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 5 {{lang.words.minutes}}" onclick="setRefreshInterval(300000)">5 {{lang.words.minutes}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 15 {{lang.words.minutes}}" onclick="setRefreshInterval(900000)">15 {{lang.words.minutes}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 30 {{lang.words.minutes}}" onclick="setRefreshInterval(1800000)">30 {{lang.words.minutes}}</a></li>
</ul>
</div>
<div class="auto-refresh-ul">
<ul style="width: 100px;">
<li><a title="Auto-refresh every 1 hour" onclick="setRefreshInterval(3600000)">1 hour</a></li>
<li><a title="Auto-refresh every 2 hour" onclick="setRefreshInterval(7200000)">2 hour</a></li>
<li><a title="Auto-refresh every 12 hour" onclick="setRefreshInterval(43200000)">12 hour</a></li>
<li><a title="Auto-refresh ever 1 day" onclick="setRefreshInterval(86400000)">1 day</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every3}} 1 {{lang.words.hour}}" onclick="setRefreshInterval(3600000)">1 {{lang.words.hour}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 2 {{lang.words.hours}}" onclick="setRefreshInterval(7200000)">2 {{lang.words.hours}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every}} 12 {{lang.words.hours}}" onclick="setRefreshInterval(43200000)">12 {{lang.words.hours2}}</a></li>
<li><a title="{{lang.words.auto|title()}}-{{lang.words.refresh}} {{lang.words.every3}} 1 {{lang.words.day}}" onclick="setRefreshInterval(86400000)">1 {{lang.words.day}}</a></li>
</ul>
</div>
</div>
@ -256,17 +272,17 @@
</div>
<div id="show-updates" style="display: none;">
<div>
There is a new version Roxy-WI. Check the <a href="/app/users.py#updatehapwi" class="link">Update page</a>
{{lang.phrases.new_version}} <a href="/app/users.py#updatehapwi" class="link">{{lang.words.update|title()}}</a>
</div>
</div>
<div class="footer">
<a href="#" id="hide_menu" title="Hide menu" style="float: left;">
<a href="#" id="hide_menu" title="{{lang.words.hide|title()}} {{lang.words.menu}}" style="float: left;">
<span class="ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-arrowthick-1-w" id="arrow"></span>
</span>
</a>
<div class="show_menu" style="display: none; float: left;">
<a href="#" id="show_menu" title="Show menu">
<a href="#" id="show_menu" title="{{lang.words.show|title()}} {{lang.words.menu}}">
<span class="ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-arrowthick-1-e" id="arrow"></span>
</span>
@ -280,23 +296,37 @@
</div>
<div class="footer-div">
<div id="useful-links">
<a href="https://roxy-wi.org" class="footer-link" target="_blank" title="About Roxy-WI">About</a>
<a href="https://github.com/hap-wi/roxy-wi/issues" class="footer-link" target="_blank" title="Community help">Help</a>
<a href="https://roxy-wi.org" class="footer-link" target="_blank" title="{{lang.words.about|title()}} Roxy-WI">{{lang.words.about|title()}}</a>
<a href="https://github.com/hap-wi/roxy-wi/issues" class="footer-link" target="_blank" title="Community help">{{lang.words.help|title()}}</a>
<a href="https://sd.roxy-wi.org" class="footer-link" target="_blank" title="Service Desk">SD</a>
<a href="https://roxy-wi.org/contacts" class="footer-link" target="_blank">Contacts</a>
<a href="https://roxy-wi.org/cabinet" class="footer-link" target="_blank" title="Private cabinet">Cabinet</a>
<a href="https://roxy-wi.org/legal" class="footer-link" target="_blank" title="Legal Note">Legal</a>
<a href="https://roxy-wi.org/contacts" class="footer-link" target="_blank">{{lang.words.contacts|title()}}</a>
<a href="https://roxy-wi.org/cabinet" class="footer-link" target="_blank" title="Private cabinet">{{lang.words.cabinet|title()}}</a>
<a href="https://roxy-wi.org/legal" class="footer-link" target="_blank" title="Legal Note">{{lang.words.legal|title()}}</a>
</div>
</div>
</div>
<div id="show-user-settings">
<table class="overview" id="show-user-settings-table">
<table class="overview" id="show-user-settings-table" title="{{lang.words.user3|title()}} {{lang.words.settings}}">
<tr>
<td class="padding20" style="width: 70%">Alerts</td>
<td class="padding20" style="width: 70%">{{lang.words.alerts|title()}}</td>
<td>
<select id="disable_alerting">
<option value="0" title="Alerts for all tabs are enabled">All alerts are enabled</option>
<option value="1">Disable alerting</option>
<option value="0" title="{{lang.phrases.all_alerts_enabled}}">{{lang.phrases.all_alerts_enabled}}</option>
<option value="1">{{lang.phrases.disable_alerts}}</option>
</select>
</td>
</tr>
<tr class="padding20">
<td class="padding20">{{lang.words.language|title()}}</td>
<td>
<select id="lang_select">
{% if lang.lang_short == 'ru' %}
<option value="en" title="English">English</option>
<option value="ru" title="Русский" selected>Русский</option>
{% else %}
<option value="en" title="English" selected>English</option>
<option value="ru" title="Русский">Русский</option>
{% endif %}
</select>
</td>
</tr>

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{lang.menu_links.config.h2}} {{service_desc.service}}{% endblock %}
{% block h2 %}{{lang.menu_links.config.h2}} {{service_desc.service}}{% endblock %}
{% block content %}
<link rel="stylesheet" href="/inc/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="/inc/codemirror/addon/dialog/dialog.css">
@ -35,19 +37,19 @@
<input type="hidden" id="service" value="{{service|default('haproxy', true)}}" />
{% include 'include/select.html' %}
{% if service == 'nginx' or service == 'apache' %}
<a class="ui-button ui-widget ui-corner-all" title="Show running config" onclick="showConfigFiles()">Open</a>
<a class="ui-button ui-widget ui-corner-all" title="Show running config" onclick="showConfigFiles()">{{lang.words.open|title()}}</a>
{% else %}
<a class="ui-button ui-widget ui-corner-all" title="Show running config" onclick="showConfig()">Open</a>
<a class="ui-button ui-widget ui-corner-all" title="Show running config" onclick="showConfig()">{{lang.words.open|title()}}</a>
{% endif %}
{% if service != 'keepalived' and service != 'apache' %}
<a class="ui-button ui-widget ui-corner-all" title="View stat" onclick="openStats()">Stat</a>
<a class="ui-button ui-widget ui-corner-all" title="View stat" onclick="openStats()">{{lang.menu_links.stats.link}}</a>
{% endif %}
{% if service != 'keepalived' and service != 'nginx' and service != 'apache' %}
<a class="ui-button ui-widget ui-corner-all" title="Show map" onclick="showMap()">Map</a>
<a class="ui-button ui-widget ui-corner-all" title="Show map" onclick="showMap()">{{lang.words.map|title()}}</a>
{% endif %}
<a class="ui-button ui-widget ui-corner-all" title="Compare configs" onclick="showCompareConfigs()">Compare</a>
<a class="ui-button ui-widget ui-corner-all" title="Compare configs" onclick="showCompareConfigs()">{{lang.words.compare|title()}}</a>
{% if role <= 3 %}
<a class="ui-button ui-widget ui-corner-all" title="Show versions" onclick="openVersions()">Versions</a>
<a class="ui-button ui-widget ui-corner-all" title="Show versions" onclick="openVersions()">{{lang.menu_links.versions.link}}</a>
{% endif %}
{% if role <= 2 %}
<a href="/app/servers.py#backup" class="ui-button ui-widget ui-corner-all" title="Git">Git</a>
@ -63,7 +65,7 @@
{% if config %}
{% if role <= 3 %}
<h4>Config {% if config_file_name != 'undefined' %}{{config_file_name.replace('92', '/')}}{%endif%} from {{ serv }}</h4>
<h4>{{lang.words.config|title()}} {% if config_file_name != 'undefined' %}{{config_file_name.replace('92', '/')}}{%endif%} {{lang.words.from}} {{ serv }}</h4>
</center>
<form action="config.py" name="saveconfig" id="saveconfig" method="post">
<input type="hidden" value="{{ serv }}" name="serv">
@ -76,17 +78,17 @@
</div>
<p>
<center>
<a href="config.py?service={{service}}&serv={{serv}}&showConfig" class="ui-button ui-widget ui-corner-all" title="Return to configuration view">Back</a>
<a href="config.py?service={{service}}&serv={{serv}}&showConfig" class="ui-button ui-widget ui-corner-all" title="{{lang.phrases.return_to_config}}">{{lang.words.back|title()}}</a>
{% if service != 'keepalived' %}
<button type="submit" value="test" name="save" class="btn btn-default" title="Check config without saving the config">Check config</button>
<button type="submit" value="test" name="save" class="btn btn-default" title="{{lang.words.check|title()}} {{lang.words.config}} {{lang.words.without}} {{lang.words.saving}}">{{lang.phrases.check_config}}</button>
{% endif %}
<button type="submit" value="save" name="save" class="btn btn-default" title="Save config without reloading the service">Save</button>
<button type="submit" value="save" name="save" class="btn btn-default" title="{{lang.phrases.save_title}}">{{lang.words.save|title()}}</button>
{% if is_restart|int == 0 %}
<button type="submit" value="" name="" class="btn btn-default">Save and restart</button>
<button type="submit" value="" name="" class="btn btn-default">{{lang.phrases.save_and_restart}}</button>
{% endif %}
<button type="submit" value="reload" name="save" class="btn btn-default">Save and reload</button>
<button type="submit" value="reload" name="save" class="btn btn-default">{{lang.phrases.save_and_reload}}</button>
{% if service != 'keepalived' %}
<div class="alert alert-info alert-two-rows"><b>Note:</b> When reconfiguring the master server, the slave will be reconfigured automatically</div>
<div class="alert alert-info alert-two-rows"><b>{{lang.words.note|title()}}:</b> {{lang.phrases.master_slave}}</div>
{% endif %}
</center>
</p>

View File

@ -1,11 +1,13 @@
{% extends "base.html" %}
{% block title %}{{ lang.menu_links.versions.h2 }} {{ lang.words[service] }}{% endblock %}
{% block h2 %}{{ lang.menu_links.versions.h2 }} {{ lang.words[service] }}{% endblock %}
{% block content %}
<center>
<p>
<form action="{{ action }}" method="post">
<input type="hidden" id="service" value="{{service}}">
{% include 'include/select.html' %}
<button type="submit" value="open" name="open" class="btn btn-default">Open</button>
<button type="submit" value="open" name="open" class="btn btn-default">{{lang.words.open|title()}}</button>
</form>
</p>
{% if not aftersave %}
@ -18,12 +20,11 @@
<script>showListOfVersion(0)</script>
{% endif %}
{% if aftersave %}
<div class="alert alert-info alert-two-row">The following version of the configuration file has been uploaded and saved as: {{ configver }} </div>
<div class="alert alert-info alert-two-row">{{lang.phrases.version_has_been_uploaded}}: {{ configver }} </div>
{% if 'is valid' not in stderr %}
{% include 'include/errors.html' %}
{% else %}
<div class="alert alert-success">Config is ok</div>
<a href="statsview.py?serv={{ serv }}" target="_blank" title="View stats">Go to view stats</a>
<div class="alert alert-success">{{lang.words.config|title()}} {{lang.words.is}} {{lang.words.valid}}</div>
{% endif %}
{% endif %}
</center>

View File

@ -1,6 +1,7 @@
{% extends "base.html" %}
{% block title %}{{ lang.menu_links.versions.h2 }} {{ lang.words[service] }}{% endblock %}
{% block h2 %}{{ lang.menu_links.versions.h2 }} {{ lang.words[service] }}{% endblock %}
{% block content %}
{% if selects|length == 0 %}
{% include 'include/getstarted.html' %}
{% else %}
@ -11,16 +12,16 @@
<form action="{{ action }}" method="post">
<input type="hidden" value="{{service}}" name="service" id="service">
{% include 'include/select.html' %}
<a class="ui-button ui-widget ui-corner-all" title="Open versions" onclick="showListOfVersion(1)">Open</a>
<a href="config.py?service={{service}}" class="ui-button ui-widget ui-corner-all" title="Configs page">Configs</a>
<a class="ui-button ui-widget ui-corner-all" title="Open versions" onclick="showListOfVersion(1)">{{lang.words.open|title()}}</a>
<a href="config.py?service={{service}}" class="ui-button ui-widget ui-corner-all" title="Configs page">{{lang.words.configs|title()}}</a>
{% if service != 'keepalived' %}
<a class="ui-button ui-widget ui-corner-all" title="View stat" onclick="openStats()">Stat</a>
<a class="ui-button ui-widget ui-corner-all" title="View stat" onclick="openStats()">{{lang.words.stats|title()}}</a>
{% endif %}
<a class="ui-button ui-widget ui-corner-all" title="Change version" onclick="changeVersion()">Change version</a>
<a class="ui-button ui-widget ui-corner-all" title="Change version" onclick="changeVersion()">{{lang.words.change2|title()}} {{lang.words.version2|title()}}</a>
</form>
</p>
{% if aftersave %}
<div class="alert alert-info"><b>The following files have been deleted:</b><br /> </div>
<div class="alert alert-info"><b>{{lang.phrases.files_been_deleted}}:</b><br /> </div>
{% if stderr %}
{% include 'include/errors.html' %}
{% else %}
@ -34,7 +35,7 @@
<div id="config_version_div"></div>
{% if not aftersave %}
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px; margin-top: 40%">
Here you can work with previous versions of {{ service[0]|upper}}{{service[1:] }} configs. Roll back to them, view or delete
{{lang.phrases.work_with_prev}} {{ service[0]|upper}}{{service[1:] }}. {{lang.phrases.roll_back}}
</div>
{% endif %}
{% if open and not aftersave %}

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ lang.menu_links.ha.title }} {% endblock %}
{% block h2 %}{{ lang.menu_links.ha.title }} {% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox %}
<script src="/inc/users.js"></script>
@ -14,19 +16,19 @@
<h3>You have not installed Ansible</h3>.
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>
Read <a href="https://roxy-wi.org/installation#ansible" title="Installing Ansible" target="_blank">here</a> how to install Ansible.
Read <a href="https://roxy-wi.org/installation#ansible" title="{{lang.words.installing|title()}} Ansible" target="_blank">here</a> how to install Ansible.
</h4>
</div>
{% else %}
<table class="overview" style="margin-bottom: 20px;">
<caption><h3>Create a new HA cluster</h3></caption>
<caption><h3>{{lang.words.create|title()}} {{lang.words.w_a}} {{lang.words.new}} HA {{lang.words.cluster}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Current installation</td>
<td class="padding10 first-collumn">Master</td>
<td class="padding10 first-collumn">Current installation</td>
<td>Slave</td>
<td><span title="Interface for VRRP address on a Master slave">Master Interface</span></td>
<td><span title="Interface for VRRP address on a Slave server">Slave Interface</span></td>
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.installation}}</td>
<td class="padding10 first-collumn">{{lang.words.current2|title()}}</td>
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.installation}}</td>
<td>{{lang.words.slave|title()}}</td>
<td><span title="{{lang.phrases.int_vrrp}}">{{lang.words.master|title()}} {{lang.words.interface|title()}}</span></td>
<td><span title="{{lang.phrases.int_vrrp}}">{{lang.words.slave|title()}} {{lang.words.interface|title()}}</span></td>
<td>VRRP IP</td>
<td></td>
</tr>
@ -49,15 +51,15 @@
{% endfor %}
</select>
</td>
<td>{{ input('interface', size='7', title='Interface for VRRP address on a Master server') }}</td>
<td>{{ input('slave_interface', size='7', title='Interface for VRRP address a Slave server') }}</td>
<td>{{ input('interface', size='7', title=lang.phrases.int_vrrp) }}</td>
<td>{{ input('slave_interface', size='7', title=lang.phrases.int_vrrp) }}</td>
<td>{{ input('vrrp-ip', size='14') }}</td>
</tr>
<tr class="overviewHead">
<td class="padding10 first-collumn"></td>
<td class="checkbox-head help_cursor"><span title="Roxy-WI will add VRRP address as a separated server">Add VIRT</span></td>
<td class="checkbox-head help_cursor" style="padding-left: 20px;" title="If checked, the Keepalived master will not release VRRP if the service is down">Stay as Master</td>
<td class="checkbox-head">SYN-flood protection</td>
<td class="checkbox-head help_cursor"><span title="Roxy-WI will add VRRP address as a separated server">{{lang.words.add|title()}} VIRT</span></td>
<td class="checkbox-head help_cursor" style="padding-left: 20px;" title="If checked, the Keepalived master will not release VRRP if the service is down">{{lang.words.stay|title()}} {{lang.words.as}} {{lang.words.master|title()}}</td>
<td class="checkbox-head">SYN-flood {{lang.words.protection}}</td>
<td class="checkbox-head help_cursor" style="padding: 10px 10px 10px 0;"><span title="Roxy-WI will try to install HAProxy">HAProxy</span></td>
<td class="checkbox-head help_cursor" style="display: none" id="haproxy_docker_td_header"><span title="Roxy-WI will install HAProxy as Docker container">Docker</span></td>
<td class="checkbox-head help_cursor"><span title="Roxy-WI will try to install NGINX">NGINX</span></td>
@ -75,21 +77,21 @@
<td class="checkbox help_cursor">{{ checkbox('nginx', title='Roxy-WI will try to install NGINX') }}</td>
<td class="checkbox help_cursor" style="display: none" id="nginx_docker_td">{{ checkbox('nginx_docker', title='Roxy-WI will install NGINX as a Docker container') }}</td>
<td>
<button id="create" title="Create HA cluster">Create</button>
<button id="create" title="Create HA cluster">{{lang.words.create|title()}}</button>
</td>
<td></td>
</tr>
</table>
<table class="overview">
<caption><h3>Add VRRP to an existing cluster</h3></caption>
<caption><h3>{{lang.words.add|title()}} VRRP {{lang.words.to}} {{lang.words.an}} {{lang.words.existing2}} {{lang.words.cluster}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Current installation</td>
<td class="padding10 first-collumn">Master</td>
<td class="padding10 first-collumn">Current installation</td>
<td>Slave</td>
<td><span title="Interface for VRRP address on a Master Server">Master Interface</span></td>
<td><span title="Interface for VRRP address on a Slave Server">Slave Interface</span></td>
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.installation}}</td>
<td class="padding10 first-collumn">{{lang.words.master|title()}}</td>
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.installation}}</td>
<td>{{lang.words.slave|title()}}</td>
<td><span title="{{lang.phrases.int_vrrp}}">{{lang.words.master|title()}} {{lang.words.interface|title()}}</span></td>
<td><span title="{{lang.phrases.int_vrrp}}">{{lang.words.slave|title()}} {{lang.words.interface|title()}}</span></td>
<td>VRRP IP</td>
</tr>
<tr>
@ -111,8 +113,8 @@
{% endfor %}
</select>
</td>
<td>{{ input('interface-add', size='7', title='Interface for VRRP address') }}</td>
<td>{{ input('slave_interface-add', size='7', title='Interface for VRRP address') }}</td>
<td>{{ input('interface-add', size='7', title=lang.phrases.int_vrrp) }}</td>
<td>{{ input('slave_interface-add', size='7', title=lang.phrases.int_vrrp) }}</td>
<td>{{ input('vrrp-ip-add', size='14') }}</td>
</tr>
<tr class="overviewHead">
@ -120,8 +122,8 @@
<td></td>
<td></td>
<td></td>
<td class="padding10 first-collumn checkbox-head"><span title="If checked Roxy-WI will restart Keepalived">Restart</span></td>
<td class="checkbox-head help_cursor" title="If checked, Keepalived master will reclaim VRRP after recovered">Return to Master state</td>
<td class="padding10 first-collumn checkbox-head"><span title="If checked Roxy-WI will restart Keepalived">{{lang.words.restart|title()}}</span></td>
<td class="checkbox-head help_cursor" title="If checked, Keepalived master will reclaim VRRP after recovered">{{lang.words.return|title()}} {{lang.words.to}} {{lang.words.master|title()}} state</td>
<td></td>
</tr>
<tr>
@ -132,25 +134,25 @@
<td class="padding10 first-collumn checkbox help_cursor">{{ checkbox('kp', title='If checked Roxy-WI will restart Keepalived') }}</td>
<td class="syn-flood-protection-field">{{ checkbox('add_return_to_master', checked='checked') }}</td>
<td>
<button id="add-vrrp" title="Add a HA configuration" style="width: 70px;">Add</button>
<button id="add-vrrp" title="Add a HA configuration" style="width: 70px;">{{lang.words.add|title()}}</button>
</td>
</tr>
</table>
<div id="ajax"></div>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
Read <a href="https://roxy-wi.org/howto.py/ha_cluster" title="How to create high available cluster" target="_blank">How to create high available cluster</a>
{{lang.words.read|title()}} <a href="https://roxy-wi.org/howto.py/ha_cluster" title="How to create high available cluster" target="_blank">{{lang.phrases.howto_ha}}</a>
</div>
<div id="server_creating" style="display: none;">
<ul style="padding: 20px 20px 0px 20px;font-size: 15px;">
<li id="creating-master" class="server-creating proccessing">Installing Master Keepalived...</li>
<li id="creating-slave" class="server-creating proccessing">Installing Slave Keepalived...</li>
<li id="creating-master" class="server-creating proccessing">{{lang.words.installing|title()}} {{lang.words.master|title()}} Keepalived...</li>
<li id="creating-slave" class="server-creating proccessing">{{lang.words.installing|title()}} {{lang.words.slave|title()}} Keepalived...</li>
<div id="haproxy_installing_div" style="display: none">
<li id="creating-haproxy-master" class="server-creating">Installing Master Haproxy...</li>
<li id="creating-haproxy-slave" class="server-creating">Installing Slave Haproxy...</li>
<li id="creating-haproxy-master" class="server-creating">{{lang.words.installing|title()}} {{lang.words.master|title()}} Haproxy...</li>
<li id="creating-haproxy-slave" class="server-creating">{{lang.words.installing|title()}} {{lang.words.slave|title()}} Haproxy...</li>
</div>
<div id="nginx_installing_div" style="display: none">
<li id="creating-nginx-master" class="server-creating">Installing Master NGINX...</li>
<li id="creating-nginx-slave" class="server-creating">Installing Slave NGINX...</li>
<li id="creating-nginx-master" class="server-creating">{{lang.words.installing|title()}} {{lang.words.master|title()}} NGINX...</li>
<li id="creating-nginx-slave" class="server-creating">{{lang.words.installing|title()}} {{lang.words.slave|title()}} NGINX...</li>
</div>
</ul>
<div id="wait-mess"></div>
@ -163,8 +165,8 @@
</div>
<div id="address_creating" style="display: none;">
<ul style="padding: 20px 20px 0px 20px;font-size: 15px;">
<li id="creating-master-add" class="server-creating proccessing">Creating a new address on Master Keepalived...</li>
<li id="creating-slave-add" class="server-creating proccessing">Creating a new address on Slave Keepalived...</li>
<li id="creating-master-add" class="server-creating proccessing">{{lang.words.creating|title()}} {{lang.words.a}} {{lang.words.new}} {{lang.words.address}} {{lang.words.on}} {{lang.words.master|title()}} Keepalived...</li>
<li id="creating-slave-add" class="server-creating proccessing">{{lang.words.creating|title()}} {{lang.words.a}} {{lang.words.new}} {{lang.words.address}} {{lang.words.on}} {{lang.words.slave|title()}} Keepalived...</li>
</ul>
<div id="wait-mess-add"></div>
<div id="created-mess-add" class="alert alert-success" style="display:none;"></div>

View File

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% block content %}
{% block title %}{{ lang.menu_links.hapservers.h2 }} {{ service_desc.service }}{% endblock %}
{% block h2 %}{{ lang.menu_links.hapservers.h2 }} {{ service_desc.service }}{% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select, copy_to_clipboard %}
<script src="/inc/overview.js"></script>
<link href="/inc/css/chart.min.css" rel="stylesheet">
@ -157,7 +159,7 @@
});
</script>
{% endif %}
{% set checker_desc = "Checker monitors " +service_desc.service + " services. If " + service_desc.service + " service changes its status, Checker will alert via Telegram, Slack, Email, Web" %}
{% set checker_desc = lang.services.hapservers_desc %}
{% if service == 'nginx' %}
{% set is_auto_start_enabled = s.8.0.17 %}
{% set is_checker_enabled = s.8.0.19 %}
@ -222,27 +224,27 @@
{% endfor %}
{% if role <= 3 %}
<span class="server-action">
<a id="start-{{ s.2 }}" class="start" title="Start {{service}} service">
<a id="start-{{ s.2 }}" class="start" title="{{lang.words.start|title()}} {{service}} {{lang.words.service}}">
<span class="service-start" onclick="confirmAjaxAction('start', '{{service}}', '{{s.2}}')"></span>
</a>
{% if service != 'keepalived' %}
<a id="reload-{{ s.2 }}" class="reload" title="Reload {{service}} service">
<a id="reload-{{ s.2 }}" class="reload" title="{{lang.words.reload|title()}} {{service}} {{lang.words.service}}">
<span class="service-reload" onclick="confirmAjaxAction('reload', '{{service}}', '{{s.2}}', '{{s.1}}')"></span>
</a>
{% endif %}
{% for set in restart_settings %}
{% if set.server_id == s.0 and set.setting == 'restart' and set.value|int == 0 %}
<a id="restart-{{ s.2 }}" class="restart" title="Restart {{service}} service">
<a id="restart-{{ s.2 }}" class="restart" title="{{lang.words.restart|title()}} {{service}} {{lang.words.service}}">
<span class="service-reload service-restart" onclick="confirmAjaxAction('restart', '{{service}}', '{{s.2}}')"></span>
</a>
{% endif %}
{% endfor %}
{% if restart_settings|length == 0 %}
<a id="restart-{{ s.2 }}" class="restart" title="Restart {{service}} service">
<a id="restart-{{ s.2 }}" class="restart" title="{{lang.words.restart|title()}} {{service}} {{lang.words.service}}">
<span class="service-reload service-restart" onclick="confirmAjaxAction('restart', '{{service}}', '{{s.2}}')"></span>
</a>
{% endif %}
<a id="stop-{{ s.2 }}" class="stop" title="Stop {{service}} service">
<a id="stop-{{ s.2 }}" class="stop" title="{{lang.words.stop|title()}} {{service}} {{lang.words.service}}">
<span class="service-stop" onclick="confirmAjaxAction('stop', '{{service}}', '{{s.2}}')"></span>
</a>
<a href="history.py?service={{service}}&serv={{s.2}}" title="View history for this service" class="history" style="margin: 0 5px 0 10px;"></a>
@ -254,18 +256,18 @@
</div>
<div class="server-desc">
{% if s.3 is none %}
No description
{{lang.words.no_desc|title()}}
{% else %}
{{s.3}}
{% endif %}
<br />
{% if service == 'nginx' or service == 'keepalived' %}
Version: {{s.5.0.0}} Process_num: {{s.5.0.3}}
{{lang.words.version|title()}}: {{s.5.0.0}} {{lang.words.process_num|title()}}: {{s.5.0.3}}
<br />
{% if s.5.0.1 == 'active' or s.5.0.1 == 'Up' %}
Started:
{{lang.words.started|title()}}:
{% else %}
Stopped:
{{lang.words.stopped|title()}}:
{% endif %}
{{s.5.0.2}}
{% elif service == 'apache' %}
@ -274,7 +276,7 @@
<br />
{{s.4.1.split(' ')[0].split('Server')[1]}} {% for i in s.4.1.split(' ')[1:5] %} {{i}}{% endfor %}
{% else %}
Cannot get information about Apache
{{lang.errors.cannot_get_info}} Apache
{% endif %}
{% else %}
{% if s.5.0 is defined %}
@ -282,11 +284,11 @@
<br />
{{s.5.0.2}}
{% else %}
Cannot get information about HAProxy
{{lang.errors.cannot_get_info}} HAProxy
{% endif %}
{% endif %}
<span title="Date of last configuration edit">
Last edit:
{{lang.services.last_edit}}:
<span id="edit_date_{{s.2}}"></span>
</span>
<div class="overflow_div">
@ -299,7 +301,7 @@
{% if s.9.1 == 'MASTER' or s.9.1 == 'BACKUP' or s.9.1 == 'INIT' or s.9.1 == 'FAULT' %}
{{s.9.1}}
{% else %}
<span title="Cannot get Keepalived Status" class="help_cursor">Error</span>
<span title="{{lang.errors.cannot_get_info}} Keepalived" class="help_cursor">{{lang.words.error|title()}}</span>
{% endif %}
</b>
{% endif %}
@ -333,20 +335,20 @@
</div>
<div class="server-act-links">
{% if service == 'nginx' or service == 'apache' %}
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showConfigFiles" {{config_id}} class="ui-button ui-widget ui-corner-all" title="Open running configs">Configs</a>
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showConfigFiles" {{config_id}} class="ui-button ui-widget ui-corner-all" title="{{lang.words.open|title()}} {{lang.words.running}} {{lang.words.configs}}">{{lang.menu_links.config.link}}</a>
{% else %}
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showConfig" {{config_id}} class="ui-button ui-widget ui-corner-all" title="Open running config">Config</a>
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showConfig" {{config_id}} class="ui-button ui-widget ui-corner-all" title="{{lang.words.open|title()}} {{lang.words.running}} {{lang.words.config}}">{{lang.menu_links.config.link}}</a>
{% endif %}
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showCompare" {{compare_id}} class="ui-button ui-widget ui-corner-all" title="Compare configs">Compare</a>
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showCompare" {{compare_id}} class="ui-button ui-widget ui-corner-all" title="{{lang.words.compare|title()}} {{lang.words.configs}}">{{lang.words.compare|title()}}</a>
{% if service == 'haproxy' %}
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showMap" class="ui-button ui-widget ui-corner-all" {{map_id}} title="Show map">Map</a>
<a href="/app/config.py?service={{service}}&serv={{s.2}}&showMap" class="ui-button ui-widget ui-corner-all" {{map_id}} title="{{lang.words.show|title()}} {{lang.words.map}}">{{lang.words.map|title()}}</a>
{% endif %}
{% if service != 'keepalived' %}
<a href="/app/statsview.py?service={{service}}&serv={{s.2}}" class="ui-button ui-widget ui-corner-all" {{stats_id}} title="View {{service}} statistics">Stats</a>
<a href="/app/statsview.py?service={{service}}&serv={{s.2}}" class="ui-button ui-widget ui-corner-all" {{stats_id}} title="{{lang.words.view|title()}} {{service}} {{lang.words.statistics}}">{{lang.menu_links.stats.link}}</a>
{% endif %}
<a href="/app/logs.py?service={{service}}&serv={{s.2}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" {{logs_id}} class="ui-button ui-widget ui-corner-all" title="View {{service}} logs">Logs</a>
<a href="/app/logs.py?service={{service}}&serv={{s.2}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" {{logs_id}} class="ui-button ui-widget ui-corner-all" title="{{lang.words.view|title()}} {{service}} {{lang.words.logs}}">{{lang.menu_links.logs.link}}</a>
{% if role <= 2 %}
<a href="/app/versions.py?service={{service}}&serv={{s.2}}&open=open" class="ui-button ui-widget ui-corner-all" {{versions_id}} title="View/Rollback to previous config">Versions</a>
<a href="/app/versions.py?service={{service}}&serv={{s.2}}&open=open" class="ui-button ui-widget ui-corner-all" {{versions_id}} title="{{lang.words.view|title()}}/{{lang.words.rollback|title()}} {{lang.words.to}} {{lang.words.previous}} {{lang.words.config}}">{{lang.menu_links.versions.link}}</a>
{% endif %}
</div>
</div>
@ -356,11 +358,11 @@
<div class="div-server div-backends">
<div class="server-name backends">
{% if service == 'haproxy' %}
Backends:
{{lang.words.backends|title()}}:
{% elif service == 'keepalived' %}
VRRP addresses:
VRRP {{lang.words.addresses|title()}}:
{% else %}
Virtual hosts:
{{lang.words.virtual|title()}} {{lang.words.hosts}}:
{% endif %}
</div>
<div style="margin-top: 10px;" id="top-{{s.2}}"></div>
@ -376,7 +378,7 @@
or (service == 'apache' and s.8.0.27) %}
<div style="clear: both; width: 97%;">
<div style="padding-left: 25px;float: left;margin-top: -15px;">
<b>Time range:</b>
<b>{{lang.words.time_range|title()}}:</b>
<select title="Choose time range" id="time-range">
<option value="30">30 minutes</option>
<option value="60">1 hour</option>

View File

@ -1,5 +1,7 @@
{% from 'include/input_macros.html' import copy_to_clipboard %}
{% extends "base.html" %}
{% block title %}{{ lang.menu_links.history.title }} {{ lang.words[service] }}{% endblock %}
{% block h2 %}{{ lang.menu_links.history.title }} {{ lang.words[service] }}{% endblock %}
{% block content %}
{% if user_status == 0 or user_plan == 'user' %}
{% include 'include/no_sub.html' %}
@ -26,11 +28,12 @@
<table class="overview hover order-column display compact" id="table_history">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn" style="width: 100px;">Service</th>
<th>User</th>
<th>User IP</th>
<th>Action</th>
<th>Date</th>
<th class="padding10 first-collumn" style="width: 100px;">{{lang.words.service|title()}}</th>
<th>{{lang.words.user|title()}}</th>
<th style="width: 100px">{{lang.words.service|title()}} IP</th>
<th style="width: 100px">{{lang.words.server|title()}}</th>
<th>{{lang.words.action|title()}}</th>
<th>{{lang.words.date|title()}}</th>
</tr>
</thead>
<tbody>
@ -40,11 +43,18 @@
<td>
{% for u in users %}
{% if u.user_id == h.user_id %}
{{ u.username }}
<a href="/app/history.py?service=user&user_id={{u.user_id}}" title="Open history for {{u.username}}">{{ u.username }}</a>
{% endif %}
{% endfor %}
</td>
<td>{{ copy_to_clipboard(id=h.ip, value=h.ip) }}</td>
<td>
{% if h.server_ip != None %}
{% if h.service in ('haproxy', 'nginx', 'apache', 'keepalived') %}
<a href="/app/hapservers.py?service={{h.service}}&serv={{h.server_ip}}" title="Open history for {{h.hostname}}">{{ h.hostname }}</a>
{% endif %}
{% endif %}
</td>
<td>{{h.action}}</td>
<td>{{h.date}}</td>
</tr>

View File

@ -1,6 +1,6 @@
<tr>
<td class="padding20" style="width: 40%;">
Select a server for backup
{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.server}} {{lang.words.for}} {{lang.words.backup2}}
<span class="need-field">*</span>
</td>
<td>
@ -14,7 +14,7 @@
</tr>
<tr>
<td class="padding20">
Enter backup server
{{lang.words.enter2|title()}} {{lang.words.backup}} {{lang.words.server}}
<span class="need-field">*</span>
</td>
<td>
@ -23,7 +23,7 @@
</tr>
<tr>
<td class="padding20">
Enter remote folder
{{lang.words.enter2|title()}} {{lang.words.remote}} {{lang.words.folder}}
<span class="need-field">*</span>
</td>
<td>
@ -32,7 +32,7 @@
</tr>
<tr>
<td class="padding20">
Backup type
{{lang.words.backup|title()}} {{lang.words.type}}
<span class="need-field">*</span>
</td>
<td>
@ -42,7 +42,7 @@
</tr>
<tr>
<td class="padding20">
Period time
{{lang.words.period|title()}} {{lang.words.time}}
<span class="need-field">*</span>
</td>
<td>
@ -50,4 +50,3 @@
{{ select('backup-time', values=values, selected='weekly', required='required', class='force_close') }}
</td>
</tr>

View File

@ -3,7 +3,7 @@
<div id="close">
<span title="Close" style="cursor: pointer; float: right;">X</span>
</div>
<h3>{{ add }} was success added</h3>
<h3>{{ add }} {{lang.add_page.desc.was_success_added}}</h3>
{{ conf_add }}
</div>
<script>
@ -17,10 +17,10 @@
<div class="div-pannel">
<div class="div-server add-proxy-listen-head">
<div class="server-name">
<span title="Create Upstream" class="redirectUpstream span-link">Create Upstream</span>
<span title="{{lang.words.create|title()}} {{lang.words.upstream|title()}}" class="redirectUpstream span-link">{{lang.words.create|title()}} {{lang.words.upstream|title()}}</span>
</div>
<div class="server-desc add_proxy">
The upstream module is used to define groups of servers.
{{lang.add_nginx_page.desc.upstream_desc1}}
</div>
</div>
</div>

View File

@ -4,21 +4,21 @@
}
</style>
<span name="add_servers">
<input name="servers" required title="Backend IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control">:
<input name="server_port" required title="Backend port" size=8 placeholder="yyy" class="form-control add_server_number" type="number">
<span name="max_fails">max_fails:</span> <input name="max_fails" required title="By default, the number of unsuccessful attempts is set to 1" data-help="sets the number of unsuccessful attempts to communicate with the server that should happen in the duration set by the fail_timeout parameter to consider the server unavailable for a duration also set by the fail_timeout parameter. By default, the number of unsuccessful attempts is set to 1." size=8 class="form-control add_server_number" value="1" type="number">
<span name="fail_timeout">fail_timeout:</span> <input name="fail_timeout" required title="By default, the number of unsuccessful attempts is set to 1s" size=8 value="1" class="form-control add_server_number" type="number" data-help="The time during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable; and the period of time the server will be considered unavailable.">s
<input name="servers" required title="{{lang.words.backend|title()}} IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control">:
<input name="server_port" required title="{{lang.words.backend|title()}} {{lang.words.port}}" size=8 placeholder="yyy" class="form-control add_server_number" type="number">
<span name="max_fails">max_fails:</span> <input name="max_fails" required title="" data-help="{{lang.add_nginx_page.desc.max_fails}}" size=8 class="form-control add_server_number" value="1" type="number">
<span name="fail_timeout">fail_timeout:</span> <input name="fail_timeout" required size=8 value="1" class="form-control add_server_number" type="number" title="" data-help="{{lang.add_nginx_page.desc.fail_timeout}}">s
<br />
<input name="servers" title="Backend IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control second-server"><span class="second-server">:</span>
<input name="server_port" title="Backend port" size=8 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="max_fails">max_fails:</span> <input name="max_fails" required title="By default, the number of unsuccessful attempts is set to 1" data-help="sets the number of unsuccessful attempts to communicate with the server that should happen in the duration set by the fail_timeout parameter to consider the server unavailable for a duration also set by the fail_timeout parameter. By default, the number of unsuccessful attempts is set to 1." size=8 class="form-control add_server_number" value="1" type="number">
<span name="fail_timeout">fail_timeout:</span> <input name="fail_timeout" required title="By default, the number of unsuccessful attempts is set to 1" size=8 value="1" class="form-control add_server_number" type="number" data-help="The time during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable; and the period of time the server will be considered unavailable.">s
<input name="servers" title="{{lang.words.backend|title()}} IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control second-server"><span class="second-server">:</span>
<input name="server_port" title="{{lang.words.backend|title()}} {{lang.words.port}}" size=8 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="max_fails">max_fails:</span> <input name="max_fails" required title="" data-help="{{lang.add_nginx_page.desc.max_fails}}" size=8 class="form-control add_server_number" value="1" type="number">
<span name="fail_timeout">fail_timeout:</span> <input name="fail_timeout" required size=8 value="1" class="form-control add_server_number" type="number" title="" data-help="{{lang.add_nginx_page.desc.fail_timeout}}">s
<br />
<input name="servers" title="Backend IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control second-server"><span class="second-server">:</span>
<input name="server_port" title="Backend port" size=3 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="max_fails">max_fails:</span> <input name="max_fails" required title="By default, the number of unsuccessful attempts is set to 1" data-help="sets the number of unsuccessful attempts to communicate with the server that should happen in the duration set by the fail_timeout parameter to consider the server unavailable for a duration also set by the fail_timeout parameter. By default, the number of unsuccessful attempts is set to 1." size=8 class="form-control add_server_number" value="1" type="number">
<span name="fail_timeout">fail_timeout:</span> <input name="fail_timeout" required title="By default, the number of unsuccessful attempts is set to 1" size=8 value="1" class="form-control add_server_number" type="number" data-help="The time during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable; and the period of time the server will be considered unavailable.">s
<input name="servers" title="{{lang.words.backend|title()}} IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control second-server"><span class="second-server">:</span>
<input name="server_port" title="{{lang.words.backend|title()}} {{lang.words.port}}" size=3 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="max_fails">max_fails:</span> <input name="max_fails" required size=8 class="form-control add_server_number" value="1" type="number" title="" data-help="{{lang.add_nginx_page.desc.max_fails}}">
<span name="fail_timeout">fail_timeout:</span> <input name="fail_timeout" required size=8 value="1" class="form-control add_server_number" type="number" title="" data-help="{{lang.add_nginx_page.desc.fail_timeout}}">s
</span>
<span>
<a class="link add-server backend_server" name="add-server-input" title="Add upstream" style="cursor: pointer;"></a>
</span>
<a class="link add-server backend_server" name="add-server-input" title="{{lang.words.add|title()}} upstream" style="cursor: pointer;"></a>
</span>

View File

@ -3,7 +3,7 @@
<div id="close">
<span title="Close" style="cursor: pointer; float: right;">X</span>
</div>
<h3>{{ add }} was success added</h3>
<h3>{{ add }} {{lang.add_page.desc.was_success_added}}</h3>
{{ conf_add }}
</div>
<script>
@ -17,51 +17,50 @@
<div class="div-pannel">
<div class="div-server add-proxy-listen-head">
<div class="server-name">
<span title="Create Listener" class="redirectListen span-link">Create Listener</span>
<span title="{{lang.words.create|title()}} {{lang.words.listener|title()}}" class="redirectListen span-link">{{lang.words.create|title()}} {{lang.words.listener|title()}}</span>
</div>
<div class="server-desc add_proxy">
A "listen" section defines a complete proxy with its frontend and backend parts combined in one section. It is generally useful for TCP-only traffic.
{{lang.add_page.desc.listener_desc1}}
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-listen-head">
<div class="server-name">
<span title="Create HTTP Listener" class="redirectListen span-link" id="create-http-listen">Create HTTP Listener</span>
<span title="{{lang.words.create|title()}} HTTP {{lang.words.listener|title()}}" class="redirectListen span-link" id="create-http-listen">{{lang.words.create|title()}} HTTP {{lang.words.listener|title()}}</span>
</div>
<div class="server-desc">
Create HTTP proxy
{{lang.words.create|title()}} HTTP {{lang.words.proxy}}
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-listen-head">
<div class="server-name">
<span title="Create SSL Listener" class="redirectListen span-link" id="create-ssl-listen">Create SSL Listener</span>
<span title="{{lang.words.create|title()}} SSL {{lang.words.listener|title()}}" class="redirectListen span-link" id="create-ssl-listen">{{lang.words.create|title()}} SSL {{lang.words.listener|title()}}</span>
</div>
<div class="server-desc add_proxy">
Create HTTPS Proxy with the SSL termination on HAProxy and SSL offload.
HAProxy will send to backends HTTP traffic. You need have <span title="Upload SSL" class="redirectSsl span-link" style="color: #5d9ceb">uploaded a PEM certificat</span>
{{lang.add_page.desc.create_ssl_proxy}} <span title="Upload SSL" class="redirectSsl span-link" style="color: #5d9ceb">{{lang.words.uploaded}} {{lang.words.w_a}} PEM {{lang.words.cert}}</span>
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-listen-head">
<div class="server-name">
<span title="Create SSL Listener" class="redirectListen span-link" id="create-https-listen">Create HTTPS Listener</span>
<span title="{{lang.words.create|title()}} HTTPS {{lang.words.listener|title()}}" class="redirectListen span-link" id="create-https-listen">{{lang.words.create|title()}} HTTPS {{lang.words.listener|title()}}</span>
</div>
<div class="server-desc add_proxy">
Create HTTPS Proxy without the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTPS traffic
{{lang.add_page.desc.create_https_proxy}}
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-listen-head">
<div class="server-name">
<span title="Create an option template" class="span-link" id="add4">Create an option template</span>
<span title="{{lang.words.create|title()}} {{lang.words.an}} {{lang.words.option}} {{lang.words.template}}" class="span-link" id="add4">{{lang.words.create|title()}} {{lang.words.an}} {{lang.words.option}} {{lang.words.template}}</span>
</div>
<div class="server-desc add_proxy">
Create, edit and delete options with given parameters. And after use them as autocomplete in the "Add" sections
{{lang.add_page.desc.option_temp}}
</div>
</div>
</div>
@ -70,50 +69,48 @@
<div class="div-pannel">
<div class="div-server add-proxy-frontend-head">
<div class="server-name">
<span title="Create Frontend" class="redirectFrontend span-link">Create Frontend</span>
<span title="{{lang.words.create|title()}} {{lang.words.frontend|title()}}" class="redirectFrontend span-link">{{lang.words.create|title()}} {{lang.words.frontend|title()}}</span>
</div>
<div class="server-desc add_proxy">
A "frontend" section describes a set of listening sockets accepting client connections.
And forwards them to backend
<br />
</div>
{{lang.add_page.desc.front_desc1}}
</div>
</div>
</div>
<div class="div-server add-proxy-frontend-head">
<div class="server-name">
<span title="Create HTTP Frontend" class="redirectListen span-link" id="create-http-frontend">Create HTTP Frontend</span>
<span title="{{lang.words.create|title()}} HTTP {{lang.words.frontend|title()}}" class="redirectListen span-link" id="create-http-frontend">{{lang.words.create|title()}} HTTP {{lang.words.frontend|title()}}</span>
</div>
<div class="server-desc">
Create HTTP Frontend
{{lang.words.create|title()}} HTTP {{lang.words.frontend}}
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-frontend-head">
<div class="server-name">
<span title="Create SSL Frontend" class="redirectListen span-link" id="create-ssl-frontend">Create SSL Frontend</span>
<span title="{{lang.words.create|title()}} SSL {{lang.words.frontend|title()}}" class="redirectListen span-link" id="create-ssl-frontend">{{lang.words.create|title()}} SSL {{lang.words.frontend|title()}}</span>
</div>
<div class="server-desc add_proxy">
Create HTTPS Frontend with the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTP traffic. You need have <span title="Upload SSL" class="redirectSsl span-link" style="color: #5d9ceb">uploaded a PEM certificat</span>
{{lang.add_page.desc.create_ssl_front}} <span title="{{lang.words.upload|title()}} SSL" class="redirectSsl span-link" style="color: #5d9ceb">{{lang.words.uploaded}} {{lang.words.w_a}} PEM {{lang.words.cert}}</span>
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-frontend-head">
<div class="server-name">
<span title="Create HTTPS Frontend" class="redirectListen span-link" id="create-https-frontend">Create HTTPS Frontend</span>
<span title="{{lang.words.create|title()}} HTTPS {{lang.words.frontend|title()}}" class="redirectListen span-link" id="create-https-frontend">{{lang.words.create|title()}} HTTPS {{lang.words.frontend|title()}}</span>
</div>
<div class="server-desc add_proxy">
Create HTTPS Frontend without the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTPS traffic
{{lang.add_page.desc.create_https_front}}
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-frontend-head">
<div class="server-name">
<span title="Create a server template" class="span-link" id="add5">Create a server template</span>
<span title="{{lang.words.create|title()}} {{lang.words.w_a}} {{lang.words.server}} {{lang.words.template}}" class="span-link" id="add5">{{lang.words.create|title()}} {{lang.words.w_a}} {{lang.words.server}} {{lang.words.template}}</span>
</div>
<div class="server-desc add_proxy">
Create, edit and delete servers. And after use them as autocomplete in the "Add" sections
{{lang.add_page.desc.server_temp}}
</div>
</div>
</div>
@ -122,52 +119,50 @@
<div class="div-pannel">
<div class="div-server add-proxy-backend-head">
<div class="server-name">
<span title="Create Backend" class="redirectBackend span-link">Create Backend</span>
<span title="{{lang.words.create|title()}} {{lang.words.backend|title()}}" class="redirectBackend span-link">{{lang.words.create|title()}} {{lang.words.backend|title()}}</span>
</div>
<div class="server-desc add_proxy">
A "backend" section describes a set of servers to which the proxy will connect to forward incoming connections.
<br />
<br />
{{lang.add_page.desc.back_des1}}
</div>
</div>
</div>
<div class="div-server add-proxy-backend-head">
<div class="server-name">
<span title="Create SSL Backend" class="redirectListen span-link" id="create-http-backend">Create HTTP Backend</span>
<span title="{{lang.words.create|title()}} HTTP {{lang.words.backend|title()}}" class="redirectListen span-link" id="create-http-backend">{{lang.words.create|title()}} HTTP {{lang.words.backend|title()}}</span>
</div>
<div class="server-desc add_proxy">
Create HTTP Backend
{{lang.words.create|title()}} HTTP {{lang.words.backend}}
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-backend-head">
<div class="server-name">
<span title="Create HTTPS Backend" class="redirectListen span-link" id="create-ssl-backend">Create SSL Backend</span>
<span title="{{lang.words.create|title()}} SSL {{lang.words.backend|title()}}" class="redirectListen span-link" id="create-ssl-backend">{{lang.words.create|title()}} SSL {{lang.words.backend|title()}}</span>
</div>
<div class="server-desc add_proxy">
Create HTTPS Backend with the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTP traffic. You need have <span title="Upload SSL" class="redirectSsl span-link" style="color: #5d9ceb">uploaded a PEM certificat</span>
{{lang.add_page.desc.create_ssl_backend}} <span title="{{lang.words.upload|title()}} SSL" class="redirectSsl span-link" style="color: #5d9ceb">{{lang.words.uploaded}} {{lang.words.w_a}} PEM {{lang.words.cert}}</span>
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-backend-head">
<div class="server-name">
<span title="Create SSL Backend" class="redirectListen span-link" id="create-https-backend">Create HTTPS Backend</span>
<span title="{{lang.words.create|title()}} HTTPS {{lang.words.backend|title()}}" class="redirectListen span-link" id="create-https-backend">{{lang.words.create|title()}} HTTPS {{lang.words.backend|title()}}</span>
</div>
<div class="server-desc add_proxy">
Create HTTPS Backend without the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTPS traffic
{{lang.add_page.desc.create_https_backend}}
</div>
</div>
</div>
<div class="div-pannel">
<div class="div-server add-proxy-backend-head">
<div class="server-name">
<span title="Create userlists" class="span-link" id="add6">Create userlists</span>
<span title="{{lang.words.create|title()}} {{lang.words.userlist}}" class="span-link" id="add6">{{lang.words.create|title()}} {{lang.words.userlists}}</span>
</div>
<div class="server-desc add_proxy">
Create userlists. And use it in the "Add" sections
{{lang.words.create|title()}} {{lang.words.userlists}}. {{lang.add_page.desc.use_add}}
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -6,25 +6,25 @@
<span name="add_servers">
<input name="prefix" class="prefix form-control" title="servers prefix" size="3" placeholder="web" style="display: none;">
<input name="template-number" class="prefix form-control" title="servers num" value="3" type="number" style="width: 35px; display: none;">
<input name="servers" required title="Backend IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control">:
<input name="server_port" required title="Backend port" size=8 placeholder="yyy" class="form-control add_server_number" type="number">
<span name="port_check_text">port check:</span> <input name="port_check" required title="Port for checking" data-help="A basic TCP-layer health check tries to connect to the server's TCP port. The check is valid when the server answers with a SYN/ACK packet." size=8 class="form-control add_server_number" type="number">
<span name="maxconn_name">maxconn:</span> <input name="server_maxconn" required title="Maxconn. Default 200" data-help="The total number of connections allowed, process-wide. This stops the process from accepting too many connections at once, which safeguards it from running out of memory." size=8 value="200" class="form-control add_server_number" type="number">
<input name="servers" required title="{{lang.words.backend|title()}} IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control">:
<input name="server_port" required title="{{lang.words.backend|title()}} {{lang.words.port}}" size=8 placeholder="yyy" class="form-control add_server_number" type="number">
<span name="port_check_text">{{lang.phrases.port_check}}:</span> <input name="port_check" required title="{{lang.words.port|title()}} {{lang.words.for}} {{lang.words.checking}}" data-help="{{lang.add_page.desc.port_check}}" size=8 class="form-control add_server_number" type="number">
<span name="maxconn_name">maxconn:</span> <input name="server_maxconn" required title="Maxconn. Default 200" data-help="{{lang.add_page.desc.maxconn}}" size=8 value="200" class="form-control add_server_number" type="number">
<span class="send_proxy"></span>
<br />
<input name="servers" title="{{lang.words.backend|title()}} IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control second-server"><span class="second-server">:</span>
<input name="server_port" title="{{lang.words.backend|title()}} {{lang.words.port}}" size=8 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="port_check_text">{{lang.phrases.port_check}}:</span> <input name="port_check" required title="{{lang.words.port|title()}} {{lang.words.for}} {{lang.words.checking}}" data-help="{{lang.add_page.desc.port_check}}" size=8 class="form-control add_server_number" type="number">
<span name="maxconn_name">maxconn:</span> <input name="server_maxconn" required title="Maxconn. Default 200" data-help="{{lang.add_page.desc.maxconn}}" size=8 value="200" class="form-control add_server_number" type="number">
<span class="send_proxy"></span>
<br />
<input name="servers" title="Backend IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control second-server"><span class="second-server">:</span>
<input name="server_port" title="Backend port" size=8 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="port_check_text">port check:</span> <input name="port_check" required title="Port for checking" data-help="A basic TCP-layer health check tries to connect to the server's TCP port. The check is valid when the server answers with a SYN/ACK packet." size=8 class="form-control add_server_number" type="number">
<span name="maxconn_name">maxconn:</span> <input name="server_maxconn" required title="Maxconn. Default 200" data-help="The total number of connections allowed, process-wide. This stops the process from accepting too many connections at once, which safeguards it from running out of memory." size=8 value="200" class="form-control add_server_number" type="number">
<span class="send_proxy"></span>
<br />
<input name="servers" title="Backend IP" size=14 placeholder="xxx.xxx.xxx.xxx" class="form-control second-server"><span class="second-server">:</span>
<input name="server_port" title="Backend port" size=3 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="port_check_text">port check:</span> <input name="port_check" required title="Port for checking" data-help="A basic TCP-layer health check tries to connect to the server's TCP port. The check is valid when the server answers with a SYN/ACK packet." size=8 class="form-control add_server_number" type="number">
<span name="maxconn_name">maxconn:</span> <input name="server_maxconn" required title="Maxconn. Default 200" data-help="The total number of connections allowed, process-wide. This stops the process from accepting too many connections at once, which safeguards it from running out of memory." size=8 value="200" class="form-control add_server_number" type="number">
<input name="server_port" title="{{lang.words.backend|title()}} {{lang.words.port}}" size=3 placeholder="yyy" class="form-control second-server add_server_number" type="number">
<span name="port_check_text">{{lang.phrases.port_check}}:</span> <input name="port_check" required title="{{lang.words.port|title()}} {{lang.words.for}} {{lang.words.checking}}" data-help="{{lang.add_page.desc.port_check}}" size=8 class="form-control add_server_number" type="number">
<span name="maxconn_name">maxconn:</span> <input name="server_maxconn" required title="Maxconn. Default 200" data-help="{{lang.add_page.desc.maxconn}}" size=8 value="200" class="form-control add_server_number" type="number">
<span class="send_proxy"></span>
</span>
<span>
<a class="link add-server backend_server" name="add-server-input" title="Add backend server" style="cursor: pointer;"></a>
<a class="link add-server backend_server" name="add-server-input" title="{{lang.words.add|title()}} {{lang.words.backend}} {{lang.words.server}}" style="cursor: pointer;"></a>
</span>
<a href="https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4.2-server-template" title="Read about Server-template" target="_blank" class="prefix" style="display: none; font-size: 13px; color: #23527c;">Read about Server-template</a>
<a href="https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4.2-server-template" title="{{lang.words.read|title()}} {{lang.words.about}} {{lang.words.server_template}}" target="_blank" class="prefix" style="display: none; font-size: 13px; color: #23527c;">{{lang.words.read|title()}} {{lang.words.about}} {{lang.words.server_template}}</a>

View File

@ -1,7 +1,7 @@
{% from 'include/input_macros.html' import input, checkbox %}
<tr>
<td class="padding20">
New hostname
{{lang.words.name|title()}}
<span class="need-field">*</span>
</td>
<td>{{ input('new-server-add') }}</td>
@ -13,44 +13,44 @@
<td>{{ input('new-ip') }}</td>
<tr>
<td class="padding20" title="SSH port">
Port
{{lang.words.port|title()}}
<span class="need-field">*</span>
</td>
<td>{{ input('new-port', value='22', type='number') }}</td>
</tr>
<tr>
<td class="padding20">Enable</td>
<td class="padding20">{{lang.words.enable|title()}}</td>
<td>{{ checkbox('enable', checked='checked') }}</td>
</tr>
<tr>
<td class="padding20" title="Virtual IP(VRRP)">Virt</td>
<td class="padding20" title="{{lang.words.virtual|title()}} IP(VRRP)">{{lang.words.virt|title()}}</td>
<td>{{ checkbox('typeip') }}</td>
</tr>
<tr>
<td class="padding20 help_cursor" title="Scan the server for HAProxy, NGINX, Keepalived and Firewalld services">Scan the server</td>
<td class="padding20 help_cursor" title="{{lang.phrases.scan_title}}">{{lang.words.scan|title()}} {{lang.words.the}} {{lang.words.server}}</td>
<td>{{ checkbox('scan_server', checked='checked') }}</td>
</tr>
<tr class="services_for_scan" style="display: none">
<td class="padding20" title="Is there HAProxy?">HAProxy</td>
<td class="padding20" title="{{lang.words.is_there}} HAProxy?">HAProxy</td>
<td>{{ checkbox('haproxy') }} </td>
</tr>
<tr class="services_for_scan" style="display: none">
<td class="padding20" title="Is there NGINX?">NGINX</td>
<td class="padding20" title="{{lang.words.is_there}} NGINX?">NGINX</td>
<td>{{ checkbox('nginx') }}</td>
</tr>
<tr class="services_for_scan" style="display: none">
<td class="padding20" title="Is there Apache?">Apache</td>
<td class="padding20" title="{{lang.words.is_there}} Apache?">Apache</td>
<td>{{ checkbox('apache') }}</td>
</tr>
<tr class="services_for_scan" style="display: none">
<td class="padding20" title="Is there Firewall?">Firewall</td>
<td class="padding20" title="{{lang.words.is_there}} Firewall?">Firewall</td>
<td>{{ checkbox('firewall') }}</td>
</tr>
<tr>
<td class="padding20 help_cursor" title="Actions with master config will automatically apply on slave">Slave for</td>
<td class="padding20 help_cursor" title="{{lang.phrases.slave_for_title}}">{{lang.words.slave_for}}</td>
<td>
<select id="slavefor">
<option value="0" selected>Not slave</option>
<option value="0" selected>------</option>
{% for master in masters %}
<option value="{{master.0}}">{{master.1}}</option>
{% endfor %}
@ -58,6 +58,6 @@
</td>
</tr>
<tr>
<td class="padding20">Description</td>
<td class="padding20">{{lang.words.desc|title()}}</td>
<td>{{ input('desc', size='30') }}</td>
</tr>

View File

@ -1,16 +1,16 @@
{% if not is_needed_tool %}
<div style="text-align: center;">
<h3>You have not installed Ansible</h3>.
<h3>{{lang.admin_page.desc.no_ansible}} Ansible</h3>.
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>
Read <a href="https://roxy-wi.org/installation#ansible" title="Installing Ansible" target="_blank">here</a> how to install Ansible.
{{lang.words.read|title()}} <a href="https://roxy-wi.org/installation#ansible" title="{{lang.words.install|title()}} Ansible" target="_blank">{{lang.words.here}}</a> {{lang.phrases.how_to_install}} Ansible.
</h4>
</div>
{% else %}
<div id="backup_tabs">
<ul>
<li><a href="#git_tab" title="Admin area: Upload to Git - Roxy-WI" id="backup-git-li">Git</a></li>
<li><a href="#backup_tab" title="Admin area: Manage backup - Roxy-WI" id="backup-backup-li">Backup</a></li>
<li><a href="#git_tab" title="{{lang.words.admin_area|title()}}: {{lang.words.upload|title()}} {{lang.words.in}} Git - Roxy-WI" id="backup-git-li">Git</a></li>
<li><a href="#backup_tab" title="{{lang.words.admin_area|title()}}: {{lang.words.manage|title()}} {{lang.words.backup|title()}} - Roxy-WI" id="backup-backup-li">{{lang.words.backup|title()}}</a></li>
</ul>
<div id="git_tab">
@ -20,13 +20,13 @@
<table class="overview" id="ajax-git-table">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn">Servers</th>
<th>Service</th>
<th>Period</th>
<th>Repo</th>
<th>Branch</th>
<td>Credentials</td>
<th>Description</th>
<th class="padding10 first-collumn">{{lang.words.servers|title()}}</th>
<th>{{lang.words.service|title()}}</th>
<th>{{lang.words.period|title()}}</th>
<th>{{lang.words.repo|title()}}</th>
<th>{{lang.words.branch|title()}}</th>
<td>{{lang.words.creds|title()}}</td>
<th>{{lang.words.desc|title()}}</th>
<th></th>
</tr>
</thead>
@ -34,10 +34,10 @@
{% include 'ajax/new_git.html' %}
</tbody>
</table>
<br /><span class="add-button" title="Add a new git job" id="add-git-button">+ Add git job</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} git {{lang.words.job}}" id="add-git-button">+ {{lang.words.add|title()}} git {{lang.words.job}}</span>
<br /><br />
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the description of all parameters <a href="https://roxy-wi.org/howto.py?howto=git" title="How to work with Git" target="_blank">here</a>
{{lang.phrases.read_about_parameters}} <a href="https://roxy-wi.org/howto/git" title="How to work with Git" target="_blank">{{lang.words.here}}</a>
</div>
{% endif %}
</div>
@ -46,14 +46,15 @@
{% include 'include/no_sub.html' %}
{% else %}
<table class="overview" id="ajax-backup-table">
<caption><h3>Filesystem</h3></caption>
<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</td>
<td class="padding10">Credentials</td>
<td class="padding10">Description</td>
<td class="padding10 first-collumn">{{lang.words.servers|title()}}</td>
<td class="padding10">{{lang.words.remote|title()}} {{lang.words.server}}</td>
<td class="padding10">{{lang.words.remote|title()}} {{lang.words.folder2}}</td>
<td class="padding10">{{lang.words.backup|title()}} {{lang.words.type}}</td>
<td class="padding10">{{lang.words.period|title()}}</td>
<td class="padding10">{{lang.words.creds|title()}}</td>
<td class="padding10">{{lang.words.desc|title()}}</td>
<td style="margin-left: 5px;"></td>
<td></td>
</tr>
@ -81,7 +82,7 @@
</td>
<td>
<select id="backup-credentials-{{b.id}}" required>
<option disabled selected>Choose credentials</option>
<option disabled selected>------</option>
{% for ssh in sshs %}
{% if ssh.enable == 1 %}
{% if ssh.id == b.cred %}
@ -101,21 +102,38 @@
{% endif %}
</td>
<td>
<a class="add" onclick="cloneBackup({{b.id}})" id="clone-backup{{b.id}}" title="Clone {{b.server}}" style="cursor: pointer;"></a>
<a class="add" onclick="cloneBackup({{b.id}})" id="clone-backup{{b.id}}" title="{{lang.words.clone|title()}} {{b.server}}" style="cursor: pointer;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteBackup({{b.id}})" title="Delete backup {{b.server}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteBackup({{b.id}})" title="{{lang.words.delete|title()}} {{lang.words.backup}} {{b.server}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
</table>
<br /><span class="add-button" title="Add a new backup job" id="add-backup-button">+ Add backup</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} {{lang.words.backup}} {{lang.words.job}}" id="add-backup-button">+ {{lang.words.add|title()}} {{lang.words.backup}}</span>
<br /><br />
<table class="overview" id="ajax-backup-s3-table">
<thead>
<caption><h3>S3</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">{{lang.words.servers|title()}}</td>
<td class="padding10">S3 {{lang.words.server}}</td>
<td class="padding10">{{lang.words.bucket|title()}}</td>
<td class="padding10">{{lang.words.period|title()}}</td>
<td class="padding10">{{lang.words.desc|title()}}</td>
<td style="margin-left: 5px;"></td>
<td></td>
</tr>
</thead>
<tbody id="tbody-s3"></tbody>
</table>
<br /><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} S3 {{lang.words.backup}} {{lang.words.job}}" id="add-backup-s3-button">+ {{lang.words.add|title()}} {{lang.words.backup}}</span>
<br /><br />
<div id="ajax-backup"></div>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the description of all parameters <a href="https://roxy-wi.org/description.py?description=backup" title="Backup description" target="_blank">here</a>
{{lang.phrases.read_about_parameters}} <a href="https://roxy-wi.org/description/backup" title="{{lang.words.backup|title()}} {{lang.words.desc}}" target="_blank">{{lang.words.here}}</a>
</div>
{% endif %}
</div>

View File

@ -3,15 +3,15 @@
<table class="overview" id="ajax-servers">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn" id="server-name-th">Name</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="checkbox-head" style="width: 5%" class="help_cursor"><span title="SSH port">Port</span></th>
<th class="checkbox-head" style="width: 5%" class="help_cursor"><span title="SSH port">{{lang.words.port|title()}}</span></th>
{% if page != "servers.py" %}
<th style="width: 10%">Group</th>
<th style="width: 10%">{{lang.words.group|title()}}</th>
{% endif %}
<th class="checkbox-head" style="min-width: 70px;">Enabled</th>
<th class="checkbox-head" style="min-width: 70px;">{{lang.words.enabled|title()}}</th>
<th style="min-width: 50px; padding-left: 5px;" class="help_cursor">
<span title="Virtual IP, something like VRRP">Virt</span>
<span title="{{lang.words.virtual|title()}} IP, something like VRRP">{{lang.words.virt|title()}}</span>
</th>
<th class="checkbox-head" style="min-width: 75px" id="server-haproxy-th">HAProxy</th>
<th class="checkbox-head" style="min-width: 65px;" id="server-nginx-th">Nginx</th>
@ -19,14 +19,14 @@
<th style="min-width: 100px;" class="help_cursor" id="server-firewalld-th">
<span title="If the server has a firewall enabled, enable this option">Firewalld</span>
</th>
<th class="checkbox-head" style="min-width: 80px;" class="help_cursor" id="server-protected-th">
<span title="If protection is enabled, then the server is inaccessible for editing by everyone except the admin role">Protected</span>
<th class="checkbox-head help_cursor" style="min-width: 80px;" class="help_cursor" id="server-protected-th">
<span title="{{lang.phrases.protected_title}}">{{lang.words.protected|title()}}</span>
</th>
<th style="width: 10%" class="help_cursor" id="server-slave-th">
<span id="slavefor-th" title="Actions with the master config will automatically apply on the slave">Slave for</span>
<span id="slavefor-th" title="{{lang.phrases.slave_for_title}}">{{lang.words.slave_for}}</span>
</th>
<th class="cred-field">Credentials</th>
<th style="width: 100%">Description</th>
<th class="cred-field">{{lang.words.creds|title()}}</th>
<th style="width: 100%">{{lang.words.desc|title()}}</th>
<th style="min-width: 17px;"></th>
<th></th>
<th></th>
@ -38,6 +38,7 @@
{% for server in servers %}
<tr id="server-{{server.0}}" class="{{ loop.cycle('odd', 'even') }} {% if adding %}newserver{% endif %}">
<td class="padding10 first-collumn">
<span class="serverNone server-status-small" title="{{lang.phrases.server_unknown}}" style="margin-left: -10px" id="server_status-{{server.0}}"></span>
{% set id = 'hostname-' + server.0|string() %}
{{ input(id, value=server.1, size='15') }}
</td>
@ -113,7 +114,7 @@
{% else %}
{{ checkbox(id) }}
{% endif %}
<button onclick="viewFirewallRules('{{server.2}}')" title="View firewall rules on server {{server.1}}">view</button>
<button onclick="viewFirewallRules('{{server.2}}')" title="{{lang.words.view|title()}} firewall {{lang.words.rules2}} {{lang.words.on}} {{lang.words.server2}} {{server.1}}" class="overflow" style="width: 60px;height: 28px;">{{lang.words.view}}</button>
</div>
</td>
<td class="checkbox" style="padding-left: 15px;">
@ -150,7 +151,7 @@
{% endif %}
{% endfor %}
</select>
<button onclick="checkSshConnect('{{server.2}}')" title="Check SSH connect to the server {{server.1}}">check</button>
<button onclick="checkSshConnect('{{server.2}}')" title="Check SSH connect to the server {{server.1}}" class="overflow" style="width: 70px;height: 28px;">{{lang.words.check}}</button>
</div>
</td>
<td>
@ -162,28 +163,27 @@
{% endif %}
</td>
<td>
<a href="history.py?service=server&serv={{server.2}}" title="View history for this server" class="history"></a>
<a href="history.py?service=server&serv={{server.2}}" title="{{lang.words.view|title}} {{lang.words.history}} {{lang.words.for}} {{lang.words.this}} {{lang.words.server}}" class="history"></a>
</td>
<td style="min-width: 17px;">
<a class="info" onclick="showServerInfo('{{server.0}}', '{{server.2}}')" id="server_info_link-{{server.0}}" title="Show server info" style="cursor: pointer; color: var(--green-color)"></a>
<a class="info" onclick="showServerInfo('{{server.0}}', '{{server.2}}')" id="server_info_link-{{server.0}}" title="{{lang.words.show|title()}} {{lang.words.server}} {{lang.words.info}}" style="cursor: pointer; color: var(--green-color)"></a>
</td>
<td>
<a class="add" onclick="cloneServer({{server.0}})" id="clone-{{server.0}}" title="Copy the settings from {{server.1}}" style="cursor: pointer;"></a>
<a class="add" onclick="cloneServer({{server.0}})" id="clone-{{server.0}}" title="{{lang.words.copy|title()}} {{lang.words.settings}} {{server.1}}" style="cursor: pointer;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteServer({{server.0}})" title="Delete server {{server.1}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteServer({{server.0}})" title="{{lang.words.delete|title()}} {{lang.words.server}} {{server.1}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endfor %}
{% if not adding %}
</tbody>
</table>
<br /><span class="add-button" title="Add server" id="add-server-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.server}}" id="add-server-button">+ {{lang.words.add|title()}}</span>
<br /><br />
<div id="checkSshConnect"></div>
<div class="add-note addName alert alert-info" style="width: inherit; margin-right: 15px;" id="servers-help-link">
You can read the description of all parameters <a href="https://roxy-wi.org/description/servers" title="Servers description" target="_blank">here</a>
or read HowTo in this <a href="https://roxy-wi.org/howto/setup" title="How to setup servers, group and SSH credentials" target="_blank">article</a>
{{lang.phrases.read_about_parameters}} <a href="https://roxy-wi.org/description/servers" title="{{lang.words.servers|title()}} {{lang.words.desc}}" target="_blank">{{lang.words.here}}</a>, {{lang.phrases.read_howto}} <a href="https://roxy-wi.org/howto/setup" title="How to setup servers, group and SSH credentials" target="_blank">{{lang.words.article}}</a>
</div>
{% endif %}
{% if user_status == 0 or user_plan == 'user' %}
@ -192,10 +192,16 @@
$('select:regex(id, slavefor)').selectmenu();
$('select:regex(id, slavefor)').selectmenu("disable");
{% if user_status == 0 %}
$('#slavefor-th').attr("title", "Actions with the master config will automatically apply on the slave. You are not subscribed. Please subscribe to have access to this feature");
$('#slavefor-th').attr("title", "{{lang.phrases.slave_for_title}}. {{lang.phrases.no_sub}}. {{lang.phrases.pls_sub}}.");
{% elif user_plan == 'user' %}
$('#slavefor-th').attr("title", "Actions with the master config will automatically apply on the slave. This feature is not available for your plan");
$('#slavefor-th').attr("title", "{{lang.phrases.slave_for_title}}. {{lang.phrases.no_av_feat}}");
{% endif %}
});
</script>
{% endif %}
<script>
{%- for server in servers %}
setInterval(serverIsUp, 18000, '{{server.2}}', '{{server.0}}');
serverIsUp('{{server.2}}', '{{server.0}}');
{%- endfor %}
</script>

View File

@ -66,7 +66,7 @@
{% endif %}
</td>
<td class="addOption">
{{set.desc}}
{{ lang.settings[set.section][set.param] }}
</td>
</tr>
{% endif %}

View File

@ -1,16 +1,16 @@
<table id="ssh_enable_table" class="overview">
<tr class="overviewHead" style="width: 50%;">
<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">Name<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 class="padding10 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 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>
{% if page != "servers.py" %}
<td style="width: 25%;">Group</td>
<td style="width: 25%;">{{lang.words.group|title()}}</td>
{% endif %}
<td style="width: 100%;" class="help_cursor" id="ssh-user-name-td">
<span title="Enter SSH user name. If SSH key disabled, enter password for SSH user">User name</span>
<span title="Enter SSH user name. If SSH key disabled, enter password for SSH user">{{lang.words.username|title()}}</span>
</td>
<td></td>
</tr>
@ -22,9 +22,9 @@
</td>
<td class="first-collumn" valign="top" style="padding-top: 15px;">
{% if ssh.enable == 1 %}
<label for="ssh_enable-{{ssh.id}}">Enable SSH key</label><input type="checkbox" id="ssh_enable-{{ssh.id}}" checked>
<label for="ssh_enable-{{ssh.id}}">{{lang.words.enable|title()}} SSH {{lang.words.key}}</label><input type="checkbox" id="ssh_enable-{{ssh.id}}" checked>
{% else %}
<label for="ssh_enable-{{ssh.id}}">Enable SSH key</label><input type="checkbox" id="ssh_enable-{{ssh.id}}">
<label for="ssh_enable-{{ssh.id}}">{{lang.words.enable|title()}} SSH {{lang.words.key}}</label><input type="checkbox" id="ssh_enable-{{ssh.id}}">
{% endif %}
</td>
{% if page != "servers.py" %}
@ -53,25 +53,25 @@
<br>
</td>
<td>
<a class="delete" onclick="confirmDeleteSsh({{ssh.id}})" title="Delete SSH credentials {{ssh.name}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteSsh({{ssh.id}})" title="{{lang.words.delete|title()}} SSH {{lang.words.creds}} {{ssh.name}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endfor %}
</table>
<br /><span class="add-button" title="Add ssh" id="add-ssh-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} SSH" id="add-ssh-button">+ {{lang.words.add|title()}}</span>
<br /><br />
<table id="ssh_key">
<tr class="overviewHead" style="width: 50%;">
<td class="padding10 first-collumn" style="width: 25%;">Upload SSH Key</td>
<td class="padding10 first-collumn" style="width: 25%;">{{lang.words.upload|title()}} SSH {{lang.words.key}}</td>
<td class="help_cursor">
<span title="Private key. Note: The public key must be pre-installed on all servers to which you plan to connect">Key</span>
<span title="{{lang.phrases.private_key_note}}">{{lang.words.key|title()}}</span>
</td>
<td></td>
</tr>
<tr style="width: 50%;">
<td class="first-collumn" valign="top" style="padding-top: 15px;">
<select id="ssh-key-name">
<option disabled selected>Choose credentials</option>
<option disabled selected>------</option>
{% for ssh in sshs %}
<option value={{ssh.name}}>{{ssh.name}}</option>
{% endfor %}
@ -79,13 +79,13 @@
</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>
<a class="ui-button ui-widget ui-corner-all" id="ssh_key_upload" title="{{lang.words.upload|title()}} SSH {{lang.words.key}}" onclick="uploadSsh()">{{lang.words.upload|title()}}</a>
</td>
<td></td>
</tr>
</table>
<div id="ajax-ssh"></div>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the description of all parameters <a href="https://roxy-wi.org/description/creds" title="Servers description" target="_blank">here</a>
or read HOWTO <a href="https://roxy-wi.org/howto/setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
{{lang.phrases.read_about_parameters}} <a href="https://roxy-wi.org/description/creds" title="Servers description" target="_blank">{{lang.words.here}}</a>.
{{lang.phrases.read_howto}} <a href="https://roxy-wi.org/howto/setup" title="How to setup servers, group and SSH credentials" target="_blank">{{lang.words.article}}</a>
</div>

View File

@ -3,15 +3,15 @@
<table class="overview" id="ajax-users">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn" id="user-login-th">Login</th>
<th style="width: 10%">Password</th>
<th style="width: 10%" id="user-active-th">Active</th>
<th style="width: 20%">Email</th>
<th style="width: 10%" id="user-role-th">Role</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%" id="user-active-th">{{lang.words.active|title()}}</th>
<th style="width: 20%">{{lang.words.email|title()}}</th>
<th style="width: 10%" id="user-role-th">{{lang.words.role|title()}}</th>
{% if page != "servers.py" %}
<th style="width: 10%">Group</th>
<th style="width: 10%">{{lang.words.groups|title()}}</th>
{% endif %}
<th style="width: 100%" id="user-services-th">Services</th>
<th style="width: 100%" id="user-services-th">{{lang.words.services|title()}}</th>
<th></th>
<th></th>
<th></th>
@ -34,7 +34,7 @@
</td>
<td>
{% if user.6 != 1%}
<span title="Change password" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserPasswordDialog('{{user.user_id}}')">
<span title="{{lang.words.change|title()}} {{lang.words.password}}" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserPasswordDialog('{{user.user_id}}')">
</span>
{% endif %}
</td>
@ -78,26 +78,26 @@
</td>
{% if page != "servers.py" %}
<td>
<span title="Change user groups" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserGroupDialog('{{user.user_id}}')">
<span title="{{lang.words.change2|title()}} {{lang.words.user3}} {{lang.words.groups}}" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserGroupDialog('{{user.user_id}}')">
</td>
{% endif %}
<td>
<span title="Change user's services" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserServiceDialog('{{user.user_id}}')">
<span title="{{lang.words.change2|title()}} {{lang.words.user3}} {{lang.words.services}}" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserServiceDialog('{{user.user_id}}')">
</td>
<td>
<a href="history.py?service=user&user_id={{user.user_id}}" title="View history for this user" class="history"></a>
<a href="history.py?service=user&user_id={{user.user_id}}" title="{{lang.words.view|title()}} {{lang.words.history}} {{lang.words.for}} {{lang.words.user2}}" class="history"></a>
</td>
<td>
<a class="add" onclick="cloneUser({{user.user_id}})" id="clone-{{user.user_id}}" title="Copy the settings from {{user.1}}" style="cursor: pointer;"></a>
<a class="add" onclick="cloneUser({{user.user_id}})" id="clone-{{user.user_id}}" title="{{lang.words.w_copy|title()}} {{lang.words.the}} {{lang.words.settings}} {{lang.words.from}} {{user.username}}" style="cursor: pointer;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteUser({{user.user_id}})" title="Delete user {{user.1}}" style="cursor: pointer;"></a>
<a class="delete" onclick="confirmDeleteUser({{user.user_id}})" title="{{lang.words.delete|title()}} {{user.username}}" style="cursor: pointer;"></a>
</td>
</tr>
{% endfor %}
{% if not adding %}
<tbody>
</table>
<br /><span class="add-button" title="Add user" id="add-user-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.new}} {{lang.words.user2}}" id="add-user-button">+ {{lang.words.add|title()}}</span>
<br /><br />
{% endif %}
{% endif %}

View File

@ -1,16 +1,16 @@
{% if page != "servers.py" %}
<div id="user-add-table" style="display: none;">
<table class="overview">
<table class="overview" id="user-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new2}} {{lang.words.user2}}">
{% include 'include/tr_validate_tips.html' %}
{% include 'include/admin_add_user.html' %}
<tr>
<td class="padding20">
Role
{{lang.words.role|title()}}
<span class="need-field">*</span>
</td>
<td>
<select id="new-role" name="new-role">
<option disabled selected>Select a role</option>
<option disabled selected>{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.role}}</option>
{% for role in roles %}
<option value="{{ role.name }}">{{ role.name }}</option>
{% endfor %}
@ -19,12 +19,12 @@
</tr>
<tr>
<td class="padding20">
Group
{{lang.words.group|title()}}
<span class="need-field">*</span>
</td>
<td>
<select id="new-group" name="new-group">
<option disabled selected>Select a group</option>
<option disabled selected>{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.group2}}</option>
{% for group in groups %}
<option value="{{ group.group_id }}">{{ group.name }}</option>
{% endfor %}
@ -34,34 +34,34 @@
</table>
</div>
<div id="group-add-table" style="display: none;">
<table class="overview">
<table class="overview" id="group-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new3}} {{lang.words.group2}}">
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
New group name
{{lang.words.name|title()}}
<span class="need-field">*</span>
</td>
<td>
{{ input('new-group-add', autofocus='autofocus') }}
</td>
</tr>
<td class="padding20">Description</td>
<td class="padding20">{{lang.words.desc|title()}}</td>
<td>{{ input('new-desc', size="40") }}</td>
</tr>
</table>
</div>
{% else %}
<div id="user-add-table" style="display: none;">
<table class="overview">
<table class="overview" id="user-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new2}} {{lang.words.user2}}">
{% include 'include/tr_validate_tips.html' %}
{% include 'include/admin_add_user.html' %}
<td class="padding20">
Role
{{lang.words.role|title()}}
<span class="need-field">*</span>
</td>
<td>
<select id="new-role" name="new-role">
<option disabled selected>Select a role</option>
<option disabled selected>{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.role}}</option>
{% for role in roles %}
{% if role.name != "superAdmin" %}
<option value="{{ role.name }}">{{ role.name }}</option>
@ -73,18 +73,18 @@
</table>
</div>
{% endif %}
<div id="server-add-table" title="Add a new server " style="display: none;">
<table class="overview">
<div id="server-add-table" style="display: none;">
<table class="overview" id="server-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} {{lang.words.server}}">
{% include 'include/tr_validate_tips.html' %}
{% include 'include/admin_add_server.html' %}
<tr>
<td class="padding20">
Credentials
{{lang.words.creds|title()}}
<span class="need-field">*</span>
</td>
<td>
<select id="credentials" required>
<option disabled selected>Select credentials</option>
<option disabled selected>{{lang.words.select|title()}} {{lang.words.creds}}</option>
{% for ssh in sshs %}
<option value="{{ssh.id}}">{{ssh.name}}</option>
{% endfor %}
@ -94,12 +94,12 @@
{% if page != "servers.py" %}
<tr>
<td class="padding20">
Group
{{lang.words.group|title()}}
<span class="need-field">*</span>
</td>
<td>
<select id="new-server-group-add" name="new-server-group-add">
<option disabled selected value="0">Select a group</option>
<option disabled selected value="0">{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.group2}}</option>
{% for group in groups %}
<option value="{{ group.group_id }}">{{ group.name }}</option>
{% endfor %}
@ -110,11 +110,11 @@
</table>
</div>
<div id="ssh-add-table" style="display: none;">
<table>
<table class="overview" id="ssh-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new4}} SSH {{lang.words.creds}}">
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
Name
{{lang.words.name|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -122,14 +122,14 @@
</td>
</tr>
<tr>
<td class="padding20">SSH key</td>
<td class="padding20">SSH {{lang.words.key}}</td>
<td>
<label for="new-ssh_enable">Enabled SSH key</label><input type="checkbox" id="new-ssh_enable" checked>
<label for="new-ssh_enable">{{lang.words.enabled|title()}} SSH {{lang.words.key}}</label><input type="checkbox" id="new-ssh_enable" checked>
</td>
</tr>
{% if page != "servers.py" %}
<tr>
<td class="padding20">Group</td>
<td class="padding20">{{lang.words.group|title()}}</td>
<td>
<select id="new-sshgroup" name="new-sshgroup">
{% for group in groups %}
@ -141,12 +141,12 @@
{% endif %}
<tr>
<td class="padding20">
User name
{{lang.words.username|title()}}
<span class="need-field">*</span>
</td>
<td>
<p style="width: 100px;">
{{ input('ssh_user', value=ssh_user, title='SSH username') }}
{{ input('ssh_user', value=ssh_user, title='SSH {{lang.words.username|title()}}') }}
</p>
{{ input('ssh_pass', type='password', style="display: none;", title="User password, if SSH key is disabled") }}
</td>
@ -154,11 +154,11 @@
</table>
</div>
<div id="telegram-add-table" style="display: none;">
<table>
<table class="overview" id="telegram-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} Telegram {{lang.words.channel}}">
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
<span title="Token that gave you @father_bot">Token</span>
<span title="Token that gave you @father_bot">{{lang.words.token|title()}}</span>
<span class="need-field">*</span>
</td>
<td>
@ -167,7 +167,7 @@
</tr>
<tr>
<td class="padding20">
Channel name
{{lang.words.channel|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -176,10 +176,10 @@
</tr>
{% if page != "servers.py" %}
<tr>
<td class="padding20">Group</td>
<td class="padding20">{{lang.words.group|title()}}</td>
<td>
<select id="new-telegram-group-add" name="new-telegram-group-add">
<option disabled selected value="0">Select a group</option>
<option disabled selected value="0">{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.group2}}</option>
{% for group in groups %}
<option value="{{ group.group_id }}">{{ group.name }}</option>
{% endfor %}
@ -190,11 +190,11 @@
</table>
</div>
<div id="slack-add-table" style="display: none;">
<table>
<table class="overview" id="slack-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} Slack {{lang.words.channel}}">
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
<span title="Token that has given with APP registration">Token</span>
<span title="Token that has given with APP registration">{{lang.words.token|title()}}</span>
<span class="need-field">*</span>
</td>
<td>
@ -203,7 +203,7 @@
</tr>
<tr>
<td class="padding20">
Channel name
{{lang.words.channel|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -212,10 +212,10 @@
</tr>
{% if page != "servers.py" %}
<tr>
<td class="padding20">Group</td>
<td class="padding20">{{lang.words.group|title()}}</td>
<td>
<select id="new-slack-group-add" name="new-slack-group-add">
<option disabled selected value="0">Select a group</option>
<option disabled selected value="0">{{lang.words.select|title()}} {{lang.words.w_a}} {{lang.words.group2}}</option>
{% for group in groups %}
<option value="{{ group.group_id }}">{{ group.name }}</option>
{% endfor %}
@ -226,17 +226,17 @@
</table>
</div>
<div id="backup-add-table" title="Add a new backup job " style="display: none;">
<table class="overview">
<table class="overview" id="backup-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} {{lang.words.backup}}">
{% include 'include/tr_validate_tips.html' %}
{% include 'include/add_backup.html' %}
<tr>
<td class="padding20">
Credentials for a remote server
{{lang.words.creds|title()}} {{lang.words.for}} {{lang.words.w_a}} {{lang.words.remote}} {{lang.words.server}}
<span class="need-field">*</span>
</td>
<td>
<select id="backup-credentials" required>
<option disabled selected>Select credentials</option>
<option disabled selected>{{lang.words.select|title()}} {{lang.words.creds}}</option>
{% for ssh in sshs %}
{% if ssh.enable == 1 %}
<option value="{{ssh.id}}">{{ssh.name}}</option>
@ -247,7 +247,7 @@
</tr>
<tr>
<td class="padding20">
Description
{{lang.words.desc|title()}}
</td>
<td>
{{ input('backup-description', size='30') }}
@ -255,12 +255,18 @@
</tr>
</table>
</div>
<div id="git-add-table" title="Add a new git job " style="display: none;">
<table class="overview">
<div id="s3-backup-add-table" style="display: none;">
<table class="overview" id="s3-backup-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} S3 {{lang.words.backup}}">
{% include 'include/tr_validate_tips.html' %}
{% include 'include/add_s3_backup.html' %}
</table>
</div>
<div id="git-add-table" style="display: none;">
<table class="overview" id="git-add-table-overview" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} git {{lang.words.job}}">
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20" style="width: 40%;">
Server
{{lang.words.server|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -274,7 +280,7 @@
</tr>
<tr>
<td class="padding20" style="width: 40%;">
Service
{{lang.words.service|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -288,7 +294,7 @@
</tr>
<tr>
<td class="padding20">
Period
{{lang.words.period|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -298,7 +304,7 @@
</tr>
<tr>
<td class="padding20">
Init a new repository
{{lang.words.init|title()}} {{lang.words.w_a}} {{lang.words.new}} {{lang.words.repository}}
</td>
<td>
{{ checkbox('git-init')}}
@ -306,7 +312,7 @@
</tr>
<tr style="display: none" class="git-init-params">
<td class="padding20">
Repository
{{lang.words.repository|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -315,7 +321,7 @@
</tr>
<tr>
<td class="padding20">
Branch name
Branch {{lang.words.name}}
<span class="need-field">*</span>
</td>
<td>
@ -324,7 +330,7 @@
</tr>
<tr>
<td class="padding20">
Credentials for a git user
{{lang.words.creds|title()}} {{lang.words.for}} {{lang.words.w_a}} git {{lang.words.user}}
<span class="need-field">*</span>
</td>
<td>
@ -340,7 +346,7 @@
</tr>
<tr>
<td class="padding20">
Description
{{lang.words.desc|title()}}
</td>
<td>
{{ input('git-description', size='30') }}
@ -349,7 +355,7 @@
</table>
</div>
<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>
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:3px 12px 20px 0;"></span>{{lang.phrases.are_you_sure}}</p>
</div>
<div id="firewall_rules" style="display: none; padding: 0 2px 0 0; margin-left: 1px; margin-right: -4px;">
<div id="firewall_rules_body"></div>

View File

@ -3,21 +3,21 @@
<table class="overview">
<tr>
<td colspan="2">
<p class="validateTips alert alert-success">Enter a password and confirm</p>
<p class="validateTips alert alert-success">{{lang.words.enter2|title()}} {{lang.words.w_a}} {{lang.words.password}} {{lang.words.and}} {{lang.words.confirmation}}</p>
</td>
</tr>
<tr>
<td class="padding20">Password</td>
<td class="padding20">{{lang.words.password|title()}}</td>
<td>{{ input('change-password', type='password') }}</td>
</tr>
<tr>
<td class="padding20">Confirm password</td>
<td class="padding20">{{lang.words.confirm|title()}} {{lang.words.password}}</td>
<td>{{ input('change2-password', type='password') }}</td>
</tr>
<tr id="missmatchpass" style="display: none;">
<td colspan="2">
<p class="validateTips alert alert-danger" style="margin-top: 10px;">The passwords are mismatched</p>
<p class="validateTips alert alert-danger" style="margin-top: 10px;">{{lang.phrases.pass_mismatched}}</p>
</td>
</tr>
</table>
</div>
</div>

View File

@ -1,3 +1,3 @@
<div id="dialog-confirm" title="Are you sure you want to delete?" style="display: none;">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:3px 12px 20px 0;"></span>Deleting irreversibly all data will be lost?</p>
</div>
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:3px 12px 20px 0;"></span>{{lang.phrases.delete_dialog}}</p>
</div>

View File

@ -1,40 +1,40 @@
{% if not is_needed_tool %}
<div style="text-align: center;">
<h3>You have not installed Ansible</h3>.
<h3>{{lang.admin_page.desc.no_ansible}} Ansible</h3>.
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>
Read <a href="https://roxy-wi.org/installation#ansible" title="Installing Ansible" target="_blank">here</a> how to install Ansible.
{{lang.words.read|title()}} <a href="https://roxy-wi.org/installation#ansible" title="{{lang.words.install|title()}} Ansible" target="_blank">here</a> {{lang.phrases.how_to_install}} Ansible.
</h4>
</div>
{% else %}
{% if page == 'users.py' %}
<table id="grafana-table">
<caption><h3>Grafana and Prometheus servers</h3></caption>
<caption><h3>Grafana {{lang.words.and}} Prometheus {{lang.words.servers}}</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Current installation</td>
<td class="padding10 first-collumn" style="width: 40%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 30%;">Note</td>
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.installation}}</td>
<td class="padding10 first-collumn" style="width: 40%;">{{lang.words.available|title()}} {{lang.words.versions}}</td>
<td class="padding10 first-collumn" style="width: 30%;">{{lang.words.note|title()}}</td>
<td></td>
<td></td>
</tr>
<tr>
<td id="cur_grafana_ver" class="padding10 first-collumn">
{% if grafana == "active" %}
Grafana and Prometheus servers have benn installed
Grafana {{lang.words.and}} Prometheus {{lang.admin_page.desc.been_installed}}
{% else %}
There are no Grafana and Prometheus servers
{{lang.admin_page.desc.there_are_no}}
{% endif %}
</td>
<td class="padding10 first-collumn" style="width: 20%;">
Roxy-WI will try to install the latest Grafana and Prometheus servers versions
{{lang.admin_page.desc.latest_repo}} Grafana {{lang.words.and}} Prometheus
</td>
<td class="padding10 first-collumn">
Before installing any exporters, first install Grafana and Prometheus servers
{{lang.admin_page.desc.before_install}} Grafana {{lang.words.and}} Prometheus {{lang.words.servers}}
</td>
<td></td>
<td>
{% if grafana != "active" %}
<span class="ui-button ui-widget ui-corner-all" id="grafna_install" title="Install Grafana and Prometheus server">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="grafna_install" title="{{lang.words.install|title()}} Grafana {{lang.words.and}} Prometheus {{lang.words.servers}}">{{lang.words.install|title()}}</span>
{% endif %}
</td>
</tr>
@ -43,10 +43,10 @@
<table id="haproxy-table">
<caption><h3>HAProxy Exporter</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 20%;">Current installation</td>
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
<td class="help_cursor" style="width: 20%;" title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter" data-intro="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter">External Prometheus</td>
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.current2|title()}} {{lang.words.installation}}</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.server|title()}}</td>
<td class="help_cursor" style="width: 20%;" data-intro="{{lang.admin_page.desc.ext_prom}}">{{lang.words.external|title()}}Prometheus</td>
<td></td>
<td></td>
</tr>
@ -65,19 +65,19 @@
{% endfor %}
</select>
</td>
<td style="padding-left: 50px;">{{ checkbox('haproxy_ext_prom', title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter") }}</td>
<td style="padding-left: 50px;">{{ checkbox('haproxy_ext_prom', title=lang.admin_page.desc.ext_prom) }}</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="haproxy_exp_install" title="Install HAProxy Exporter">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="haproxy_exp_install" title="{{lang.words.install|title()}} HAProxy Exporter">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
<table id="nginx-table">
<caption><h3>NGINX Exporter</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 20%;">Current installation</td>
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
<td class="help_cursor" style="width: 20%;" title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter">External Prometheus</td>
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.current2|title()}} {{lang.words.installation}}</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.server|title()}}</td>
<td class="help_cursor" style="width: 20%;" data-help="lang.admin_page.desc.ext_prom">{{lang.words.external|title()}}Prometheus</td>
<td></td>
<td></td>
</tr>
@ -96,19 +96,19 @@
{% endfor %}
</select>
</td>
<td style="padding-left: 50px;">{{ checkbox('nginx_ext_prom', title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter") }}</td>
<td style="padding-left: 50px;">{{ checkbox('nginx_ext_prom', title=lang.admin_page.desc.ext_prom) }}</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="nginx_exp_install" title="Install NGINX Exporter">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="nginx_exp_install" title="{{lang.words.install|title()}} NGINX Exporter">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
<table id="apache-table">
<caption><h3>Apache Exporter</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 20%;">Current installation</td>
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
<td class="help_cursor" style="width: 20%;" title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter">External Prometheus</td>
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.current2|title()}} {{lang.words.installation}}</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.server|title()}}</td>
<td class="help_cursor" style="width: 20%;" data-help="{{lang.admin_page.desc.ext_prom}}">{{lang.words.external|title()}}Prometheus</td>
<td></td>
<td></td>
</tr>
@ -127,19 +127,19 @@
{% endfor %}
</select>
</td>
<td style="padding-left: 50px;">{{ checkbox('apache_ext_prom', title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter") }}</td>
<td style="padding-left: 50px;">{{ checkbox('apache_ext_prom', title=lang.admin_page.desc.ext_prom) }}</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="apache_exp_install" title="Install Apache Exporter">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="apache_exp_install" title="{{lang.words.install|title()}} Apache Exporter">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
<table id="keepalived-table">
<caption><h3>Keepalived Exporter</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 20%;">Current installation</td>
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
<td class="help_cursor" style="width: 20%;" title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter">External Prometheus</td>
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.current2|title()}} {{lang.words.installation}}</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.server|title()}}</td>
<td class="help_cursor" style="width: 20%;" title="{{lang.admin_page.desc.ext_prom}}">{{lang.words.external|title()}}Prometheus</td>
<td></td>
<td></td>
</tr>
@ -158,19 +158,19 @@
{% endfor %}
</select>
</td>
<td style="padding-left: 50px;">{{ checkbox('keepalived_ext_prom', title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter") }}</td>
<td style="padding-left: 50px;">{{ checkbox('keepalived_ext_prom', title=lang.admin_page.desc.ext_prom) }}</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="keepalived_exp_install" title="Install Keepalived Exporter">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="keepalived_exp_install" title="{{lang.words.install|title()}} Keepalived Exporter">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
<table style="margin-top: 20px" id="node-table">
<caption><h3>Node Exporter</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 20%;">Current installation</td>
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 30%;">Server</td>
<td class="help_cursor" style="width: 20%;" title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter">External Prometheus</td>
<td class="padding10 first-collumn" style="width: 20%;">{{lang.words.current2|title()}} {{lang.words.installation}}</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.server|title()}}</td>
<td class="help_cursor" style="width: 20%;" title="{{lang.admin_page.desc.ext_prom}}">{{lang.words.external|title()}}Prometheus</td>
<td></td>
<td></td>
</tr>
@ -189,15 +189,15 @@
{% endfor %}
</select>
</td>
<td style="padding-left: 50px;">{{ checkbox('node_ext_prom', title="This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter") }}</td>
<td style="padding-left: 50px;">{{ checkbox('node_ext_prom', title=lang.admin_page.desc.ext_prom) }}</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="node_exp_install" title="Install Node Exporter">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="node_exp_install" title="{{lang.words.install|title()}} Node Exporter">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
<div id="ajaxmon"></div>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
Read <a href="https://roxy-wi.org/services/grafana" title="About Grafana and Prometheus servers" target="_blank">About Grafana and Prometheus servers</a>
and <a href="https://roxy-wi.org/howto/exporters" title="About Exporters" target="_blank">About Exporters</a>
{{lang.words.read|title()}} <a href="https://roxy-wi.org/services/grafana" title="About Grafana and Prometheus servers" target="_blank">{{lang.words.about|title()}} Grafana and Prometheus servers</a>
{{lang.words.and}} <a href="https://roxy-wi.org/howto/exporters" title="About Exporters" target="_blank">{{lang.words.about|title()}} Exporters</a>
</div>
{% endif %}

View File

@ -19,12 +19,12 @@
<table class="overview hover order-column display compact" id="scan_history">
<thead>
<tr class="overviewHead">
<th class="padding10" style="width: 10%; padding-left: 10px;">Status</th>
<th>Host</th>
<th>Port</th>
<th>Possible service name</th>
<th>Date</th>
<th>Time</th>
<th class="padding10" style="width: 10%; padding-left: 10px;">{{lang.words.status|title()}}</th>
<th>{{lang.words.host|title()}}</th>
<th>{{lang.words.port|title()}}</th>
<th>{{lang.phrases.possible_service_name}}</th>
<th>{{lang.words.date|title()}}</th>
<th>{{lang.words.time|title()}}</th>
</tr>
</thead>
<tbody>

View File

@ -10,7 +10,7 @@
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
Provider name
{{lang.words.provider|title()}} {{lang.words.name}}
<span class="need-field">*</span>
</td>
<td>{{input('aws_new_name', required='required', size='30')}}</td>
@ -18,7 +18,7 @@
{% if role == 1 %}
<tr>
<td class="padding20">
Group
{{lang.words.group|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -56,7 +56,7 @@
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
Provider name
{{lang.words.provider|title()}} {{lang.words.name}}
<span class="need-field">*</span>
</td>
<td>{{input('do_new_name', required='required', size='30')}}</td>
@ -64,7 +64,7 @@
{% if role == 1 %}
<tr>
<td class="padding20">
Group
{{lang.words.group|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -95,7 +95,7 @@
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
Provider name
{{lang.words.provider|title()}} {{lang.words.name}}
<span class="need-field">*</span>
</td>
<td>{{input('gcore_new_name', required='required', size='30')}}</td>
@ -103,7 +103,7 @@
{% if role == 1 %}
<tr>
<td class="padding20">
Group
{{lang.words.group|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -119,14 +119,14 @@
{% endif %}
<tr>
<td class="padding20">
User name
{{lang.words.username|title()}}
<span class="need-field">*</span>
</td>
<td>{{input('gcore_new_user', required='required', size='30')}}</td>
</tr>
<tr>
<td class="padding20">
Password
{{lang.words.password|title()}}
<span class="need-field">*</span>
</td>
<td>{{input('gcore_new_pass', required='required', type='password', size='30')}}</td>
@ -138,7 +138,7 @@
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
Provider name
{{lang.words.provider|title()}} {{lang.words.name}}
<span class="need-field">*</span>
</td>
<td>{{input('aws_edit_provider_name', required='required', size='30')}}</td>
@ -166,7 +166,7 @@
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
Provider name
{{lang.words.provider|title()}} {{lang.words.name}}
<span class="need-field">*</span>
</td>
<td>{{input('do_edit_provider_name', required='required', size='30')}}</td>
@ -187,7 +187,7 @@
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">
Provider name
{{lang.words.provider|title()}} {{lang.words.name}}
<span class="need-field">*</span>
</td>
<td>{{input('gcore_edit_provider_name', required='required', size='30')}}</td>
@ -196,14 +196,14 @@
{{input('gcore_edit_provider_id', type='hidden')}}
<tr>
<td class="padding20">
User name
{{lang.words.username|title()}}
<span class="need-field">*</span>
</td>
<td>{{input('gcore_edit_provider_user', required='required', size='30')}}</td>
</tr>
<tr>
<td class="padding20">
Password
{{lang.words.password|title()}}
<span class="need-field">*</span>
</td>
<td>{{input('gcore_edit_provider_password', required='required', type='password', size='30')}}</td>

View File

@ -0,0 +1,2 @@
{% import 'languages/'+lang|default('en')+'.html' as lang %}
success: {{service}} {{lang.phrases.been_installed}}

View File

@ -39,7 +39,7 @@
</td>
<td>
<select id="smon-telegram-{{s.0}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in telegrams %}
{% if s.6|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -51,7 +51,7 @@
</td>
<td>
<select id="smon-slack-{{s.0}}">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in slacks %}
{% if s.10|int() == t.id|int() %}
<option value="{{t.id}}" selected>{{t.chanel_name}}</option>
@ -78,10 +78,10 @@
{% endif %}
</td>
<td>
<a class="add" onclick="cloneSmom({{s.0}})" id="clone-{{s.0}}" title="Clone {{s.1}}" style="cursor: pointer; color: #000;"></a>
<a class="add" onclick="cloneSmom({{s.0}})" id="clone-{{s.0}}" title="{{lang.words.clone|title()}} {{s.1}}" style="cursor: pointer; color: #000;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteSmon({{s.0}})" title="Delete server {{s.1}}" style="cursor: pointer; color: #000;"></a>
<a class="delete" onclick="confirmDeleteSmon({{s.0}})" title="{{lang.words.delete|title()}} {{s.1}}" style="cursor: pointer; color: #000;"></a>
</td>
</tr>
<script>
@ -96,4 +96,4 @@
width: 78
});
});
</script>
</script>

View File

@ -1,7 +1,7 @@
<tr>
<td colspan="2">
<p class="validateTips alert alert-success">
Fields marked with "<span class="need-field">*</span>" are required.
{{lang.phrases.fields_mark}} "<span class="need-field">*</span>" {{lang.phrases.are_required}}.
</p>
</td>
</tr>
</tr>

View File

@ -0,0 +1,814 @@
{% set lang_short = 'en' %}
{% set menu_links = dict() %}
{% set menu_links = {
"overview": {
"link": "Overview",
"title": "Server and service status",
"h2": "Overview"
},
"hapservers": {
"link": "Overview",
"h2": "Service overview",
"haproxy": {
"title": "HAProxy servers overview"
},
"nginx": {
"title": "NGINX servers overview"
},
"apache": {
"title": "Apache servers overview"
},
"keepalived": {
"title": "Keepalived Keepalived overview"
},
},
"config": {
"link": "Config",
"h2": "Working with configs",
"haproxy": {
"title": "Working with Haproxy configs"
},
"nginx": {
"title": "Working with NGINX configs"
},
"apache": {
"title": "Working with Apache configs"
},
"keepalived": {
"title": "Working with Keepalived configs"
},
},
"stats": {
"link": "Stats",
"h2": "Statistics of",
"haproxy": {
"title": "HAProxy statistics"
},
"nginx": {
"title": "NGINX statistics"
},
"apache": {
"title": "Apache statistics"
},
},
"logs": {
"link": "Logs",
"title": "logs",
"h2": "Logs of"
},
"metrics": {
"link": "Metrics",
"title": "metrics",
"h2": "Metrics of",
},
"add_proxy": {
"link": "Add proxy",
"title": "Add proxy: Create proxy"
},
"versions": {
"link": "Versions",
"h2": "Working with Configuration Versions of",
"haproxy": {
"title": "Working with HAProxy Configuration Versions"
},
"nginx": {
"title": "Working with NGINX Configuration Versions"
},
"apache": {
"title": "Working with Apache Configuration Versions"
},
"keepalived": {
"title": "Working with Keepalived Configuration Versions"
},
},
"ssl": {
"link": "SSL",
"title": "Add proxy: Upload SSL certificates"
},
"lists": {
"link": "Lists",
"title": "Add proxy: Create and upload whitelists or blacklists"
},
"ha": {
"title": "Create and configure a high availability cluster"
},
"monitoring": {
"link": "Monitoring",
"title": "Monitoring tools",
"smon": {
"dashboard": "SMON: Dashboard",
"history": "SMON: History",
"admin": "SMON: Admin panel",
},
"checker_history": "Checker: History",
"port_scan": "Port scanner",
"net_tools": "Network: tools",
},
"servers": {
"link": "Servers",
"title": "Servers manage"
},
"admin_area": {
"link": "Admin area",
"title": "Admin area"
},
"history": {
"title": "History of"
}
}
%}
{% set services = dict() %}
{% set services = {
"hapservers_desc": "Checker monitors the service. If the service changes its status, Checker will alert via Telegram, Slack, Email, Web",
"last_edit": "Last edit"
}
%}
{% set errors = dict() %}
{% set errors = {
"cannot_get_info": "Cannot get information about",
"something_wrong": "Something went wrong with installation on",
"check_logs": "check logs",
"select_server": "Select a server first",
"empty_name": "The name cannot be empty",
}
%}
{% set settings = {
"rabbitmq": {
"rabbitmq_host": "RabbitMQ-server host",
"rabbitmq_port": "RabbitMQ-server port",
"rabbitmq_vhost": "RabbitMQ-server vhost",
"rabbitmq_queue": "RabbitMQ-server queue",
"rabbitmq_user": "RabbitMQ-server user",
"rabbitmq_password": "RabbitMQ-server password",
},
"nginx": {
"nginx_path_logs": "The path for NGINX logs",
"nginx_stats_user": "Username for accessing NGINX stats page",
"nginx_stats_password": "Password for Stats web page NGINX",
"nginx_stats_port": "Stats port for web page NGINX",
"nginx_stats_page": "URI Stats for web page NGINX",
"nginx_dir": "Path to the NGINX directory with config files",
"nginx_config_path": "Path to the main NGINX configuration file",
"nginx_container_name": "Docker container name for NGINX service",
},
"monitoring": {
"smon_check_interval": "Check interval for SMON (in minutes)",
"port_scan_interval": "Check interval for Checker (in minutes)",
"portscanner_keep_history_range": "Check interval for Port scanner (in minutes)",
"smon_keep_history_range": "Retention period for SMON history",
"checker_keep_history_range": "Retention period for Checker history",
"checker_maxconn_threshold": "Retention period for Port scanner history",
"checker_check_interval": "Threshold value for maxconn alerting, in %",
"smon_ssl_expire_warning_alert": "Warning alert about a SSL certificate expiration (in days)",
"smon_ssl_expire_critical_alert": "Critical alert about a SSL certificate expiration (in days)",
},
"main": {
"time_zone": "Time Zone",
"proxy": "IP address and port of the proxy server. Use proto://ip:port",
"session_ttl": "TTL for a user session (in days)",
"token_ttl": "TTL for a user token (in days)",
"tmp_config_path": "Path to the temporary directory. A valid path should be specified as the value of this parameter. The directory must be owned by the user specified in SSH settings",
"cert_path": "Path to SSL dir. Folder owner must be a user which set in the SSH settings. Path must exist",
"ssl_local_path": "Path to the directory with the saved local SSL certificates. The value of this parameter is specified as a relative path beginning with $HOME_ROXY_WI/app/",
"lists_path": "Path to the black and the white list. The value of this paramer should be specified as a relative path beginning with $HOME_ROXY-WI",
"maxmind_key": "License key for downloading to GeoLite2 DB. You can create it on maxmind.com",
},
"mail": {
"mail_ssl": "Enable TLS",
"mail_from": "Address of sender",
"mail_smtp_host": "SMTP server address",
"mail_smtp_port": "SMTP server port",
"mail_smtp_user": "User for auth",
"mail_smtp_password": "Password for auth",
},
"logs": {
"syslog_server_enable": "Enable getting logs from a syslog server",
"syslog_server": "IP address of the syslog_server",
"log_time_storage": "Retention period for user activity logs (in days)",
"apache_log_path": "Path to Apache logs",
},
"ldap": {
"ldap_enable": "Enable LDAP",
"ldap_server": "IP address of the LDAP server",
"ldap_port": "LDAP port (port 389 or 636 is used by default)",
"ldap_user": "LDAP username",
"ldap_password": "LDAP password",
"ldap_base": "Base domain. Example: dc=domain, dc=com",
"ldap_domain": "LDAP domain for logging in",
"ldap_class_search": "Class for searching the user",
"ldap_user_attribute": "Attribute to search users by",
"ldap_search_field": "User's email address",
"ldap_type": "Use LDAPS",
},
"haproxy": {
"haproxy_path_logs": "The path for HAProxy logs",
"stats_user": "Username for accessing HAProxy stats page",
"stats_password": "Password for Stats web page HAProxy",
"stats_port": "Stats port for web page HAProxy",
"stats_page": "URI Stats for web page HAProxy",
"haproxy_dir": "Path to the HAProxy directory with config files",
"haproxy_config_path": "Path to the main HAProxy configuration file",
"server_state_file": "Path to the HAProxy state file",
"haproxy_sock": "Path to the HAProxy socket file",
"haproxy_sock_port": "HAProxy sock port",
"haproxy_container_name": "Docker container name for HAProxy service",
},
"apache": {
"apache_path_logs": "The path for Apache logs",
"apache_stats_user": "Username for accessing Apache stats page",
"apache_stats_password": "Password for Stats web page Apache",
"apache_stats_port": "Stats port for web page Apache",
"apache_stats_page": "URI Stats for web page Apache",
"apache_dir": "Path to the Apache directory with config files",
"apache_config_path": "Path to the main Apache configuration file",
"apache_container_name": "Docker container name for Apache service",
},
"keepalived": {
"keepalived_config_path": "Path to the main Keepalived configuration file",
"keepalived_path_logs": "The path for Keepalived logs",
},
}
%}
{% set phrases = dict() %}
{% set phrases = {
"no_events_added": "No events added yet.",
"upload_and_restart": "Upload and restart",
"upload_and_reload": "Upload and reload",
"save_and_restart": "Save and restart",
"save_and_reload": "Save and reload",
"save_title": "Just save, without restarting service",
"return_to_config": "Return to configuration view",
"check_config": "Check config",
"master_slave": "If you reconfigure Master server, Slave will be reconfigured automatically",
"read_about_files": "You can read the description about all logs file",
"read_about_parameters": "You can read the description of all parameters",
"read_howto": "read HowTo in this",
"howto_user": "How to use",
"select_file": "Select a file",
"read_how_it_works": "You can read how it works",
"metrics_not_installed": "You have not installed Metrics service.",
"how_to_install_metrics": "how to install Metrics service",
"enable_avg_table": "Enable display of the table of averages",
"disable_avg_table": "Disable display of the table of averages",
"protected_title": "If protection is enabled, then the server is inaccessible for editing by everyone except the admin role",
"slave_for_title": "Actions with the master config will automatically apply on the slave",
"server_unknown": "Server status is unknown",
"no_sub": "You are not subscribed",
"pls_sub": "Please subscribe to have access to this feature",
"no_av_feat": "This feature is not available for your plan",
"fwd_warn": "There are rules only from INPUT, IN_public_allow and OUTPUT chains",
"search_in_ad": "Search user in AD",
"are_you_sure": "Are you sure?",
"delete_dialog": "Deletion is irretrievable, all data will be lost",
"fields_mark": "Fields marked with",
"are_required": "are required",
"scan_title": "Scan the server for HAProxy, NGINX, Keepalived and Firewalld services",
"superAdmin_pass": "You cannot edit password for superAdmin role",
"superAdmin_services": "You cannot edit services for superAdmin role",
"pass_mismatched": "The passwords are mismatched",
"private_key_note": "Private key. Note: The public key must be pre-installed on all servers to what you plan to connect",
"send_test_mes": "Send a test message",
"alert_service_change_status": "Alert about changing service status",
"alert_backend_change_status": "Alert about changing backend status",
"alert_number_conn": "Alert if the number of connections is about to reach the limit",
"alert_master_backup": "Alert about changing Master/Backup status",
"new_version": "There is a new version Roxy-WI. Check the",
"all_alerts_enabled": "Alerts are enabled",
"disable_alerts": "Disable alerting",
"work_with_prev": "Here you can work with previous versions of configs",
"roll_back": "Roll back to them, view or delete",
"files_been_deleted": "The following files have been deleted",
"version_has_been_uploaded": "The following version of the configuration file has been uploaded and saved as",
"new_config_has_been_saved": "A new config has been saved as",
"view_and_upload": "View and upload this version of the config",
"int_vrrp": "Interface for VRRP address on a server",
"howto_ha": "How to create high available cluster",
"been_installed": "has been installed",
"wait_mess": "Please do not close or refresh the page. Wait until the job is completed. This may take some time",
"you_are_editing": "You are editing",
"section_from_server": "section from server",
"how_to_install": "how to install",
"port_check": "port check",
"possible_service_name": "Possible service name",
}
%}
{% set roles = {
"superAdmin": "Has the highest level of administrative permissions and controls the actions of all other users",
"admin": "Has access everywhere except the Admin area",
"user": "Has the same rights as the admin but has no access to the Servers page",
"guest": "Read-only access"
}
%}
{% set add_page = {
"desc": {
"port_check": "A basic TCP-layer health check tries to connect to the server's TCP port. The check is valid when the server answers with a SYN/ACK packet.",
"maxconn": "The total number of connections allowed, process-wide. This stops the process from accepting too many connections at once, which safeguards it from running out of memory.",
"server_template": "Create the list of servers from the template",
"def_check": "Default params",
"saved_options": "These are the options that you saved in the 'Options' tab",
"press_down": "or press the 'down' button",
"ip_port": "If the IP-address for the listener is empty, it will listen on all IP addresses. Start typing IP or press down button. Click on + to add multiple IP-port pairs. If you are using VRRP, leave the IP field blank. If you assign a VRRP IP, the slave server will not start.",
"listener_desc1": "A 'listen' section defines a complete proxy with its frontend and backend parts combined in one section. It is generally useful for TCP-only traffic.",
"listener_desc2": "All proxy names must be formed from upper and lower case letters, digits, '-' (dash), '_' (underscore) , '.' (dot) and ':' (colon). ACL names are case-sensitive, which means that 'www' and 'WWW' are two different proxies.",
"listener_desc3": "Historically, all proxy names could overlap, it just caused troubles in the logs. Since the introduction of content switching, it is mandatory that two proxies with overlapping capabilities (frontend/backend) have different names. However, it is still permitted that a frontend and a backend share the same name, as this configuration seems to be commonly encountered.",
"front_desc1": "A 'frontend' section describes a set of listening sockets accepting client connections.",
"back_des1": "A 'backend' section describes a set of servers to which the proxy will connect to forward incoming connections.",
"ssl_offloading": "The term SSL termination means that you are performing all encryption and decryption at the edge of your network, such as at the load balancer.",
"http_https": "Enable redirection from HTTP scheme to HTTPS scheme",
"maxconn_desc": "This value should not exceed the global maxconn. Default global maxconn value",
"maxconn_fix": "Fix the maximum number of concurrent connections on a frontend",
"antibot": "Unfortunately, a large portion of bots are used for malicious reasons. Their intentions include web scraping, spamming, request flooding, brute forcing, and vulnerability scanning. For example, bots may scrape your price lists so that competitors can consistently undercut you or build a competitive solution using your data. Or they may try to locate forums and comment sections where they can post spam. At other times, theyre scanning your site looking for security weaknesses",
"slow_attack": "In a Slow POST attack, an attacker begins by sending a legitimate HTTP POST header to a Web server, exactly as they would under normal circumstances. The header specifies the exact size of the message body that will then follow. However, that message body is then sent at an alarmingly low rate sometimes as slow as 1 byte per approximately two minutes",
"http_compression": "HTTP compression allows you to shrink the body of a response before it is relayed to a client, which results in using less network bandwidth per request. From a client\'s perspective, this reduces latency.",
"forward_for": "When HAProxy Enterprise proxies a TCP connection, it overwrites the client\'s source IP address with its own when communicating with the backend server. However, when relaying HTTP messages, it can store the client\'s address in the HTTP header X-Forwarded-For. The backend server can then be configured to read the value from that header to retrieve the client\'s IP address.",
"redispatch": "In HTTP mode, if a server designated by a cookie is down, clients may definitely stick to it because they cannot flush the cookie, so they will not be able to access the service anymore. Specifying 'option redispatch' will allow the proxy to break their persistence and redistribute them to a working server. It also allows to retry connections to another server in case of multiple connection failures. Of course, it requires having 'retries' set to a nonzero value.",
"force_close": "Since HAProxy works in reverse-proxy mode, the servers see its IP address as their client address. This is sometimes annoying when the client\'s IP address is expected in server logs. To solve this problem, the well-known HTTP header 'X-Forwarded-For' may be added by HAProxy to all requests sent to the server. This header contains a value representing the client\'s IP address. Since this header is always appended at the end of the existing header list, the server must be configured to always use the last occurrence of this header only. See the server\'s manual to find how to enable use of this standard header. Note that only the last occurrence of the header must be used, since it is really possible that the client has already brought one.",
"cookie": "To send a client to the same server where they were sent previously in order to reuse a session on that server, you can enable cookie-based session persistence. Add a cookie directive to the backend section and set the cookie parameter to a unique value on each server line.",
"c_prefix": "This keyword indicates that instead of relying on a dedicated cookie for the persistence, an existing one will be completed",
"c_nocache": "This option is recommended in conjunction with the insert mode when there is a cache between the client and HAProxy",
"c_nocache": "This option is recommended in conjunction with the insert mode when there is a cache between the client and HAProxy",
"c_postonly": "This option ensures that cookie insertion will only be performed on responses to POST requests",
"c_dynamic": "Activate dynamic cookies. When used, a session cookie is dynamically created for each server",
"def_backend": "If you want to use the default backend",
"def_backend_exit": "backend must exist",
"port_for_bind": "Port for bind",
"bind_ip_pair": "Bind one more IP-port pair",
"no_def_backend": "If no condition is valid, the backend defined with 'default_backend' will be used. If no default backend is defined, either the servers in the same section are used (in case of a 'listen' section) or, in case of a frontend, no server is used and a 503 service unavailable response is returned",
"circuit_breaking": "Circuit breaker is a design pattern which is used to detect failures and encapsulates the logic of preventing a failure from constantly recurring. The circuit breaker design pattern works much like an electrical circuit breaker which is intended to 'trip' or open the circuit when failure is detected.",
"peers_master": "Note: If you would like to use HAProxy services as Master-Master cluster you must set local servers hostnames as peers servers names. Otherwise, peers will not work",
"peers_slave": "Note: If you would like to use HAProxy services as Master-Slave cluster you must set local server hostname for master server as peer server name. Otherwise, peers will not work",
"peers": "The peers section enables the replication of stick table data between two or more HAProxy instances",
"userlist": "In this section you can create userlists. And after use them in the 'Add' sections",
"userlist_name": "Userlist name",
"userlist_pass": "User password. By default, it insecure-password",
"userlist_user_grp": "User`s group",
"userlist_user": "It is also possible to attach groups to this user by using a comma separated list of groups",
"userlist_group": "It is also possible to attach users to this group by using a comma separated list of names preceded by 'users' keyword",
"userlist_desc": "It is possible to control access to frontend/backend/listen sections or to http stats by allowing only authenticated and authorized users. To do this, it is required to create at least one userlist and to define users",
"servers": "In this section you can create, edit and delete servers. And after use them as autocomplete in the 'Add' sections",
"servers": "In this section you can create, edit and delete options. And after use them as autocomplete in the 'Add' sections",
"paste_cert": "Paste the contents of the certificate file",
"paste_cert_desc": "This pem file will be used to create https connection with HAProxy, NGINX or Apache",
"lists_howto": "In this section you can create and edit black and white lists. And after use them in the HAProxy configs or in the 'Add proxy' pages. Read how to use it in this",
"lists_new_line": "Each new address must be specified from a new line",
"was_success_added": "was success added",
"create_ssl_proxy": "Create HTTPS Proxy with the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTP traffic. You need have",
"create_ssl_front": "Create HTTPS Frontend with the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTP traffic. You need have",
"create_ssl_backend": "Create HTTPS Backend with the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTP traffic. You need have",
"create_https_proxy": "Create HTTPS Proxy without the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTPS traffic",
"create_https_front": "Create HTTPS Frontend without the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTPS traffic",
"create_https_backend": "Create HTTPS Backend without the SSL termination on HAProxy and SSL offload. HAProxy will send to backends HTTPS traffic",
"option_temp": "Create, edit and delete options with given parameters. And after use them as autocomplete in the 'Add' sections",
"server_temp": "Create, edit and delete servers. And after use them as autocomplete in the 'Add' sections",
"use_add": "And use it in the 'Add' sections",
},
"buttons": {
"disable_ssl_check": "Disable SSL check",
"disable_ssl_verify": "Disable SSL verify on servers",
"set_options": "Set options",
"set_options_m": "Set options manually",
"show_full_settings": "Show full list of settings",
"show_full_settings": "Hide full list of settings",
}
}
%}
{% set add_nginx_page = {
"desc": {
"upstream_desc1": "The upstream module is used to define groups of servers.",
"upstream_desc2": "Defines a group of servers. Servers can listen on different ports. In addition, servers listening on TCP and UNIX-domain sockets can be mixed.",
"upstream_desc3": "By default, requests are distributed between the servers using a weighted round-robin balancing method.",
"keepalive": "The connections parameter sets the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed.",
"fail_timeout": "The time during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable; and the period of time the server will be considered unavailable.",
"max_fails": "Sets the number of unsuccessful attempts to communicate with the server that should happen in the duration set by the fail_timeout parameter to consider the server unavailable for a duration also set by the fail_timeout parameter. By default, the number of unsuccessful attempts is set to 1.",
}
}
%}
{% set admin_page = {
"desc": {
"latest_repo": "Roxy-WI will try to install the latest version of the service from the official repository",
"install_as_docker": "Install service as a Docker container",
"ext_prom": "This exporter will be used by an external Prometheus. Also use this checkbox if you update the Exporter.",
"no_ansible": "You have not installed",
"before_install": "Before installing any exporters, first install",
"been_installed": "servers have been installed",
"there_are_no": "There are no Grafana and Prometheus servers",
"country_codes": "country codes",
"smon_desc": "SMON stands for <b>S</b>imple <b>MON</b>itoring",
"checker_desc": "Checker is designed for monitoring HAProxy, Nginx, Apache and Keepalived services as well as HAProxy backends and maxconn",
"auto_start_desc": "The Auto Start service allows to restart the HAProxy, NGINX, Apache and Keepalived services if they are down",
"metrics_desc": "Collects number of connections for HAProxy, NGINX, Apache and HAProxy WAF services",
"p_s_desc": "Checks the server for open ports and saves history",
"socket_desc": "Socket is a service for sending alerts and notifications",
"a_new_version": "There is a newer version",
"no_new_version": "There is not a newer version",
"main_app": "The main application",
"for_updating": "For updating you have to use Roxy-WI RPM or DEB",
"how_to_using_repo": "how to start using repository.",
"proxy_settings": "If the Roxy-WI server uses a proxy to connect to the Internet, add the proxy settings to yum.conf.",
}
}
%}
{% set smon_page = {
"desc": {
"before_use": "before use",
"smon_is_not_run": "SMON service is not run.",
"run_smon": "Run the SMON service",
"not_installed": "You have not installed SMON service",
"not_added": "You do not have added servers in SMON service",
"create_server": "Create your first server",
"see_check": "to see if new check have been added",
"do_not_sort": "Do not sort",
"do_not_sort_by_status": "Do not sort by status",
"sort_status": "Sort by status",
"status_summary": "Status summary",
"enabled_checks": "Enabled checks",
"http_status_check": "HTTP status check",
"body_status_check": "Body response check",
"resp_time": "Resp time",
"last_resp_time": "Last resp time",
"UP": "UP",
"DOWN": "DOWN",
"HTTP_FAILURE": "HTTP FAILURE",
"BODY_FAILURE": "BODY FAILURE",
"UNKNOWN": "UNKNOWN",
"PORT_DOWN": "PORT DOWN",
}
}
%}
{% set p_s_page = {
"desc": {
"is_enabled_and_up": "Port scanner is enabled and service is UP",
"is_enabled_and_down": "Port scanner is enabled, but service is DOWN",
"scanning_ports": "Scanning open/filtered ports for the server",
"total_open_ports": "Total opened ports",
}
}
%}
{% set words = {
"cache": "cache",
"compression": "compression",
"acceleration": "acceleration",
"start": "start",
"start2": "start",
"stop": "stop",
"restart": "restart",
"service": "service",
"service2": "service",
"services": "services",
"services2": "services",
"services3": "services",
"services4": "services",
"started": "started",
"reload": "reload",
"reloading": "reloading",
"stopped": "stopped",
"no_desc": "no description",
"process_num": "process_num",
"version": "version",
"version2": "version",
"versions": "versions",
"error": "error",
"addresses": "addresses",
"address": "address",
"virtual": "virtual",
"hosts": "hosts",
"time_range": "Time range",
"server": "server",
"server2": "server",
"status": "status",
"current": "current",
"current2": "current",
"total": "total",
"server_status": "Server status",
"services_status": "Services status",
"compare": "compare",
"map": "map",
"about": "about",
"help": "help",
"contacts": "contacts",
"cabinet": "cabinet",
"legal": "legal",
"alert": "alert",
"alert2": "alert",
"alerts": "alerts",
"manage": "manage",
"user": "user",
"user2": "user",
"users": "users",
"users2": "users",
"username": "username",
"servers": "servers",
"servers2": "servers",
"creds": "credentials",
"creds2": "credentials",
"settings": "settings",
"settings2": "settings",
"installat": "installat",
"installation": "installation",
"installing": "installing",
"proxy": "proxy",
"provisioning": "provisioning",
"backup": "backup",
"backup2": "backup",
"configs": "configs",
"configs2": "configs",
"config": "config",
"from": "from",
"view": "view",
"internal": "internal",
"internal2": "internal",
"log": "log",
"logs": "logs",
"logs2": "logs",
"admin_area": "admin area",
"group": "group",
"group2": "group",
"groups": "groups",
"groups2": "groups",
"groups3": "groups",
"w_update": "update",
"updating": "updating",
"monitoring": "monitoring",
"auto": "auto",
"refresh": "refresh",
"refresh2": "refresh",
"no": "no",
"not": "not",
"yes": "yes",
"interval": "interval",
"desc": "description",
"login": "login",
"role": "role",
"subs": "subscription",
"show_all": "show all",
"plan": "plan",
"pay_method": "pay method",
"active": "active",
"open": "open",
"opened": "opened",
"edit": "edit",
"delete": "delete",
"add": "add",
"save": "save",
"saved": "saved",
"saving": "saving",
"expand_all": "expand all",
"collapse_all": "collapse all",
"raw": "raw",
"stats": "stats",
"note": "note",
"back": "back",
"show": "show",
"run": "run",
"running": "running",
"statistics": "statistics",
"rollback": "rollback",
"previous": "previous",
"to": "to",
"listener": "listener",
"frontends": "frontends",
"frontend": "frontend",
"backends": "backends",
"backend": "backend",
"maintain": "maintain",
"drain": "drain",
"number": "number",
"rows": "rows",
"row": "row",
"find": "find",
"exclude": "exclude",
"file": "file",
"file2": "file",
"files": "files",
"here": "here",
"action": "action",
"actions": "actions",
"command": "command",
"save": "save",
"change": "change",
"change2": "change",
"enter": "enter",
"enter2": "enter",
"lists": "lists",
"list": "list",
"sessions": "sessions",
"session": "session",
"and": "and",
"select": "select",
"select2": "select",
"new": "new",
"new2": "new",
"port": "port",
"ports": "ports",
"table": "table",
"w_get": "get",
"dynamically": "dynamically",
"set": "set",
"type": "type",
"typing": "typing",
"site": "size",
"is": "is",
"w_empty": "empty",
"used": "used",
"w_clear": "clear",
"this": "this",
"this2": "this",
"this3": "this",
"this4": "this",
"entry": "entry",
"age": "age",
"protocol": "protocol",
"rate": "rate",
"expire": "expire",
"more": "more",
"info": "info",
"source": "source",
"overview": "overview",
"personal": "personal",
"read": "read",
"second": "second",
"seconds": "seconds",
"seconds2": "seconds",
"minute": "minute",
"minute2": "minute",
"minutes": "minutes",
"hour": "hour",
"hours": "hours",
"hours2": "hours",
"day": "day",
"days": "days",
"metrics": "metrics",
"every": "every",
"every2": "every",
"every3": "every",
"hide": "hide",
"average": "Average",
"peak": "peak",
"connect": "connect",
"connections": "connections",
"connections2": "connections",
"enable": "enable",
"enabled": "enabled",
"virt": "virt",
"virtual": "virtual",
"check": "check",
"checking": "checking",
"protected": "protected",
"slave_for": "Slave for",
"name": "name",
"article": "article",
"w_copy": "copy",
"for": "for",
"history": "history",
"history2": "history",
"history3": "history",
"rule": "rule",
"rules": "rules",
"rules2": "rules",
"on": "on",
"dest": "destination",
"target": "target",
"w_input": "input",
"output": "output",
"password": "password",
"email": "email",
"w_a": "a",
"w_an": "an",
"key": "key",
"token": "token",
"channel": "channel",
"channels": "channels",
"job": "job",
"cancel": "cancel",
"repository": "repository",
"init": "init",
"period": "period",
"the": "the",
"scan": "scan",
"is_there": "Is there",
"confirm": "confirm",
"confirmation": "confirmation",
"one": "one",
"one2": "one",
"or": "or",
"upload": "upload",
"uploading": "uploading",
"uploaded": "uploaded",
"test": "test",
"test2": "test",
"disabled": "disabled",
"via": "via",
"web_panel": "web panel",
"message": "message",
"menu": "menu",
"language": "language",
"apply": "apply",
"logout": "logout",
"last": "last",
"last2": "last",
"activity": "activity",
"never": "never",
"is_online": "is online",
"is_offline": "is offline",
"valid": "valid",
"remote": "remote",
"remote2": "remote",
"local": "local",
"path": "path",
"create": "create",
"created": "created",
"creating": "creating",
"diff": "diff",
"diff2": "diff",
"diff3": "diff",
"master": "master",
"slave": "slave",
"interface": "interface",
"as": "as",
"stay": "stay",
"protection": "protection",
"return": "return",
"cluster": "cluster",
"existing": "exitsting",
"success": "success",
"option": "option",
"option2": "option",
"options": "options",
"template": "template",
"templates": "templates",
"userlists": "userlists",
"whitelist": "whitelist",
"whitelists": "whitelists",
"blacklist": "blacklist",
"blacklists": "blacklists",
"mode": "mode",
"balance": "balance",
"health": "health",
"cert": "certificate",
"cert_name": "certificate name",
"certs": "certificates",
"certs2": "certificates",
"advanced": "advanced",
"generate": "generate",
"generated": "generated",
"server_template": "Server-template",
"custom": "custom",
"param": "param",
"param2": "param",
"params": "params",
"of": "of",
"display": "display",
"default_backend": "Default backend",
"rule": "rule",
"existing": "existing",
"domain": "domain",
"all": "all",
"just": "just",
"without": "without",
"work": "work",
"working": "working",
"section": "section",
"section2": "section",
"use": "use",
"available": "available",
"external": "external",
"in": "in",
"folder": "folder",
"folder2": "folder",
"clone": "clone",
"date": "date",
"time": "time",
"page": "page",
"pages": "pages",
"body": "body",
"level": "level",
"host": "host",
"uptime": "Uptime",
"downtime": "Downtime",
"record_type": "Record type",
"upstream": "upstream",
"haproxy": "HAProxy",
"nginx": "NGINX",
"apache": "Apache",
"keepalived": "Keepalived",
"scan": "scan",
"notify": "notify",
"notification": "notification",
"keeping": "keeping",
"keep": "keep",
"close": "close",
"state": "state",
"latest": "latest",
"cloud": "cloud",
"provider": "provider",
"region": "region",
"OS": "OS",
"created_at": "Created at",
"edited_at": "Edited at",
"instance_type": "Instance type",
"filter": "filter",
"rule_name": "Rule name",
"rule": "rule",
"rules": "rules",
}
%}

View File

@ -0,0 +1,821 @@
{% set lang_short = 'ru' %}
{% set menu_links = dict() %}
{% set menu_links = {
"overview": {
"link": "Обзор",
"title": "Статус серверов и сервисов",
"h2": "Обзор"
},
"hapservers": {
"link": "Обзор",
"h2": "Обзор сервисов",
"haproxy": {
"title": "Обзор HAProxy серверов"
},
"nginx": {
"title": "Обзор NGINX серверов"
},
"apache": {
"title": "Обзор Apache серверов"
},
"keepalived": {
"title": "Обзор Keepalived серверов"
},
},
"config": {
"link": "Конфиг",
"h2": "Работа с конфигурацией",
"haproxy": {
"title": "Работа с конфигурацией HAProxy"
},
"nginx": {
"title": "Работа с конфигурацией NGINX"
},
"apache": {
"title": "Работа с конфигурацией Apache"
},
"keepalived": {
"title": "Работа с конфигурацией Keepalived"
},
},
"stats": {
"link": "Статистика",
"h2": "Статистика",
"haproxy": {
"title": "Статистика HAProxy"
},
"nginx": {
"title": "Статистика NGINX"
},
"apache": {
"title": "Статистика Apache"
},
},
"logs": {
"link": "Лог",
"title": "логи",
"h2": "Логи",
},
"metrics": {
"link": "Метрики",
"title": "метрики",
"h2": "Mетрики"
},
"add_proxy": {
"link": "Добавить прокси",
"title": "Добавить прокси: Создать прокси"
},
"ssl": {
"link": "SSL",
"title": "Добавить прокси: Загрузить SSL сертификат"
},
"lists": {
"link": "Листы",
"title": "Добавить прокси: Создать и загрузить whitelists или blacklists"
},
"versions": {
"link": "Версии",
"h2": "Работа с версиями конфигурации",
"haproxy": {
"title": "Работа с версиями конфигурации HAProxy"
},
"nginx": {
"title": "Работа с версиями конфигурации NGINX"
},
"apache": {
"title": "Работа с версиями конфигурации Apache"
},
"keepalived": {
"title": "Работа с версиями конфигурации Keepalived"
},
},
"ha": {
"title": "Создание и настройка кластера высокой доступности"
},
"monitoring": {
"link": "Мониторинг",
"title": "Инструменты для мониторинга",
"smon": {
"dashboard": "SMON: Дашборд",
"history": "SMON: История",
"admin": "SMON: Админка",
},
"checker_history": "Checker: История",
"port_scan": "Сканер портов",
"net_tools": "Сетевые инструменты",
},
"servers": {
"link": "Сервера",
"title": "Управление серверами"
},
"admin_area": {
"link": "Админка",
"title": "Место для админа"
},
"history": {
"title": "История"
}
}
%}
{% set services = dict() %}
{% set services = {
"hapservers_desc": "Checker следит за сервисом. Если сервис изменит свой статус, Checker оповестит через Telegram, Slack, Email, Web",
"last_edit": "Посл. редак."
}
%}
{% set errors = dict() %}
{% set errors = {
"cannot_get_info": "Не возможно получить информацию о",
"something_wrong": "Что-то пошло не так",
"check_logs": "проверти логи",
"select_server": "Выберете в начале сервер",
"empty_name": "Имя не может быть пустым",
}
%}
{% set settings = {
"rabbitmq": {
"rabbitmq_host": "RabbitMQ-server сервер",
"rabbitmq_port": "RabbitMQ-server порт",
"rabbitmq_vhost": "RabbitMQ-server vhost",
"rabbitmq_queue": "RabbitMQ-server очередь",
"rabbitmq_user": "RabbitMQ-server пользователь",
"rabbitmq_password": "RabbitMQ-server пароль",
},
"nginx": {
"nginx_path_logs": "Путь до лог файлов NGINX",
"nginx_stats_user": "Пользователь для входа на страницу статистики NGINX",
"nginx_stats_password": "Пароль для входа на страницу статистики NGINX",
"nginx_stats_port": "Порт для доступа на страницу статистики NGINX",
"nginx_stats_page": "URI для доступа на страницу статистики NGINX",
"nginx_dir": "Путь до папки конфигурации NGINX",
"nginx_config_path": "Путь для основного файла конфигурации NGINX",
"nginx_container_name": "Имя Docker контейнера для сервиса NGINX",
},
"monitoring": {
"smon_check_interval": "Интервал проверки для SMON (в минутах)",
"port_scan_interval": "Интервал проверки для Checker (в минутах)",
"portscanner_keep_history_range": "Интервал проверки для Port scanner (в минутах)",
"smon_keep_history_range": "Время хранения истории SMON",
"checker_keep_history_range": "Время хранения истории Checker",
"checker_maxconn_threshold": "Время хранения истории Port scanner",
"checker_check_interval": "Порог срабатывания уведомления по maxconn, в %",
"smon_ssl_expire_warning_alert": "Предупреждение о истечении SSL сертификата (в днях)",
"smon_ssl_expire_critical_alert": "Критическое предупреждение о истечении SSL сертификата (в днях)",
},
"main": {
"time_zone": "Временная зона",
"proxy": "IP адрес и порт прокси сервера. Формат: proto://ip:port",
"session_ttl": "Время жизни пользовательских сессий (в днях)",
"token_ttl": "Время жизни пользовательских токенов (в днях)",
"tmp_config_path": "Путь до временной директории. Путь должен существовать. Директория должна принадлежать пользователю от имени которого подключается SSH",
"cert_path": "Путь до SSL директории. Путь должен существовать. Директория должна принадлежать пользователю от имени которого подключается SSH",
"ssl_local_path": "Локальный путь для хранения SSL сертификатов. Данный путь относительный от $HOME_ROXY_WI/app/",
"lists_path": "Локальный путь для хранения black и white листов. Данный путь относительный от $HOME_ROXY-WI",
"maxmind_key": "Лицензионный ключ для загрузки GeoLite2 DB. Создается на сайте maxmind.com",
},
"mail": {
"mail_ssl": "Включить TLS",
"mail_from": "Адрес отправителя",
"mail_smtp_host": "Адрес SMTP сервера",
"mail_smtp_port": "Порт SMTP сервера",
"mail_smtp_user": "Имя пользователя",
"mail_smtp_password": "Пароль",
},
"logs": {
"syslog_server_enable": "Включение получение логов из syslog сервера",
"syslog_server": "IP адрес syslog сервера",
"log_time_storage": "Время хранение лог файлов пользовательской активности (в днях)",
"apache_log_path": "Путь до лог файлов Apache сервера",
},
"ldap": {
"ldap_enable": "LDAP включен",
"ldap_server": "IP адрес LDAP сервера",
"ldap_port": "LDAP порт (порт 389 или 636 используются по умолчанию)",
"ldap_user": "LDAP имя пользователя",
"ldap_password": "LDAP пароль",
"ldap_base": "Базовый домен. Пример: dc=domain, dc=com",
"ldap_domain": "LDAP домен для входа",
"ldap_class_search": "Класс для поиска пользователя",
"ldap_user_attribute": "Атрибут для поиска пользователей",
"ldap_search_field": "Почта пользователя",
"ldap_type": "Использовать LDAPS",
},
"haproxy": {
"haproxy_path_logs": "Путь до лог файлов HAProxy",
"stats_user": "Пользователь для входа на страницу статистики HAProxy",
"stats_password": "Пароль для входа на страницу статистики HAProxy",
"stats_port": "Порт для доступа на страницу статистики HAProxy",
"stats_page": "URI для доступа на страницу статистики HAProxy",
"haproxy_dir": "Путь до папки конфигурации HAProxy",
"haproxy_config_path": "Путь для основного файла конфигурации HAProxy",
"server_state_file": "Путь до стейт файла HAProxy",
"haproxy_sock": "Путь до сокет файла HAProxy",
"haproxy_sock_port": "Сокет порт HAProxy",
"haproxy_container_name": "Имя Docker контейнера для сервиса HAProxy",
},
"apache": {
"apache_path_logs": "Путь до лог файлов Apache",
"apache_stats_user": "Пользователь для входа на страницу статистики Apache",
"apache_stats_password": "Пароль для входа на страницу статистики Apache",
"apache_stats_port": "Порт для доступа на страницу статистики Apache",
"apache_stats_page": "URI для доступа на страницу статистики Apache",
"apache_dir": "Путь до папки конфигурации Apache",
"apache_config_path": "Путь для основного файла конфигурации Apache",
"apache_container_name": "Имя Docker контейнера для сервиса Apache",
},
"keepalived": {
"keepalived_config_path": "Путь для основного файла конфигурации Keepalived",
"keepalived_path_logs": "Путь до лог файлов Keepalived",
},
}
%}
{% set phrases = dict() %}
{% set phrases = {
"no_events_added": "События еще не добавлены.",
"upload_and_restart": "Загрузить и перезагрузить",
"upload_and_reload": "Загрузить и перезапустить",
"save_and_restart": "Сохранить и перезагрузить",
"save_and_reload": "Сохранить и перезапустить",
"save_title": "Только сохранить, без перезагрузки сервиса",
"return_to_config": "Вернуться к просмотру конфигурации",
"check_config": "Проверить конфиг",
"master_slave": "При изменении Master сервера, Slave будет изменен автоматически",
"read_about_files": "Читайте описание лог файлов",
"read_about_parameters": "Читать обо всех параметрах",
"read_howto": "Читайте HowTo в этой",
"howto_user": "Как использовать",
"select_file": "Выберете файл",
"read_how_it_works": "Как это работает можно прочитать",
"metrics_not_installed": "У вас не установлен сервис Metrics",
"how_to_install_metrics": "как установить сервис Metrics",
"checker_not_installed": "У вас не установлен сервис Checker",
"how_to_install_checker": "как установить сервис Checker",
"enable_avg_table": "Включить отображение таблицы средних значений",
"disable_avg_table": "Выключить отображение таблицы средних значений",
"protected_title": "Защищенный сервер может редактировать только пользователь с ролью admin",
"slave_for_title": "Действия над мастер сервером будут автоматически применяться к подчиненному",
"server_unknown": "Статус сервера неизвестен",
"no_sub": "Вы не подписаны",
"pls_sub": "Пожалуйста, подпишитесь, чтобы иметь доступ к этой функции",
"no_av_feat": "Эта функция не доступна в ваше плане подписке",
"fwd_warn": "Показаны правила только для цепочек: Входящие, IN_public_allow и Исходящие",
"search_in_ad": "Поиск в AD",
"are_you_sure": "Вы уверены?",
"delete_dialog": "Удаление безвозвратно, все данные будут потеряны",
"fields_mark": "Поля, отмеченные",
"are_required": "обязательны",
"scan_title": "Сканировать сервер на наличие служб HAProxy, NGINX, Keepalived и Firewalld",
"superAdmin_pass": "Нельзя менять пароль для роли superAdmin",
"superAdmin_services": "Нельзя редактировать сервисы для роли superAdmin",
"pass_mismatched": "Пароли не совпадают",
"private_key_note": "Закрытый ключ. Примечание: Открытый ключ должен быть предварительно установлен на всех серверах, к которым вы планируете подключаться.",
"send_test_mes": "Отправить тестовое сообщение",
"alert_service_change_status": "Уведомлять о смене статуса сервиса",
"alert_backend_change_status": "Уведомлять о смене статуса бэкенда",
"alert_number_conn": "Уведомлять если количество соединений приближается к лимиту",
"alert_master_backup": "Уведомлять о смене статуса Master/Backup",
"new_version": "Доступна новая версия Roxy-WI. Проверьте",
"all_alerts_enabled": "Уведомления включены",
"disable_alerts": "Выключить уведомления",
"work_with_prev": "Здесь вы можете работать с предыдущими версиями конфигов",
"roll_back": "Откатиться к ним, просмотреть или удалить",
"files_been_deleted": "Следующие файлы были удалены",
"version_has_been_uploaded": "Данная версия была загружена и сохранена как",
"new_config_has_been_saved": "A new config has been saved as",
"view_and_upload": "Просмотр и загрузка этой версии конфига",
"int_vrrp": "Интерфейс для VRRP на сервере",
"howto_ha": "Как создать кластер высокой доступности",
"been_installed": "был установлен",
"wait_mess": "Пожалуйста не закрывайте и не обновляйте страницу пока работа не завершена. Это может занять некоторое время",
"you_are_editing": "Вы редактируете",
"section_from_server": "секцию с сервера",
"how_to_install": "как установить",
"port_check": "проверка порта",
"possible_service_name": "Возможное название службы",
}
%}
{% set roles = {
"superAdmin": "Самый высокий уровень административных разрешений и контролирует действия всех других пользователей",
"admin": "Доступ везде, кроме админки",
"user": "Те же права, что и администратор, но не имеет доступа к странице серверов",
"guest": "Доступ только для чтения"
}
%}
{% set add_page = {
"desc": {
"port_check": "Базовая проверка работоспособности на уровне TCP пытается подключиться к TCP-порту сервера. Проверка действительна, когда сервер отвечает пакетом SYN/ACK.",
"maxconn": "Общее количество разрешенных подключений для всего процесса. Это не позволяет процессу одновременно принимать слишком много подключений, что защищает его от нехватки памяти.",
"server_template": "Создать список серверов из шаблона",
"def_check": "Параметры по умолчанию",
"saved_options": "Это параметры, которые вы сохранили на вкладке «Параметры»",
"press_down": "или нажмите «вниз»",
"ip_port": "Если IP-адрес для бинда пуст, он будет прослушивать все IP-адреса. Начните вводить IP или нажмите кнопку вниз. Нажмите +, чтобы добавить несколько пар IP-портов. Если вы используете VRRP, оставьте поле IP пустым. Если вы назначите IP-адрес VRRP, подчиненный сервер не запустится.",
"listener_desc1": "Раздел «Листенер» определяет полный прокси-сервер с его внешними и внутренними частями, объединенными в один раздел. Обычно это полезно для TCP-трафика.",
"listener_desc2": "Все имена прокси должны состоять из букв верхнего и нижнего регистра, цифр, '-' (тире), '_' (подчеркивание), '.' (точка) и ':' (двоеточие). Имена ACL чувствительны к регистру, что означает, что «www» и «WWW» — это два разных прокси.",
"listener_desc3": "Исторически сложилось так, что все имена прокси могли перекрываться, просто это вызывало проблемы в логах. С момента введения переключения контента обязательно, чтобы два прокси с перекрывающимися возможностями (интерфейсный/бэкэнд) имели разные имена. Однако по-прежнему разрешено, чтобы внешний и внутренний интерфейсы имели одно и то же имя, поскольку такая конфигурация встречается часто.",
"front_desc1": "Раздел «Фронтенд» описывает набор прослушивающих сокетов, принимающих клиентские подключения.",
"back_des1": "Раздел «Бэкэнд» описывает набор серверов, к которым прокси-сервер будет подключаться для переадресации входящих соединений.",
"ssl_offloading": "Термин «SSL termination» означает, что вы выполняете все операции шифрования и дешифрования на границе вашей сети, например, на балансировщике нагрузки.",
"http_https": "Включить перенаправление со схемы HTTP на схему HTTPS",
"maxconn_fix": "Зафиксировать максимальное количество одновременных подключений на внешнем интерфейсе",
"maxconn_desc": "Это значение не должно превышать глобальное значение maxconn. Глобальное значение maxconn по умолчанию",
"antibot": "К сожалению, большая часть ботов используется в злонамеренных целях. Их намерения включают веб-скрапинг, рассылку спама, флуд запросов, перебор и сканирование уязвимостей. Например, боты могут очищать ваши прайс-листы, чтобы конкуренты могли последовательно подрезать вас или создавать конкурентоспособное решение, используя ваши данные. Или они могут попытаться найти форумы и разделы комментариев, где они могут размещать спам. В других случаях они сканируют ваш сайт в поисках слабых мест в системе безопасности",
"slow_attack": "В атаке Slow POST злоумышленник начинает с отправки законного HTTP-заголовка POST на веб-сервер точно так же, как в обычных обстоятельствах. Заголовок указывает точный размер тела сообщения, которое затем следует. Однако затем это тело сообщения отправляется с угрожающе низкой скоростью — иногда до 1 байта примерно за две минуты",
"http_compression": "Сжатие HTTP позволяет сжимать текст ответа до того, как он будет передан клиенту, что приводит к использованию меньшей пропускной способности сети для каждого запроса. С точки зрения клиента это уменьшает задержку.",
"forward_for": "Когда HAProxy Enterprise проксирует TCP-соединение, он перезаписывает исходный IP-адрес клиента своим собственным при общении с внутренним сервером. Однако при ретрансляции сообщений HTTP он может хранить адрес клиента в заголовке HTTP X-Forwarded-For. Затем внутренний сервер может быть настроен для чтения значения из этого заголовка для получения IP-адреса клиента.",
"redispatch": "В режиме HTTP, если сервер, указанный в файле cookie, не работает, клиенты определенно могут придерживаться его, потому что они не могут сбросить файл cookie, поэтому они больше не смогут получить доступ к службе. Указание «option redispatch» позволит прокси-серверу нарушить их постоянство и перераспределить их на работающий сервер. Это также позволяет повторить попытку подключения к другому серверу в случае нескольких сбоев подключения. Конечно, это требует, чтобы «повторные попытки» были установлены на ненулевое значение.",
"force_close": "Поскольку HAProxy работает в режиме обратного прокси, серверы видят его IP-адрес как адрес своего клиента. Это иногда раздражает, когда IP-адрес клиента ожидается в журналах сервера. Чтобы решить эту проблему, HAProxy может добавить известный HTTP-заголовок «X-Forwarded-For» ко всем запросам, отправляемым на сервер. Этот заголовок содержит значение, представляющее IP-адрес клиента. Поскольку этот заголовок всегда добавляется в конец существующего списка заголовков, сервер должен быть настроен так, чтобы всегда использовать только последнее вхождение этого заголовка. См. руководство сервера, чтобы узнать, как включить использование этого стандартного заголовка. Обратите внимание, что нужно использовать только последнее вхождение заголовка, так как вполне возможно, что клиент уже принес его.",
"cookie": "Чтобы отправить клиента на тот же сервер, на который он был отправлен ранее, чтобы повторно использовать сеанс на этом сервере, вы можете включить сохранение сеанса на основе файлов cookie. Добавьте директиву cookie в раздел backend и установите для параметра cookie уникальное значение в каждой строке сервера.",
"c_prefix": "Это ключевое слово указывает, что вместо того, чтобы полагаться на выделенный файл cookie для постоянства, существующий будет заполнен.",
"c_nocache": "Этот вариант рекомендуется в сочетании с режимом вставки, когда между клиентом и HAProxy есть кеш",
"c_nocache": "Этот вариант рекомендуется в сочетании с режимом вставки, когда между клиентом и HAProxy есть кеш",
"c_postonly": "Этот параметр гарантирует, что вставка файлов cookie будет выполняться только в ответах на запросы POST",
"c_dynamic": "Активируйте динамические файлы cookie. При использовании cookie сеанса динамически создается для каждого сервера",
"def_backend": "Если вы хотите использовать бэкэнд по умолчанию",
"def_backend_exit": "должен существовать",
"port_for_bind": "Порт для привязки",
"bind_ip_pair": "Привязать еще одну пару IP-портов",
"no_def_backend": "Если ни одно из условий не выполняется, будет использоваться бэкенд, определенный с помощью «default_backend». Если серверная часть по умолчанию не определена, используются либо серверы в том же разделе (в случае раздела «прослушивание»), либо, в случае внешнего интерфейса, сервер не используется, и возвращается ответ 503 о недоступности службы",
"circuit_breaking": "Прерыватель цепи — это шаблон проектирования, который используется для обнаружения сбоев и инкапсулирует логику предотвращения постоянного повторения сбоя. Шаблон проектирования автоматического выключателя работает так же, как электрический автоматический выключатель, который предназначен для «отключения» или размыкания цепи при обнаружении отказа.",
"peers_master": "Примечание. Если вы хотите использовать службы HAProxy в качестве кластера Master-Master, вы должны установить имена хостов локальных серверов в качестве имен одноранговых серверов. Иначе сверстников не получится",
"peers_slave": "Примечание. Если вы хотите использовать службы HAProxy в качестве кластера Master-Slave, вы должны установить имя хоста локального сервера для главного сервера в качестве имени однорангового сервера. Иначе пиры работать не будутk",
"peers": "Раздел Peers включает репликацию данных таблицы флешки между двумя или более экземплярами HAProxy",
"userlist": "В этом разделе вы можете создавать списки пользователей. И после использовать их в разделах «Добавить»",
"userlist_name": "Имя пользовательского листа",
"userlist_pass": "Пользовательский пароль. По умолчанию это небезопасный пароль",
"userlist_user_grp": "Группа пользователя",
"userlist_user": "Также можно прикрепить группы к этому пользователю, используя список групп, разделенных запятыми",
"userlist_group": "Также можно присоединить пользователей к этой группе, используя список имен, разделенных запятыми, которым предшествует ключевое слово «пользователи»",
"userlist_desc": "Можно контролировать доступ к разделам frontend/backend/listen или к http-статистике, разрешая только аутентифицированным и авторизованным пользователям. Для этого необходимо создать хотя бы один список пользователей и определить пользователей",
"servers": "В этом разделе вы можете создавать, редактировать и удалять серверы. И после использовать их как автозаполнение в разделах «Добавить»",
"options": "В этом разделе вы можете создавать, редактировать и удалять опции. И после использовать их как автозаполнение в разделах «Добавить»",
"paste_cert": "Вставьте содержимое файла сертификата",
"paste_cert_desc": "Этот файл pem будет использоваться для создания https-соединения с HAProxy, NGINX или Apache",
"lists_howto": "В этом разделе вы можете создавать и редактировать черные и белые списки. А после использовать их в конфигах HAProxy или на страницах «Добавить прокси». Прочитайте, как использовать его в этом",
"lists_new_line": "Каждый новый адрес необходимо указывать с новой строки",
"was_success_added": "был добавлен",
"create_ssl_proxy": "Создайте HTTPS-прокси с терминацией SSL на HAProxy и разгрузкой SSL. HAProxy будет отправлять на серверные части HTTP-трафик. Вам нужно иметь",
"create_ssl_front": "Создайте фронтетд HTTPS с терминацией SSL на HAProxy и разгрузкой SSL. HAProxy будет отправлять на серверные части HTTP-трафик. Вам нужно иметь",
"create_ssl_backend": "Создайте бэкенд HTTPS с терминацией SSL на HAProxy и разгрузкой SSL. HAProxy будет отправлять на серверные части HTTP-трафик. Вам нужно иметь",
"create_https_proxy": "Создайте прокси-сервер HTTPS без терминации SSL на HAProxy и разгрузки SSL. HAProxy будет отправлять на серверные части HTTPS-трафик",
"create_https_front": "Создайте фронтенд HTTPS без терминации SSL на HAProxy и разгрузки SSL. HAProxy будет отправлять на серверные части HTTPS-трафик",
"create_https_backend": "Создайте бэкенд HTTPS без терминации SSL на HAProxy и разгрузки SSL. HAProxy будет отправлять на серверные части HTTPS-трафик",
"option_temp": "Создавать, редактировать и удалять опции с заданными параметрами. И после использовать их как автозаполнение в разделах «Добавить прокси»",
"server_temp": "Создание, редактирование и удаление серверов. И после использовать их как автозаполнение в разделах «Добавить прокси»",
"use_add": "И использовать их в разделах «Добавить прокси»",
},
"buttons": {
"disable_ssl_check": "Отключить проверку SSL",
"disable_ssl_verify": "Отключить проверку SSL на серверах",
"set_options": "Задать параметры",
"set_options_m": "Задать параметры в ручную",
"show_full_settings": "Показать полный список настроек",
"show_full_settings": "Скрыть полный список настроек",
}
}
%}
{% set add_nginx_page = {
"desc": {
"upstream_desc1": "Модуль upstream используется для определения групп серверов.",
"upstream_desc2": "Определяет группу серверов. Серверы могут прослушивать разные порты. Кроме того, серверы, прослушивающие сокеты домена TCP и UNIX, могут быть смешанными.",
"upstream_desc3": "По умолчанию запросы распределяются между серверами методом round-robin.",
"keepalive": "Параметр Connections задает максимальное количество неактивных активных подключений к вышестоящим серверам, которые сохраняются в кэше каждого рабочего процесса. Когда это число превышено, последние использовавшиеся соединения закрываются.",
"fail_timeout": "Время, в течение которого должно произойти заданное количество неудачных попыток связи с сервером, чтобы сервер считался недоступным; и период времени, в течение которого сервер будет считаться недоступным.",
"max_fails": "Задает количество неудачных попыток связи с сервером, которое должно произойти в течение времени, заданного параметром fail_timeout, чтобы сервер считался недоступным в течение времени, также заданного параметром fail_timeout. По умолчанию количество неудачных попыток равно 1.",
}
}
%}
{% set admin_page = {
"desc": {
"latest_repo": "Roxy-WI попытается установить последнюю версию сервиса из официального репозитория",
"install_as_docker": "Установить сервис как контейнер Docker",
"ext_prom": "Этот экспортер будет использоваться внешним Prometheus. Также используйте этот флажок, если вы обновляете экспортер.",
"no_ansible": "You have not installed",
"before_install": "Прежде чем устанавливать какие-либо экспортеры, сначала установите",
"been_installed": "сервера были установлены",
"there_are_no": "Нет серверов Grafana и Prometheus",
"country_codes": "коды стран",
"smon_desc": "SMON означает <b>S</b>простой <b>MON</b>иторинг.",
"checker_desc": "Checker предназначен для мониторинга сервисов HAProxy, Nginx, Apache и Keepalived, а также бэкендов HAProxy и maxconn.",
"auto_start_desc": "Служба автозапуска позволяет перезапустить службы HAProxy, NGINX, Apache и Keepalived, если они не работают.",
"metrics_desc": "Собирает количество подключений для сервисов HAProxy, NGINX, Apache и HAProxy WAF.",
"p_s_desc": "Проверяет сервер на наличие открытых портов и сохраняет историю",
"socket_desc": "Socket — сервис для отправки предупреждений и уведомлений",
"a_new_version": "Доступна новая версия",
"no_new_version": "Нет новой версии",
"main_app": "Главное приложение",
"for_updating": "Для обновления необходимо использовать Roxy-WI RPM или DEB.",
"how_to_using_repo": "как начать пользоваться репозиторием.",
"proxy_settings": "Если сервер Roxy-WI использует прокси для подключения к Интернету, добавьте настройки прокси в yum.conf.",
}
}
%}
{% set smon_page = {
"desc": {
"before_use": "перед использование",
"smon_is_not_run": "SMON сервис не запущен.",
"run_smon": "Запустить сервис SMON",
"not_installed": "Вы еще не установили сервис SMON",
"not_added": "Вы еще не добавили сервера в SMON",
"create_server": "Создайте Ваш первый сервер",
"see_check": "чтобы посмотреть проверки, которые были добавлены",
"do_not_sort": "Не сортировать",
"do_not_sort_by_status": "Не сортировать по статусу",
"sort_status": "Сортировать по статусу",
"status_summary": "Сводка статуса",
"enabled_checks": "Активные проверки",
"http_status_check": "проверка состояния HTTP",
"body_status_check": "Проверка реакции тела",
"resp_time": "Время откл.",
"last_resp_time": "Посл. время откл.",
"UP": "ДОСТУПЕН",
"DOWN": "НЕ ДОСТУПЕН",
"HTTP_FAILURE": "ОШИБКА HTTP",
"BODY_FAILURE": "ОШИБКА ТЕЛА",
"UNKNOWN": "НЕИЗВЕСТНО",
"PORT_DOWN": "ПОРТ НЕ ДОСТ.",
}
}
%}
{% set p_s_page = {
"desc": {
"is_enabled_and_up": "Port scanner включен и служба работает.",
"is_enabled_and_down": "Port scanner включен, но сервис отключен",
"scanning_ports": "Сканирование открытых/фильтрованных портов для сервера",
"total_open_ports": "Всего открыто портов",
}
}
%}
{% set words = {
"cache": "кэш",
"compression": "сжатие",
"acceleration": "ускорение",
"start": "запустить",
"start2": "начните",
"stop": "остановить",
"restart": "перезагрузить",
"reload": "перезапустить",
"reloading": "перезапуска",
"service": "сервис",
"service2": "сервиса",
"services": "сервисы",
"services2": "сервисов",
"services3": "сервисами",
"services4": "сервисах",
"started": "запущен",
"stopped": "остановлен",
"no_desc": "нет описания",
"process_num": "процессы",
"version": "версия",
"version2": "версию",
"versions": "версии",
"error": "ошибка",
"addresses": "адреса",
"address": "адрес",
"virtual": "виртуальные",
"hosts": "хосты",
"time_range": "Временной промежуток",
"server": "сервер",
"server2": "сервере",
"status": "статус",
"current": "текущее",
"current2": "текущая",
"total": "всего",
"server_status": "Статус сервера",
"services_status": "Статус сервисов",
"compare": "сверить",
"map": "карта",
"about": "о",
"help": "помощь",
"contacts": "контакты",
"cabinet": "кабинет",
"legal": "legal",
"alert": "уведомление",
"alert2": "уведомлять",
"alerts": "уведомления",
"manage": "управлять",
"user": "пользователь",
"user2": "пользователя",
"user3": "пользовательские",
"users": "пользователи",
"users2": "пользователями",
"username": "пользователь",
"servers": "сервера",
"servers2": "серверами",
"creds": "учетные данные",
"creds2": "учетными данными",
"settings": "настройки",
"settings2": "настройками",
"install": "установить",
"installation": "установка",
"installing": "установка",
"proxy": "прокси",
"provisioning": "предоставление",
"backup": "бэкап",
"backup2": "бэкапа",
"configs": "конфиги",
"configs2": "конфигов",
"config": "конфиг",
"from": "от",
"view": "просмотр",
"internal": "внутренние",
"internal2": "внутренних",
"log": "лог",
"logs": "логи",
"logs2": "логов",
"admin_area": "админка",
"group": "группа",
"group2": "группу",
"groups": "группы",
"groups2": "групп",
"groups3": "группами",
"w_update": "обновить",
"updating": "обновление",
"monitoring": "мониторинг",
"auto": "автоматическое",
"refresh": "обновление",
"refresh2": "обновить",
"no": "нет",
"not": "не",
"yes": "да",
"interval": "интервал",
"desc": "описание",
"login": "логин",
"role": "роль",
"subs": "подписка",
"show_all": "показать все",
"plan": "план",
"pay_method": "платежный метод",
"active": "активный",
"open": "открыть",
"opened": "открытые",
"edit": "редактировать",
"delete": "удалить",
"add": "добавить",
"save": "сохранить",
"saved": "сохраненные",
"saving": "сохранения",
"expand_all": "развернуть",
"collapse_all": "свернуть",
"raw": "сырой",
"stats": "статистика",
"note": "внимание",
"back": "назад",
"show": "показать",
"run": "запустить",
"running": "запущенный",
"statistics": "статистики",
"rollback": "откатить",
"previous": "предыдущий",
"to": "к",
"listener": "листенер",
"frontends": "фронтенды",
"frontend": "фронтенд",
"backends": "бэкенды",
"backend": "бэкенд",
"maintain": "в обслуживание",
"drain": "отключенный",
"number": "количество",
"rows": "строк",
"row": "строка",
"find": "найти",
"exclude": "исключить",
"file": "файл",
"file2": "файла",
"files": "файлы",
"here": "здесь",
"action": "действие",
"actions": "действия",
"command": "команда",
"save": "сохранить",
"change": "изменение",
"change2": "изменить",
"enter": "ввод",
"enter2": "введите",
"lists": "листы",
"list": "лист",
"sessions": "сессии",
"session": "сессия",
"and": "и",
"select": "выберите",
"select2": "выбрать",
"new": "новый",
"new2": "нового",
"new3": "новую",
"new4": "новые",
"port": "порт",
"ports": "порты",
"table": "таблицу",
"w_get": "получить",
"dynamically": "динамически",
"set": "установить",
"type": "тип",
"typing": "печатать",
"site": "размер",
"is": "",
"w_empty": "пуста",
"used": "используется",
"w_clear": "отчистить",
"this": "эту",
"this2": "этой",
"this3": "этот",
"this4": "это",
"entry": "запись",
"age": "возраст",
"protocol": "протокол",
"rate": "скорость",
"expire": "истекает",
"more": "больше",
"info": "информации",
"source": "источник",
"overview": "обзор",
"personal": "личный",
"read": "читать",
"second": "секунда",
"seconds": "секунды",
"seconds2": "секунд",
"minute": "минута",
"minute2": "минуту",
"minutes": "минут",
"hour": "час",
"hours": "часа",
"hours2": "часов",
"day": "день",
"days": "дня",
"metrics": "метрики",
"every": "каждых",
"every2": "каждую",
"every3": "каждый",
"hide": "убрать",
"average": "Среднее количество",
"peak": "пиковые",
"connect": "подключиться",
"connections": "соединений",
"connections2": "соединения",
"enable": "активировать",
"enabled": "активный",
"virt": "вирт",
"virtual": "виртуальный",
"check": "проверить",
"checking": "проверка",
"protected": "защищенный",
"slave_for": "Подчинен",
"name": "имя",
"article": "статье",
"w_copy": "копировать",
"for": "для",
"history": "история",
"history2": "историю",
"history3": "истории",
"rule": "правило",
"rules": "правила",
"rules2": "правил",
"on": "на",
"dest": "назначение",
"target": "цель",
"w_input": "входящие",
"output": "исходящие",
"password": "пароль",
"email": "почта",
"w_a": "",
"w_an": "",
"key": "ключ",
"token": "токен",
"channel": "канал",
"channels": "каналы",
"job": "работу",
"cancel": "отмена",
"repository": "репозиторий",
"init": "инициализировать",
"period": "период",
"the": "",
"scan": "сканировать",
"is_there": "Установлен",
"confirm": "подтвердить",
"confirmation": "подтверждение",
"one": "одну",
"one2": "один",
"or": "или",
"upload": "загрузить",
"uploading": "загрузки",
"uploaded": "загруженный",
"test": "тестировать",
"test2": "тестовое",
"disabled": "отключено",
"via": "через",
"web_panel": "веб интерфейс",
"message": "сообщение",
"menu": "меню",
"language": "язык",
"apply": "применить",
"logout": "выйти",
"last": "последняя",
"last2": "последнее",
"activity": "активность",
"never": "никогда",
"is_online": "онлайн",
"is_offline": "офлайн",
"valid": "действительный",
"remote": "удаленный",
"remote2": "удаленную",
"local": "локальный",
"path": "путь",
"created": "создано",
"create": "создать",
"creating": "создание",
"diff": "разница",
"diff2": "разницу",
"diff3": "разницы",
"master": "мастер",
"slave": "подчиненный",
"interface": "интерфейс",
"as": "как",
"stay": "оставаться",
"protection": "защита",
"return": "вернуться",
"cluster": "кластер",
"existing": "существующий",
"existing2": "существующему",
"success": "успех",
"option": "опция",
"option2": "опцию",
"options": "опции",
"template": "шаблон",
"templates": "шаблоны",
"userlists": "пользовательские листы",
"whitelist": "белый спиской",
"whitelists": "белые списки",
"blacklist": "черный список",
"blacklists": "черные списки",
"mode": "режим",
"balance": "балансировка",
"health": "здоровье",
"cert": "сертификат",
"cert_name": "имя сертификата",
"certs": "сертификаты",
"certs2": "сертификатов",
"advanced": "расширенные",
"generate": "сгенерировать",
"generated": "сгенерированный",
"server_template": "Шаблоны серверов",
"custom": "Свои",
"param": "параметр",
"param2": "параметра",
"params": "параметры",
"of": "",
"display": "показать",
"default_backend": "Бэкенд по умолчанию",
"rule": "правило",
"existing": "существующие",
"domain": "домен",
"all": "все",
"just": "только",
"without": "без",
"work": "работать",
"working": "работа",
"section": "секция",
"section2": "секцию",
"use": "использовать",
"available": "доступные",
"external": "внешний",
"in": "в",
"folder": "папку",
"folder2": "папка",
"clone": "клонировать",
"date": "дата",
"time": "время",
"page": "страница",
"pages": "страницы",
"body": "тело",
"level": "уровень",
"host": "хост",
"uptime": "Время работы",
"downtime": "Время простоя",
"record_type": "Тип запипси",
"upstream": "апстрим",
"haproxy": "HAProxy",
"nginx": "NGINX",
"apache": "Apache",
"keepalived": "Keepalived",
"scan": "сканирование",
"notify": "уведомления",
"notification": "уведомление",
"keeping": "хранение",
"keep": "хранить",
"close": "закрыть",
"state": "состояние",
"latest": "последняя",
"cloud": "облако",
"provider": "провайдер",
"region": "регион",
"OS": "ОС",
"created_at": "Создано",
"edited_at": "Отредактировано",
"instance_type": "Тип инстанса",
"filter": "фильтр",
"rule_name": "Название правила",
"rule": "правило",
"rules": "правила",
}
%}

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{lang.menu_links.logs.h2}} {{service_name}}{% endblock %}
{% block h2 %}{{lang.menu_links.logs.h2}} {{service_name}}{% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox %}
<script src="/inc/users.js"></script>
@ -7,21 +9,21 @@
<tr class="overviewHead">
<td class="padding10 first-collumn" style="width: 10%;">
{% if select_id == 'viewlogs' %}
Log
{{lang.words.log|title()}}
{% else %}
Server
{{lang.words.server|title()}}
{% endif %}
</td>
{% if waf != '1' and select_id != 'viewlogs' %}
<td style="width: 10%;">Log files</td>
<td style="width: 10%;">{{lang.words.log|title()}} {{lang.words.files|title()}}</td>
{% endif %}
{% if select_id != 'viewlogs' and service != 'nginx' %}
{% endif %}
<td style="width: 10%;">Number rows</td>
<td class="help_cursor" style="width: 10%;"><span title="Find in a log file(supports regular expressions)">Find<span></td>
<td class="padding10 help_cursor" style="width: 10%;"><span title="Exclude from search in a log file(supports regular expressions)">Exclude<span></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="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 style="width: 10%;">
<label for="time_range_out_hour" style="padding: 0">Time range:</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_hour1', value=hour1, class='time-range', readonly='readonly') }}:{{ input('time_range_out_minut1', value=minut1, class='time-range', readonly='readonly') }}
</td>
@ -71,7 +73,7 @@
<div id="time-range"></div>
</td>
<td class="padding10 first-collumn" style="width: 1%;">
<button type="submit" name="Show log" value="Show" id="show_log_button">Show</button>
<button type="submit" name="Show log" value="Show" id="show_log_button">{{lang.words.show|title()}}</button>
</form>
</td>
</tr>
@ -87,14 +89,14 @@
}
</script>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the descriptions about all logs <a href="https://roxy-wi.org/description/logs" title="Servers description" target="_blank" class="link">here</a>
{{lang.phrases.read_about_files}} <a href="https://roxy-wi.org/description/logs" title="{{lang.words.servers|title()}} {{lang.words.desc}}" target="_blank" class="link">{{lang.words.here}}</a>
</div>
{% elif serv == 'roxy-wi.error.log' or serv == 'roxy-wi.access.log' %}
<script>
showApacheLog('{{serv}}');
</script>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the description about all logs file <a href="https://roxy-wi.org/description/logs" title="Servers description" target="_blank" class="link">here</a>
{{lang.phrases.read_about_files}} <a href="https://roxy-wi.org/description/logs" title="{{lang.words.servers|title()}} {{lang.words.desc}}" target="_blank" class="link">{{lang.words.here}}</a>
</div>
{% else %}
<script>

View File

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% from 'include/input_macros.html' import checkbox %}
{% block title %}{{lang.menu_links.metrics.h2}} {{service_desc.service}}{% endblock %}
{% block h2 %}{{lang.menu_links.metrics.h2}} {{service_desc.service}}{% endblock %}
{% block content %}
<style>
table, th, tr, td {
@ -21,10 +23,10 @@
{% elif services == '0' %}
<div style="text-align: center;">
<br />
<h3>You have not installed Metrics service.</h3>
<h3>{{lang.phrases.metrics_not_installed}}</h3>
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>Read <a href="https://roxy-wi.org/services/metrics#installation" title="Metrics installation" style="color: #5d9ceb;" target="_blank">here</a>
how to install Metrics service</h4>
<h4>{{lang.words.read|title()}} <a href="https://roxy-wi.org/services/metrics#installation" title="Metrics {{lang.words.installation}}" style="color: #5d9ceb;" target="_blank">{{lang.words.here}}</a>
{{lang.phrases.how_to_install_metrics}}</h4>
</div>
{% else %}
{% if servers|length == 0 %}
@ -33,29 +35,29 @@
<table style="min-width: 40%;">
<tr class="overviewHead">
<th colspan=13 style="background-color: #d1ecf1">
<span id="table_metrics_head" style="position: absolute;margin-left: 43%;">Metrics</span>
<span id="en_table_metric" class="plus switcher_table_metric" title="Enable display of the table of averages"></span>
<span id="dis_table_metric" class="minus switcher_table_metric" title="Disable display of the table of averages"></span>
<span id="table_metrics_head" style="position: absolute;margin-left: 43%;">{{lang.words.metrics|title()}}</span>
<span id="en_table_metric" class="plus switcher_table_metric" title="{{lang.phrases.enable_avg_table}}"></span>
<span id="dis_table_metric" class="minus switcher_table_metric" title="{{lang.phrases.disable}}"></span>
</th>
</tr>
</table>
<div id="table_metrics"></div>
<div style="padding-left: 25px;float: left;margin-top: 6px;">
<b>Time range:</b>
<b>{{lang.words.time_range}}:</b>
<select title="Choose time range" id="time-range">
<option value="30">30 minutes</option>
<option value="60">1 hour</option>
<option value="180">3 hours</option>
<option value="360">6 hours</option>
<option value="720">12 hours</option>
<option value="30">30 {{lang.words.minutes}}</option>
<option value="60">1 {{lang.words.hour}}</option>
<option value="180">3 {{lang.words.hours}}</option>
<option value="360">6 {{lang.words.hours2}}</option>
<option value="720">12 {{lang.words.hours2}}</option>
</select>
</div>
{% if service == 'haproxy' %}
<div style="margin-top: 6px;">
{{ checkbox('hide_http_metrics', desc='Hide HTTP metrics', title='Hide HTTP metrics') }}
{{ checkbox('hide_http_metrics', desc=lang.words.hide|title()+' HTTP ' + lang.words.metrics, title=lang.words.hide|title()+' HTTP ' + lang.words.metrics) }}
</div>
{% endif %}
<div id="refresh" style="text-align: right;margin-top: 20px;margin-right: 10px;" title="Refresh metrics" onclick="showMetrics()">
<div id="refresh" style="text-align: right;margin-top: 20px;margin-right: 10px;" title="{{lang.words.refresh|title}} {{lang.words.metrics}}" onclick="showMetrics()">
<span class="refresh"></span>
</div>
{% for s in servers %}

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ lang.menu_links.monitoring.net_tools }}{% endblock %}
{% block h2 %}{{ lang.menu_links.monitoring.net_tools }}{% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select %}
<style>
@ -20,31 +22,31 @@
<table class="overview">
<caption><h3>ICMP</h3></caption>
<tr class="overviewHead">
<th class="padding10 first-collumn">From</th>
<th class="padding10 first-collumn">To</th>
<th class="padding10 first-collumn">{{lang.words.from|title()}}</th>
<th class="padding10 first-collumn">{{lang.words.to|title()}}</th>
<th class="padding10 first-collumn"></th>
<th></th>
</tr>
<tr>
<td class="padding10 first-collumn">
<select autofocus required name="nettools_icmp_server_from" id="nettools_icmp_server_from">
<option disabled selected>------</option>
<option value="localhost">Roxy-WI</option>
{% for server in servers %}
<option value="{{ server.2 }}">{{ server.1 }}</option>
<td class="padding10 first-collumn">
<select autofocus required name="nettools_icmp_server_from" id="nettools_icmp_server_from">
<option disabled selected>------</option>
<option value="localhost">Roxy-WI</option>
{% for server in servers %}
<option value="{{ server.2 }}">{{ server.1 }}</option>
{% endfor %}
</select>
</td>
<td class="padding10 first-collumn">
{{ input('nettools_icmp_server_to', title='Enter IP or Name') }}
{{ input('token', value=token, type='hidden') }}
</td>
<td class="padding10 first-collumn">
<button type="submit" title="Run Ping" id="nettools_ping" name="nettools_ping" value="nettools_ping">Ping</button>
</td>
<td>
<button type="submit" title="Run Traceroute" id="nettools_trace" name="nettools_trace" value="nettools_trace">Traceroute</button>
</td>
</td>
<td class="padding10 first-collumn">
{{ input('nettools_icmp_server_to', title='Enter IP or Name') }}
{{ input('token', value=token, type='hidden') }}
</td>
<td class="padding10 first-collumn">
<button type="submit" title="Run Ping" id="nettools_ping" name="nettools_ping" value="nettools_ping">Ping</button>
</td>
<td>
<button type="submit" title="Run Traceroute" id="nettools_trace" name="nettools_trace" value="nettools_trace">Traceroute</button>
</td>
</tr>
</table>
</form>
@ -52,9 +54,9 @@
<table class="overview">
<caption><h3>Check port</h3></caption>
<tr class="overviewHead">
<th class="padding10 first-collumn">From</th>
<th class="padding10 first-collumn">To</th>
<th class="padding10 first-collumn">Port</th>
<th class="padding10 first-collumn">{{lang.words.from|title()}}</th>
<th class="padding10 first-collumn">{{lang.words.to|title()}}</th>
<th class="padding10 first-collumn">{{lang.words.port|title()}}</th>
<th></th>
</tr>
<tr>
@ -75,7 +77,7 @@
{{ input('nettools_telnet_port_to', title='Enter port', type='number', style='width: 60px;') }}
</td>
<td>
<button type="submit" title="Run Telnet" id="nettools_telnet" name="nettools_telnet" value="nettools_telnet">Connect</button>
<button type="submit" title="{{lang.words.run|title()}} Telnet" id="nettools_telnet" name="nettools_telnet" value="nettools_telnet">{{lang.words.connect|title()}}</button>
</td>
</tr>
</table>
@ -84,9 +86,9 @@
<table class="overview">
<caption><h3>NSLookup</h3></caption>
<tr class="overviewHead">
<th class="padding10 first-collumn">From</th>
<th class="padding10 first-collumn">Record type</th>
<th class="padding10 first-collumn">DNS name</th>
<th class="padding10 first-collumn">{{lang.words.from|title()}}</th>
<th class="padding10 first-collumn">{{lang.words.record_type}} </th>
<th class="padding10 first-collumn">DNS {{lang.words.name}}</th>
<th></th>
</tr>
<tr>
@ -110,7 +112,7 @@
{{ input('token', value=token, type='hidden') }}
</td>
<td>
<button type="submit" title="Run Telnet" id="nettools_nslookup" name="nettools_nslookup" value="nettools_nslookup">Check</button>
<button type="submit" title="{{lang.words.run|title()}} Telnet" id="nettools_nslookup" name="nettools_nslookup" value="nettools_nslookup">{{lang.words.check|title()}}</button>
</td>
</tr>
</table>
@ -221,4 +223,4 @@
event.preventDefault();
});
</script>
{% endblock %}
{% endblock %}

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{lang.menu_links.overview.title}}{% endblock %}
{% block h2 %}{{lang.menu_links.overview.h2}}{% endblock %}
{% block content %}
<link href="/inc/css/chart.min.css" rel="stylesheet">
<script src="/inc/metrics.js"></script>
@ -23,38 +25,38 @@
<tr class="overviewHead">
<td class="padding10 first-collumn-wi">
{% if role <= 2 %}
<a href="servers.py#servers" title="Manage servers">Servers</a>
<a href="servers.py#servers" title="{{lang.words.manage|title()}} {{lang.words.servers}}">{{lang.words.servers|title()}}</a>
{% else %}
Server
{{lang.words.servers|title()}}
{% endif %}
</td>
<td class="padding10 third-collumn-wi" style="width: 20%;">
<a href="/app/hapservers.py?service=haproxy" title="HAProxy servers overview" class="logs_link">
<a href="/app/hapservers.py?service=haproxy" title="HAProxy {{lang.words.servers}} {{lang.words.overview}}" class="logs_link">
HAProxy
</a>
</td>
<td class="padding10">
<a href="/app/hapservers.py?service=nginx" title="NGINX servers overview" class="logs_link">
<a href="/app/hapservers.py?service=nginx" title="NGINX {{lang.words.servers}} {{lang.words.overview}}" class="logs_link">
NGINX
</a>
</td>
<td class="padding10">
<a href="/app/hapservers.py?service=apache" title="Apache servers overview" class="logs_link">
<a href="/app/hapservers.py?service=apache" title="Apache {{lang.words.servers}} {{lang.words.overview}}" class="logs_link">
Apache
</a>
</td>
<td class="padding10">
<a href="/app/hapservers.py?service=keepalived" title="Keepalived servers overview" class="logs_link">
<a href="/app/hapservers.py?service=keepalived" title="Keepalived {{lang.words.servers}} {{lang.words.overview}}" class="logs_link">
Keepalived
</a>
</td>
<td class="padding10">
<a href="/app/waf.py?service=haproxy" title="HAProxy WAF servers overview" class="logs_link">
<a href="/app/waf.py?service=haproxy" title="HAProxy WAF {{lang.words.servers}} {{lang.words.overview}}" class="logs_link">
WAF
</a>
</td>
<td class="padding10">
<a onclick="showOverview(ip, hostnamea)" title="Refresh" style="float: right;">
<a onclick="showOverview(ip, hostnamea)" title="{{lang.words.refresh|title()}}" style="float: right;">
<span class="refresh"></span>
</a>
</td>
@ -67,15 +69,15 @@
<tr class="overviewHead" style="height: 30px;">
<td class="padding10 first-collumn-wi" colspan="2">
{% if role <= 1 %}
<a href="/app/viewlogs.py?viewlogs={{roxy_wi_log_id}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View Roxy-WI logs" class="logs_link">
Roxy-WI server status
<a href="/app/viewlogs.py?viewlogs={{roxy_wi_log_id}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="{{lang.words.view|title()}} Roxy-WI {{lang.words.logs}}" class="logs_link">
Roxy-WI {{lang.words.server_status}}
</a>
{% else %}
Roxy-WI server status
Roxy-WI {{lang.words.server_status}}
{% endif %}
</td>
<td>
<a onclick="showOverviewHapWI()" title="Refresh" style="float: right; margin-right: 15px;">
<a onclick="showOverviewHapWI()" title="{{lang.words.refresh|title()}}" style="float: right; margin-right: 15px;">
<span class="refresh"></span>
</a>
</td>
@ -96,15 +98,15 @@
<tr class="overviewHead">
<td class="padding10 first-collumn-wi" colspan=2>
{% if role <= 1 %}
<a href="/app/users.py#services" title="View services status" class="logs_link">
Roxy-WI services status
<a href="/app/users.py#services" title="{{lang.words.view|title()}} {{lang.words.services}} {{lang.words.status}}" class="logs_link">
Roxy-WI {{lang.words.services_status}}
</a>
{% else %}
Roxy-WI services status
Roxy-WI {{lang.words.services_status}}
{% endif %}
</td>
<td>
<a onclick="showServicesOverview()" title="Refresh" style="float: right; margin-right: 15px;">
<a onclick="showServicesOverview()" title="{{lang.words.refresh|title()}}" style="float: right; margin-right: 15px;">
<span class="refresh"></span>
</a>
</td>
@ -122,19 +124,19 @@
<thead>
<tr class="overviewHead" style="height: 30px;">
<td class="padding10 first-collumn-wi">
<a href="{{admin_uri}}#users" title="Manage users" class="logs_link">Login</a>
<a href="{{admin_uri}}#users" title="{{lang.words.manage|title()}} {{lang.words.users2}}" class="logs_link">{{lang.words.login|title()}}</a>
</td>
<td class="second-collumn">Groups</td>
<td>Role</td>
<td class="second-collumn">{{lang.words.groups|title()}}</td>
<td>{{lang.words.role|title()}}</td>
<td>
<span class="add-button-wi" id="show_all_users" style="display: none;">
<span title="Show all users" id="show-all-users" style="color: #fff">
Show all
<span title="{{lang.words.show_all|title()}} {{lang.words.users}}" id="show-all-users" style="color: #fff">
{{lang.words.show_all|title()}}
</span>
</span>
</td>
<td style="padding-right: 10px;">
<a onclick="showUsersOverview()" title="Refresh" style="float: right;">
<a onclick="showUsersOverview()" title="{{lang.words.refresh|title()}}" style="float: right;">
<span class="refresh"></span>
</a>
</td>
@ -147,14 +149,14 @@
<table class="overview-wi" id="overview-groups">
<tr class="overviewHead">
<td class="padding10 first-collumn-wi">
<a href="users.py#groups" title="Manage groups" class="logs_link">Group</a>
<a href="users.py#groups" title="Manage groups" class="logs_link">{{lang.words.groups|title()}}</a>
</td>
<td class="second-collumn" style="width: 40%">Description</td>
<td class="second-collumn" style="width: 40%">{{lang.words.desc|title()}}</td>
<td>
{% if groups|length > 3 %}
<span class="add-button-wi">
<span title="Show all groups" id="show-all-groups" style="color: #fff">
Show all
<span title="{{lang.words.show_all|title()}} {{lang.words.groups}}" id="show-all-groups" style="color: #fff">
{{lang.words.show_all|title()}}
</span>
</span>
{% endif %}
@ -183,8 +185,8 @@
<table class="overview-wi">
<tr class="overviewHead">
<td class="padding10 first-collumn-wi">Role</td>
<td class="second-collumn" style="width: 50%">Description</td>
<td class="padding10 first-collumn-wi">{{lang.words.role|title()}}</td>
<td class="second-collumn" style="width: 50%">{{lang.words.desc|title()}}</td>
<td></td>
<td></td>
</tr>
@ -193,7 +195,7 @@
<td class="padding10 first-collumn-wi">
{{ role.name }}
</td>
<td class="third-collumn-wi">{{ role.description }}</td>
<td class="third-collumn-wi">{{ lang.roles[role.name] }}</td>
<td></td>
<td></td>
</tr>
@ -205,18 +207,18 @@
<tr class="overviewHead">
<td class="padding10 first-collumn-wi">
{% if role == 2 %}
<a href="/app/viewlogs.py?type=2&viewlogs={{roxy_wi_log_id}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View Roxy-WI logs" class="logs_link">
<a href="/app/viewlogs.py?type=2&viewlogs={{roxy_wi_log_id}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="{{lang.words.view|title()}} Roxy-WI {{lang.words.logs}}" class="logs_link">
{% else %}
<a href="/app/viewlogs.py?viewlogs={{roxy_wi_log_id}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View Roxy-WI logs" class="logs_link">
<a href="/app/viewlogs.py?viewlogs={{roxy_wi_log_id}}&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="{{lang.words.view|title()}} Roxy-WI {{lang.words.logs}}" class="logs_link">
{% endif %}
Recent Roxy-WI log
Recent Roxy-WI {{lang.words.logs}}
</a>
</td>
<td>
{% if roxy_wi_log|length > 3 %}
<span class="add-button-wi">
<span title="Show more log" id="show-all-haproxy-wi-log" style="color: #fff">
Show more log
<span title="{{lang.words.show|title()}} {{lang.words.more}}" id="show-all-haproxy-wi-log" style="color: #fff">
{{lang.words.show_all|title()}}
</span>
</span>
{% endif %}
@ -247,7 +249,7 @@
<table class="overview-wi" id="overview-subs">
<tr class="overviewHead" style="height: 30px;">
<td class="padding10 first-collumn-wi" colspan="2">
<a href="https://roxy-wi.org/cabinet" title="Personal cabinet" class="logs_link" target="_blank">Subscription</a>
<a href="https://roxy-wi.org/cabinet" title="{{lang.words.personal|title()}} {{lang.words.cabinet}}" class="logs_link" target="_blank">{{lang.words.subs|title()}}</a>
</td>
</tr>
<tbody id="sub-table"></tbody>

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block h2 %}{{ title }}{% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select %}
<script src="/inc/overview.js"></script>
@ -33,8 +35,8 @@
{% elif port_scanner_stderr != '' %}
<div style="text-align: center;">
<br />
<h3>You have not installed Port scanner service. Read <a href="https://roxy-wi.org/services.py/portscanner"
title="Port scanner" target="_blank">here</a> how to install Port scanner service</h3>
<h3>{{lang.admin_page.desc.no_ansible}} Port scanner {{lang.words.service}}. {{lang.words.read|title()}} <a href="https://roxy-wi.org/services.py/portscanner"
title="Port scanner" target="_blank">{{lang.words.here}}</a> {{lang.phrases.how_to_install}} Port scanner {{lang.words.service}}</h3>
</div>
{% else %}
<div id="up-pannel">
@ -54,22 +56,22 @@
{% if port_scanner_settings|length > 0 %}
{% if p.server_id == s.0 and p.enabled == 1 %}
{% if port_scanner == 'active' %}
<span id="portscanner_enable_status-{{p.server_id}}" class="serverUp server-status" title="Port scanner is enabled and service is UP"></span>
<span id="portscanner_enable_status-{{p.server_id}}" class="serverUp server-status" title="{{lang.p_s_page.desc.is_enabled_and_up}}"></span>
{% else %}
<span id="portscanner_enable_status-{{p.server_id}}" class="serverDown server-status" title="Port scanner is enabled, but service is DOWN"></span>
<span id="portscanner_enable_status-{{p.server_id}}" class="serverDown server-status" title="{{lang.p_s_page.desc.is_enabled_and_down}}"></span>
{% endif %}
{% elif p.server_id == s.0 and p.enabled == 0 %}
<span id="portscanner_enable_status-{{p.server_id}}" class="serverNone server-status" title="Port scanner is disabled"></span>
<span id="portscanner_enable_status-{{p.server_id}}" class="serverNone server-status" title="Port scanner {{lang.words.is}} {{lang.words.disabled}}"></span>
{% endif %}
{% else %}
<span id="portscanner_enable_status-{{p.server_id}}" class="serverNone server-status" title="Port scanner is disabled"></span>
<span id="portscanner_enable_status-{{p.server_id}}" class="serverNone server-status" title="Port scanner {{lang.words.is}} {{lang.words.disabled}}"></span>
{% endif %}
{% endfor %}
{% if s.0 not in port_scanner_settings|map(attribute='server_id') %}
<span id="portscanner_enable_status-{{s.0}}" class="serverNone server-status" title="Port scanner is disabled"></span>
<span id="portscanner_enable_status-{{s.0}}" class="serverNone server-status" title="Port scanner {{lang.words.is}} {{lang.words.disabled}}"></span>
{% endif %}
{% if not serv %}
<a href="/app/portscanner.py?history={{s.2}}" title="View Port scanner history for {{s.1}}" style="color: #5d9ceb">{{s.1}}</a>
<a href="/app/portscanner.py?history={{s.2}}" title="{{lang.words.view|title()}} Port scanner {{lang.words.history2}} {{lang.words.for}} {{s.1}}" style="color: #5d9ceb">{{s.1}}</a>
{% else %}
{{s.1}}
{% endif %}
@ -82,7 +84,7 @@
<br />
IP: {{s.2}}
<br />
Last scan:
{{lang.words.last|title()}} {{lang.words.scan}}:
{% if count_ports is defined %}
{% for c in count_ports %}
{% if c.0 == s.2 %}
@ -91,7 +93,7 @@
{% endfor %}
{% endif %}
<br />
Total opened ports:
{{lang.p_s_page.desc.total_open_ports}}:
{% if count_ports is defined %}
{% for c in count_ports %}
{% if c.0 == s.2 %}
@ -114,46 +116,43 @@
{% set disabled = 'true' %}
{% endif %}
{% if p.enabled == 1 %}
{{ checkbox(portscanner_enable_id, title="Port scanner enabled", checked='checked', desc='Port scanner') }}
{{ checkbox(portscanner_enable_id, title="Port scanner "+lang.words.enabled, checked='checked', desc='Port scanner') }}
{% else %}
{{ checkbox(portscanner_enable_id, title="Port scanner disabled", desc='Port scanner') }}
{{ checkbox(portscanner_enable_id, title="Port scanner "+lang.words.disabled, desc='Port scanner') }}
{% endif %}
{% if p.notify == 1 %}
{{ checkbox(portscanner_notify_id, title="Notification via Telegram enabled", checked='checked', desc='Notify') }}
{{ checkbox(portscanner_notify_id, title=lang.words.notification|title()+" "+ lang.words.via +" Telegram/Slack "+lang.words.enabled, checked='checked', desc=lang.words.notify|title()) }}
{% else %}
{{ checkbox(portscanner_notify_id, title="Notification via Telegram disabled", desc='Notify', disabled=disabled) }}
{{ checkbox(portscanner_notify_id, title=lang.words.notification|title()+" "+ lang.words.via +" Telegram/Slack "+lang.words.disabled, desc=lang.words.notify|title(), disabled=disabled) }}
{% endif %}
{% if p.history == 1 %}
{{ checkbox(portscanner_history_id, title="Keeping history enabled", checked='checked', desc='Keep history') }}
{{ checkbox(portscanner_history_id, title=lang.words.keeping|title()+" "+ lang.words.history3 + " "+lang.words.enabled, checked='checked', desc=lang.words.keep|title()+' '+lang.words.history2) }}
{% else %}
{{ checkbox(portscanner_history_id, title="Keeping history disabled", desc='Keep history', disabled=disabled) }}
{{ checkbox(portscanner_history_id, title=lang.words.keeping|title()+" "+ lang.words.history3 + " "+lang.words.disabled, desc=lang.words.keep|title()+' '+lang.words.history2, disabled=disabled) }}
{% endif %}
{% endif %}
{% endfor %}
{% if s.0 not in port_scanner_settings|map(attribute='server_id') %}
{{ checkbox(portscanner_enable_id, title="Port scanner disabled", desc='Port scanner') }}
{{ checkbox(portscanner_notify_id, title="Notification via Telegram disabled", desc='Notify', disabled='true') }}
{{ checkbox(portscanner_history_id, title="Keeping history disabled", desc='Keep history', disabled='true') }}
{{ checkbox(portscanner_enable_id, title="Port scanner "+lang.words.disabled, desc='Port scanner') }}
{{ checkbox(portscanner_notify_id, title=lang.words.notification|title()+" "+ lang.words.via +" Telegram/Slack "+lang.words.disabled, desc=lang.words.notify|title(), disabled='true') }}
{{ checkbox(portscanner_history_id, title=lang.words.keeping|title()+" "+ lang.words.history3 + " "+lang.words.disabled, desc=lang.words.keep|title()+' '+lang.words.history2, disabled='true') }}
{% endif %}
{% else %}
{{ checkbox(portscanner_enable_id, title="Port scanner disabled", desc='Port scanner') }}
{{ checkbox(portscanner_notify_id, title="Notification via Telegram disabled", desc='Notify', disabled='true') }}
{{ checkbox(portscanner_history_id, title="Keeping history disabled", desc='Keep history', disabled='true') }}
{{ checkbox(portscanner_enable_id, title="Port scanner "+lang.words.disabled, desc='Port scanner') }}
{{ checkbox(portscanner_notify_id, title=lang.words.notification|title()+" "+ lang.words.via +""+lang.words.disabled, desc=lang.words.notify|title(), disabled='true') }}
{{ checkbox(portscanner_history_id, title=lang.words.keeping|title()+" "+ lang.words.history3 + " "+lang.words.disabled, desc=lang.words.keep|title()+' '+lang.words.history2, disabled='true') }}
{% endif %}
{% endif %}
<br />
<button onclick="scanPorts('{{s.0}}')" title="Scanning open/filtered ports for the server {{s.1}}">Run scan</button>
<button onclick="scanPorts('{{s.0}}')" title="{{lang.p_s_page.desc.scanning_ports}} {{s.1}}">{{lang.words.run|title()}} {{lang.words.scan}}</button>
</div>
</div>
{% endfor %}
</div>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px; margin-top: 45%">
Read about Port scanner service in this <a href="https://roxy-wi.org/services/portscanner" title="The Port scanner service description" target="_blank">article</a>
{{lang.words.read|title()}} {{lang.words.about}} Port scanner {{lang.words.service}} {{lang.words.in}} {{lang.words.this2}} <a href="https://roxy-wi.org/services/portscanner" title="The Port scanner service description" target="_blank">{{lang.words.article}}</a>
</div>
{% endif %}
<div id="dialog-confirm" 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>
<div id="show_scans_ports" style="display: none; padding: 0;">
<div id="show_scans_ports_body"></div>
</div>
@ -173,18 +172,20 @@
} else {
toastr.clear();
$("#show_scans_ports_body").html(data);
var close_word = $('#translate').attr('data-close');
$("#show_scans_ports" ).dialog({
resizable: false,
height: "auto",
width: 360,
modal: true,
title: "Opened ports",
buttons: {
Close: function() {
title: "{{lang.words.opened|title()}} {{lang.words.ports}}",
buttons: [{
text: close_word,
click: function() {
$( this ).dialog( "close" );
$("#show_scans_ports_body").html('');
}
}
}]
});
}
}

View File

@ -27,18 +27,18 @@
<table class="overview" id="ajax-provisioning">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn">Name</th>
<th>Provider</th>
<th class="padding10 first-collumn">{{lang.words.name|title()}}</th>
<th>{{lang.words.provider|title()}}</th>
{% if role == 1 %}
<th>Group</th>
<th>{{lang.words.group|title()}}</th>
{% endif %}
<th>Cloud</th>
<th>Region</th>
<th>OS</th>
<th>{{lang.words.cloud|title()}}</th>
<th>{{lang.words.region|title()}}</th>
<th>{{lang.words.OS}}</th>
<th>IP</th>
<th>Instance type</th>
<th>Status</th>
<th>Created at</th>
<th>{{lang.words.instance_type}}</th>
<th>{{lang.words.status|title()}}</th>
<th>{{lang.words.created_at}}</th>
<th></th>
<th></th>
</tr>
@ -47,20 +47,20 @@
{% include 'ajax/provisioning/provisioned_servers.html' %}
</tbody>
</table>
<br /><span class="add-button" title="Create a new server" id="create-provider-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.create|title()}} {{lang.words.w_a}} {{lang.words.new}} {{lang.words.server}}" id="create-provider-button">+ {{lang.words.add|title()}}</span>
{% endif %}
</div>
<div id="providers">
<table class="overview" id="ajax-providers">
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn">Name</th>
<th>Cloud</th>
<th class="padding10 first-collumn">{{lang.words.name|title()}}</th>
<th>{{lang.words.cloud|title()}}</th>
{% if role == 1 %}
<th>Group</th>
<th>{{lang.words.group|title()}}</th>
{% endif %}
<th>Created at</th>
<th>Edited at</th>
<th>{{lang.words.created_at}}</th>
<th>{{lang.words.edited_at}}</th>
<th></th>
<th></th>
</tr>
@ -69,7 +69,7 @@
{% include 'ajax/provisioning/providers.html' %}
</tbody>
</table>
<br /><span class="add-button" title="Add a new provider" id="add-provider-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} {{lang.words.provider}}" id="add-provider-button">+ {{lang.words.add|title()}}</span>
</div>
</div>
{% include 'include/provisioning/creating_dialogs.html' %}

View File

@ -40,14 +40,14 @@
</select>
<input type="hidden" value="{{ serv }}" name="serv">
{% if role <= 3 %}
<button type="submit" value="open" name="open" class="btn btn-default" title="Edit running config">Edit</button>
<button type="submit" value="open" name="open" class="btn btn-default" title="{{lang.words.edit|title()}} {{lang.words.running}} {{lang.words.config}}">{{lang.words.edit|title()}}</button>
{% endif %}
</form>
</p>
{% if config %}
{% if role <= 3 %}
<div id="config">
<h4>You are editing "{{section}}" section from server {{ serv }}</h4>
<h4>{{lang.phrases.you_are_editing}} "{{section}}" {{lang.phrases.section_from_server}} {{ serv }}</h4>
<form action="{{ action }}" name="saveconfig" method="post">
<input type="hidden" value="{{ serv }}" name="serv">
<input type="hidden" value="{{ start_line }}" name="start_line">
@ -58,14 +58,14 @@
</div>
{% if not is_serv_protected or role <= 2 %}
<p>
<button type="submit" value="test" name="save" class="btn btn-default" title="Check config without saving the config">Check config</button>
<button type="submit" value="save" name="save" class="btn btn-default" title="Save config without reloading the service">Save</button>
<button type="submit" value="test" name="save" class="btn btn-default" title="{{lang.words.check|title()}} {{lang.words.config}} {{lang.words.without}} {{lang.words.saving}}">{{lang.phrases.check_config}}</button>
<button type="submit" value="save" name="save" class="btn btn-default" title="{{lang.phrases.save_title}}">{{lang.words.save|title()}}</button>
{% if is_restart|int == 0 %}
<button type="submit" value="" name="" class="btn btn-default">Save and restart</button>
<button type="submit" value="" name="" class="btn btn-default">{{lang.phrases.save_and_restart}}</button>
{% endif %}
<button type="submit" value="reload" name="save" class="btn btn-default">Save and reload</button>
<button type="submit" value="reload" name="save" class="btn btn-default">{{lang.phrases.save_and_reload}}</button>
{% if section != 'globals' and section != 'defaults' %}
<button type="submit" value="delete" name="save" class="btn btn-default">Delete this section</button>
<button type="submit" value="delete" name="save" class="btn btn-default">{{lang.words.delete|title()}} {{lang.words.this}} {{lang.words.section2}}</button>
{% endif %}
</p>
{% endif %}
@ -100,16 +100,15 @@
{% endif %}
{% endif %}
{% if aftersave %}
<div class="alert alert-info">A new config has been saved as: {{ cfg }} </div>
<div class="alert alert-info">{{lang.phrases.new_config_has_been_saved}}: {{ cfg }} </div>
{% if stderr or error %}
{% include 'include/errors.html' %}
{% else %}
<div class="alert alert-success">Config is ok</div>
<div class="alert alert-success">{{lang.words.config|title()}} {{lang.words.is}} {{lang.words.valid}}</div>
{% if warning %}
<div class="alert alert-warning">{{warning}}</div>
{% endif %}
<a href="config.py?serv={{ serv }}" title="Working with HAProxy config">Config</a> |
<a href="statsview.py?serv={{ serv }}" target="_blank" title="View stats">Go to stats</a>
<a href="config.py?serv={{ serv }}" title="{{lang.words.working|title()}} {{lang.words.with}} HAProxy {{lang.words.config}}">{{lang.words.config|title()}}</a>
{% endif %}
<script>window.history.pushState("Config", "Config", cur_url[0])</script>
{% endif %}

View File

@ -10,15 +10,15 @@
{{ input('new-slack-group-add', type='hidden', value=group) }}
<div id="tabs">
<ul>
<li><a href="#users" title="Servers: Manage users - Roxy-WI">Users</a></li>
<li><a href="#servers" title="Servers: Manage servers - Roxy-WI">Servers</a></li>
<li><a href="#ssh" title="Servers: Manage SSH credentials - Roxy-WI">SSH credentials</a></li>
<li><a href="#checker" title="Servers: Manage checker - Roxy-WI">Checker</a></li>
<li><a href="#settings" title="Admin area: Manage Roxy-WI settings - Roxy-WI">Settings</a></li>
<li><a href="#installproxy" title="Servers: Proxy service installation - Roxy-WI">Proxy installation</a></li>
<li><a href="#backup" title="Servers: Backup configs - Roxy-WI">Backup</a></li>
<li><a href="#installmon" title="Servers: Monitoring service installation - Roxy-WI">Monitoring installation</a></li>
<li><a href="#geolite2" title="Servers: GeoLite2 - Roxy-WI">GeoLite2</a></li>
<li><a href="#users" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} {{lang.words.users}} - Roxy-WI">{{lang.words.users|title()}}</a></li>
<li><a href="#servers" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} {{lang.words.servers}} - Roxy-WI">{{lang.words.servers|title()}}</a></li>
<li><a href="#ssh" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} SSH {{lang.words.creds}} - Roxy-WI">SSH {{lang.words.creds}}</a></li>
<li><a href="#checker" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} Checker - Roxy-WI">Checker</a></li>
<li><a href="#settings" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} Roxy-WI {{lang.words.settings}} - Roxy-WI">{{lang.words.settings|title()}}</a></li>
<li><a href="#installproxy" title="{{lang.words.servers|title()}}: {{lang.words.proxy|title()}} {{lang.words.service}} {{lang.words.installation}} - Roxy-WI">{{lang.words.proxy|title()}} {{lang.words.installation}}</a></li>
<li><a href="#backup" title="{{lang.words.servers|title()}}: {{lang.words.manage|title()}} {{lang.words.backup|title()}} configs - Roxy-WI" id="admin-tabs-backup">{{lang.words.backup|title()}}</a></li>
<li><a href="#installmon" title="{{lang.words.servers|title()}}: {{lang.words.monitoring|title()}} service installation - Roxy-WI" id="admin-tabs-mon">{{lang.words.monitoring|title()}} {{lang.words.installation}}</a></li>
<li><a href="#geolite2" title="{{lang.words.servers|title()}}: GeoLite2 - Roxy-WI">GeoLite2</a></li>
{% include 'include/login.html' %}
</ul>
<ul id='browse_histroy'></ul>
@ -43,23 +43,23 @@
<div id="installproxy">
{% if not is_needed_tool %}
<div style="text-align: center;">
<h3>You have not installed Ansible</h3>.
<h3>{{lang.admin_page.desc.no_ansible}}</h3>.
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>
Read <a href="https://roxy-wi.org/installation#ansible" title="Installing Ansible" target="_blank">here</a> how to install Ansible.
{{lang.words.install|title()}} <a href="https://roxy-wi.org/installation#ansible" title="{{lang.words.install|title()}} Ansible" target="_blank">{{lang.words.here}}</a> {{lang.phrases.how_to_install}} Ansible.
</h4>
</div>
{% else %}
<table class="overview">
<caption><h3>Install HAProxy</h3></caption>
<caption><h3>{{lang.words.install|title()}} HAProxy</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Current version</td>
<td class="padding10 first-collumn help_cursor" style="width: 30%;" title="For Ubuntu Roxy-WI will try to install the latest version from repositories on a server">
Available Versions (?)
<td class="padding10 first-collumn">{{lang.words.current2|title()}} {{lang.words.version}}</td>
<td class="padding10 first-collumn help_cursor" style="width: 30%;" title="{{lang.words.for|title()}} Ubuntu {{lang.admin_page.desc.latest_repo}}">
{{lang.words.available|title()}} {{lang.words.versions}} (?)
</td>
<td class="padding10 first-collumn" style="width: 20%;">Server</td>
<td class="help_cursor" title="Install HAProxy service as a Docker container">Use Docker</td>
<td>SYN-flood protection</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>SYN-flood {{lang.words.protection}}</td>
<td></td>
</tr>
<tr>
@ -80,31 +80,31 @@
</select>
</td>
<td style="padding-left: 25px;">
{{ checkbox('haproxy_docker', title="Install HAProxy service as a Docker container") }}
{{ checkbox('haproxy_docker', title=lang.admin_page.desc.install_as_docker) }}
</td>
<td class="syn-flood-protection-field">
{{ checkbox('syn_flood', title="Enable SYN-flood protection", checked='checked') }}
{{ checkbox('syn_flood', title=lang.words.enable|title() + ' SYN-flood '+ lang.words.protection, checked='checked') }}
</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="install" title="Install HAProxy">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="install" title="{{lang.words.install|title()}} HAProxy">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
<table>
<caption><h3>Install NGINX</h3></caption>
<caption><h3>{{lang.words.install|title()}} NGINX</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Current version</td>
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 20%;">Server</td>
<td class="help_cursor" title="Install NGINX service as a Docker container" >Use Docker</td>
<td>SYN-flood protection</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: 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>SYN-flood {{lang.words.protection}}</td>
<td></td>
</tr>
<tr>
<td id="cur_nginx_ver" class="padding10 first-collumn">
</td>
<td class="padding10 first-collumn" style="width: 20%;">
Roxy-WI will try to install the latest NGINX version from an official NGINX repository
{{lang.admin_page.desc.latest_repo}}
</td>
<td class="padding10 first-collumn">
<select autofocus required name="nginxaddserv" id="nginxaddserv">
@ -115,31 +115,31 @@
</select>
</td>
<td style="padding-left: 25px;">
{{ checkbox('nginx_docker', title="Install NGINX service as a Docker container") }}
{{ checkbox('nginx_docker', title=lang.admin_page.desc.install_as_docker) }}
</td>
<td class="syn-flood-protection-field">
{{ checkbox('nginx_syn_flood', title="Enable SYN-flood protection", checked='checked') }}
{{ checkbox('nginx_syn_flood', title=lang.words.enable|title() + ' SYN-flood '+ lang.words.protection, checked='checked') }}
</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="nginx_install" title="Install NGINX">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="nginx_install" title="{{lang.words.install|title()}} NGINX">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
<table>
<caption><h3>Install Apache</h3></caption>
<caption><h3>{{lang.words.install|title()}} Apache</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Current version</td>
<td class="padding10 first-collumn" style="width: 30%;">Available Versions</td>
<td class="padding10 first-collumn" style="width: 20%;">Server</td>
<td class="help_cursor" title="Install Apache service as a Docker container" >Use Docker</td>
<td>SYN-flood protection</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: 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>SYN-flood {{lang.words.protection}}</td>
<td></td>
</tr>
<tr>
<td id="cur_apache_ver" class="padding10 first-collumn">
</td>
<td class="padding10 first-collumn" style="width: 20%;">
Roxy-WI will try to install the latest Apache version from an official Apache repository
{{lang.admin_page.desc.latest_repo}}
</td>
<td class="padding10 first-collumn">
<select autofocus required name="apacheaddserv" id="apacheaddserv">
@ -150,13 +150,13 @@
</select>
</td>
<td style="padding-left: 25px;">
{{ checkbox('apache_docker', title="Install Apache service as a Docker container") }}
{{ checkbox('apache_docker', title=lang.admin_page.desc.install_as_docker) }}
</td>
<td class="syn-flood-protection-field">
{{ checkbox('apache_syn_flood', title="Enable SYN-flood protection", checked='checked') }}
{{ checkbox('apache_syn_flood', title=lang.words.enable|title() + ' SYN-flood '+ lang.words.protection, checked='checked') }}
</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="apache_install" title="Install Apache">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="apache_install" title="{{lang.words.install|title()}} Apache">{{lang.words.install|title()}}</span>
</td>
</tr>
</table>
@ -174,19 +174,19 @@
<table>
{% if not is_needed_tool %}
<div style="text-align: center;">
<h3>You have not installed Ansible</h3>.
<h3>{{lang.admin_page.desc.no_ansible}}</h3>.
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>
Read <a href="https://roxy-wi.org/installation#ansible" title="Installing Ansible" target="_blank">here</a> how to install Ansible.
{{lang.words.read|title()}} <a href="https://roxy-wi.org/installation#ansible" title="{{lang.words.install|title()}} Ansible" target="_blank">{{lang.words.here}}</a> {{lang.phrases.how_to_install}} Ansible.
</h4>
</div>
{% else %}
<caption><h3>Install GeoLite2</h3></caption>
<tr class="overviewHead">
<td class="padding10 first-collumn">Server</td>
<td class="padding10 first-collumn">Service</td>
<td class="padding10 first-collumn" style="width: 30%;">Current installation</td>
<td class="" style="width: 30%;" title="GeoLite2 DB is released every Tuesday. Should Roxy-WI update it?">Updating</td>
<td class="padding10 first-collumn">{{lang.words.server|title()}}</td>
<td class="padding10 first-collumn">{{lang.words.service|title()}}</td>
<td class="padding10 first-collumn" style="width: 30%;">{{lang.words.current2|title()}} {{lang.words.installation}}</td>
<td class="" style="width: 30%;" title="GeoLite2 DB is released every Tuesday. Should Roxy-WI update it?">{{lang.words.updating|title()}}</td>
<td></td>
<td></td>
</tr>
@ -211,21 +211,21 @@
{{ checkbox('updating_geoip', title="Update the database?", checked='checked') }}
</td>
<td>
<span class="ui-button ui-widget ui-corner-all" id="geoip_install" title="Install GeoLite2" style="display: none;">Install</span>
<span class="ui-button ui-widget ui-corner-all" id="geoip_install" title="{{lang.words.install|title()}} GeoLite2" style="display: none;">{{lang.words.install|title()}}</span>
</td>
</tr>
{% endif %}
</table>
<div id="ajax-geoip"></div>
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px; margin-bottom: 15px;">
Read the "how to" in this <a href="https://roxy-wi.org/howto/geoip" title="GeoLite2 description" target="_blank">article</a>
{{lang.phrases.howto_user}} {{lang.words.read}} {{lang.words.in}} {{lang.words.this2}} <a href="https://roxy-wi.org/howto/geoip" title="GeoLite2 {{lang.words.descr|title()}}" target="_blank">{{lang.words.article}}</a>
</div>
<table style="min-width: 40%;">
<tr class="overviewHead">
<th colspan=13 style="background-color: #d1ecf1; padding: 10px;">
<span id="table_metrics_head" style="position: absolute;margin-left: 43%;">Country codes</span>
<span id="show_country_codes" class="plus switcher_table_metric" title="Show country codes"></span>
<span id="hide_country_codes" class="minus switcher_table_metric" title="Hide country codes" style="display: none;"></span>
<span id="table_metrics_head" style="position: absolute;margin-left: 43%;">{{lang.admin_page.desc.country_codes|title()}}</span>
<span id="show_country_codes" class="plus switcher_table_metric" title="{{lang.words.show|title()}} {{lang.admin_page.desc.country_codes}}"></span>
<span id="hide_country_codes" class="minus switcher_table_metric" title="{{lang.words.hide|title}} {{lang.admin_page.desc.country_codes}}" style="display: none;"></span>
</th>
</tr>
</table>
@ -247,7 +247,7 @@
{% endfor %}
{% for server in servers %}
$("#slavefor-{{server.0}}" ).selectmenu({
width: 130
width: 100
});
$("#credentials-{{server.0}}" ).selectmenu({
width: 150

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block h2 %}{{ title }}{% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select %}
<script src="/inc/smon.js"></script>
@ -10,42 +12,42 @@
{% elif smon_error != '' %}
<div style="text-align: center;">
<br />
<h3>You have not installed SMON service</h3>.
<h3>{{lang.smon_page.desc.not_installed}}</h3>.
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>Read <a href="https://roxy-wi.org/services/smon" title="Simple monitoring network ports with alerting via Telegram and WEB panel" target="_blank">here</a>
how to install SMON service.</h4>
<h4>{{lang.words.read|title()}} <a href="https://roxy-wi.org/services/smon" title="Simple monitoring network ports with alerting via Telegram and WEB panel" target="_blank">{{lang.words.here}}</a>
{{lang.phrases.how_to_install}} SMON {{lang.words.service}}.</h4>
</div>
{% elif smon_status.0 == 'failed' %}
{% elif smon_status.0 == 'failed' or smon_status.0 == 'inactive' %}
<div style="text-align: center;">
<br />
<h3>SMON service is not run.</h3>
<h3>{{lang.smon_page.desc.smon_is_not_run}}</h3>
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>Run the SMON service <a href="users.py#services" title="Roxy-WI services" target="_blank">here</a> before use</h4>
<h4>{{lang.smon_page.desc.run_smon}} <a href="users.py#services" title="Roxy-WI services" target="_blank">{{lang.words.here}}</a> {{lang.smon_page.desc.before_use}}</h4>
</div>
{% elif smon|length == 0 and action != 'add' and action != 'history' and action != 'checker_history' %}
<div style="text-align: center;">
<br />
<h3>You do not have added servers in SMON service.</h3>
<h3>{{lang.smon_page.desc.not_added}}</h3>
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>Create your first server <a href="smon.py?action=add" title="Roxy-WI SMON" target="_blank">here</a> before use</h4>
<h4>{{lang.smon_page.desc.create_server}} <a href="smon.py?action=add" title="Roxy-WI SMON" target="_blank">{{lang.words.here}}</a> {{lang.smon_page.desc.before_use}}</h4>
<br />
</div>
{% elif smon|length == 0 and action != 'add' and action == 'history' %}
<div style="text-align: center;">
<br />
<h3>No events added yet.</h3>
<h3>{{lang.phrases.no_events_added}}</h3>
<img src="/inc/images/no_servers.png" alt="There is no server">
<h4>Click <a href="smon.py?action=add" title="Roxy-WI SMON" target="_blank">here</a> to see if new check have been added</h4>
<h4>Click <a href="smon.py?action=add" title="Roxy-WI SMON" target="_blank">{{lang.words.here}}</a> {{lang.smon_page.desc.see_check}}</h4>
<br />
</div>
{% elif smon|length == 0 and action != 'add' and action == 'checker_history' %}
<div style="text-align: center;">
<br />
<h3>
No events added yet. Check if there are any Checker are enabled on the "<a href="hapservers.py" title="HAProxy Overview">HAProxy Overview</a>"
or on "<a href="hapservers.py?service=nginx" title="NGINX Overview">NGINX Overview</a>"
or on "<a href="hapservers.py?service=apache" title="Apache Overview">Apache Overview</a>"
or on "<a href="hapservers.py?service=keepalived" title="Keepalived Overview">Keepalived Overview</a>" pages
{{lang.phrases.no_events_added}} Check if there are any Checker are enabled on the "<a href="hapservers.py?service=haproxy" title="HAProxy Overview">HAProxy {{lang.menu_links.hapservers.link}}</a>"
{{lang.words.or}} {{lang.words.on}} "<a href="hapservers.py?service=nginx" title="NGINX Overview">NGINX {{lang.menu_links.hapservers.link}}</a>"
{{lang.words.or}} {{lang.words.on}} "<a href="hapservers.py?service=apache" title="Apache Overview">Apache {{lang.menu_links.hapservers.link}}</a>"
{{lang.words.or}} {{lang.words.on}} "<a href="hapservers.py?service=keepalived" title="Keepalived Overview">Keepalived {{lang.menu_links.hapservers.link}}</a>" {{lang.words.pages}}
</h3>
<br />
</div>
@ -55,15 +57,15 @@
<thead>
<tr class="overviewHead">
<th class="padding10 first-collumn" style="width: 150px;">IP</th>
<th style="width: 2%;">Port</th>
<th style="width: 5%;">Enabled</th>
<th style="width: 10%;">Protocol</th>
<th style="width: 2%;">{{lang.words.port|title()}}</th>
<th style="width: 5%;">{{lang.words.enabled|title()}}</th>
<th style="width: 10%;">{{lang.words.protocol|title()}}</th>
<th style="width: 15%;">URI</th>
<th style="width: 20%;">Body</th>
<th style="width: 20%;">{{lang.words.body|title()}}</th>
<th style="width: 15%;">Telegram</th>
<th style="width: 15%;">Slack</th>
<th style="width: 10%;">Group</th>
<th style="width: 100%;">Description</th>
<th style="width: 10%;">{{lang.words.group|title()}}</th>
<th style="width: 100%;">{{lang.words.desc|title()}}</th>
<th></th>
<th></th>
</tr>
@ -76,11 +78,11 @@
{% endfor %}
</tbody>
</table>
<br /><span class="add-button" title="Add a new server" id="add-smon-button">+ Add</span>
<br /><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} {{lang.words.server}}" id="add-smon-button">+ {{lang.words.add|title()}}</span>
<br /><br />
<div id="ajax"></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://roxy-wi.org/services/smon" title="SMON service description" target="_blank">here</a>
{{lang.phrases.read_about_parameters}} <a href="https://roxy-wi.org/services/smon" title="SMON service description" target="_blank">{{lang.words.here}}</a>
</div>
<div id="smon-add-table" style="display: none;">
<table class="overview">
@ -96,7 +98,7 @@
</tr>
<tr>
<td class="padding20">
Port
{{lang.words.port|title()}}
<span class="need-field">*</span>
</td>
<td>
@ -104,13 +106,13 @@
</td>
</tr>
<tr>
<td class="padding20">Enable</td>
<td class="padding20">{{lang.words.enable|title()}}</td>
<td>
{{ checkbox('new-smon-enable', checked='checked') }}
</td>
</tr>
<tr>
<td class="padding20">Protocol</td>
<td class="padding20">{{lang.words.protocol|title()}}</td>
<td>
{% set values = dict() %}
{% set values = {'':'', 'http':'http','https':'https'} %}
@ -122,14 +124,14 @@
<td>{{ input('new-smon-uri') }}</td>
</tr>
<tr>
<td class="padding20">Body</td>
<td class="padding20">{{lang.words.body|title()}}</td>
<td>{{ input('new-smon-body') }}</td>
</tr>
<tr>
<td class="padding20">Telegram</td>
<td>
<select id="new-smon-telegram">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in telegrams %}
<option value="{{t.id}}">{{t.chanel_name}}</option>
{% endfor %}
@ -140,7 +142,7 @@
<td class="padding20">Slack</td>
<td>
<select id="new-smon-slack">
<option value="0">Disabled</option>
<option value="0">{{lang.words.disabled|title()}}</option>
{% for t in slacks %}
<option value="{{t.id}}">{{t.chanel_name}}</option>
{% endfor %}
@ -148,11 +150,11 @@
</td>
</tr>
<tr>
<td class="padding20">Group</td>
<td class="padding20">{{lang.words.group|title()}}</td>
<td>{{ input('new-smon-group') }}</td>
</tr>
<tr>
<td class="padding20">Description</td>
<td class="padding20">{{lang.words.desc|title()}}</td>
<td>{{ input('new-smon-description') }}</td>
</tr>
</table>
@ -166,4 +168,4 @@
{% endif %}
</div>
{% endif %}
{% endblock %}
{% endblock %}

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{lang.menu_links.stats.h2}} {{service_desc.service}}{% endblock %}
{% block h2 %}{{lang.menu_links.stats.h2}} {{service_desc.service}}{% endblock %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select %}
<br />
@ -20,18 +22,18 @@
{% endif %}
{% endfor %}
</select>
<a class="ui-button ui-widget ui-corner-all" id="show" title="Show stats" onclick="{{ onclick }}">Show</a>
<a class="ui-button ui-widget ui-corner-all" id="show" title="{{lang.words.show|title()}} {{lang.words.stats}}" onclick="{{ onclick }}">{{lang.words.open|title()}}</a>
{% if service != 'nginx' and service != 'apache' %}
<div id="stats_filter">
<div id="stats_filter_text">Filter:</div>
{{ checkbox('stats_active', title='Show active servers', desc='Active', checked='checked') }}
{{ checkbox('stats_drain', title='Show drain servers', desc='Drain', checked='checked') }}
{{ checkbox('stats_maintain', title='Show maintain servers', desc='Maintain', checked='checked') }}
<div id="stats_filter_text">{{lang.words.filter|title()}}:</div>
{{ checkbox('stats_active', title=lang.words.show|title()+' ' + lang.words.active + ' ' + lang.words.servers, desc=lang.words.active|title(), checked='checked') }}
{{ checkbox('stats_drain', title=lang.words.show|title()+' ' + lang.words.active + ' ' + lang.words.servers, desc=lang.words.drain|title(), checked='checked') }}
{{ checkbox('stats_maintain', title=lang.words.show|title()+' ' + lang.words.maintain + ' ' + lang.words.servers, desc=lang.words.maintain|title(), checked='checked') }}
{{ checkbox('stats_down', title='Show DOWN servers', desc='DOWN', checked='checked') }}
{{ checkbox('stats_not_checked', title='Show not checked servers', desc='Not checked', checked='checked') }}
{{ checkbox('stats_backup', title='Show backup servers', desc='Backup', checked='checked') }}
{{ checkbox('stats_frontends', title='Show frontends servers', desc='Frontends', checked='checked') }}
{{ checkbox('stats_backends', title='Show backends servers', desc='Backends', checked='checked') }}
{{ checkbox('stats_backup', title=lang.words.show|title()+' ' + lang.words.backup + ' ' + lang.words.servers, desc=lang.words.backup|title(), checked='checked') }}
{{ checkbox('stats_frontends', title=lang.words.show|title()+' ' + lang.words.frontends, desc=lang.words.frontends|title(), checked='checked') }}
{{ checkbox('stats_backends', title=lang.words.show|title()+' ' + lang.words.backends , desc=lang.words.backends|title(), checked='checked') }}
</div>
{% elif service == 'nginx' %}
<br /><br />

View File

@ -1,4 +1,6 @@
{% extends "base.html" %}
{% block title %}{{title}}{% endblock %}
{% block h2 %}{{title}}{% endblock %}
{% block content %}
<script src="/inc/waf.js"></script>
{% if manage_rules == '1' %}
@ -6,10 +8,10 @@
<table class="overview" id="waf_rules">
<tr class="overviewHead">
<td class="padding10 first-collumn">
Rule name
{{lang.words.rule_name}}
</td>
<td style="width: 100px;">Enabled</td>
<td>Description</td>
<td style="width: 100px;">{{lang.words.enabled|title()}}</td>
<td>{{lang.words.desc|title()}}</td>
<td></td>
</tr>
{% for r in rules %}
@ -25,21 +27,21 @@
</td>
<td style="padding-top: 5px;padding-bottom: 10px;">{{r.desc}}</td>
<td style="padding: 0 10px 0 10px;">
<a href="waf.py?service={{service}}&waf_rule_id={{r.id}}&serv={{serv}}" class="ui-button ui-widget ui-corner-all" title="View this rule versions">View/Edit</a>
<a href="waf.py?service={{service}}&waf_rule_id={{r.id}}&serv={{serv}}" class="ui-button ui-widget ui-corner-all" title="{{lang.words.view|title()}} {{lang.words.this4}} {{lang.words.rule}}">{{lang.words.view|title()}}/{{lang.words.edit|title()}}</a>
</td>
</tr>
{% endfor %}
</table>
<p><span class="add-button" title="Add a new WAF rule" onclick="addNewConfig()" style="margin-right: 20px;">+ Add</span></p><br><br>
<p><span class="add-button" title="{{lang.words.add|title()}} {{lang.words.w_a}} {{lang.words.new}} WAF {{lang.words.rule}}" onclick="addNewConfig()" style="margin-right: 20px;">+ {{lang.words.add|title()}}</span></p><br><br>
<div id="add-new-config" style="display: none">
<table class="overview">
{% include 'include/tr_validate_tips.html' %}
<tr>
<td class="padding20">Rule name:<span class="need-field">*</span></td>
<td class="padding20">{{lang.words.rule_name}}:<span class="need-field">*</span></td>
<td>{{ input('new_rule_name', type='text', placeholder='New protected rule', title='New protected rule') }}</td>
</tr>
<tr>
<td class="padding20">Rule description:<span class="need-field">*</span></td>
<td class="padding20">{{lang.words.desc|title()}}:<span class="need-field">*</span></td>
<td>{{ input('new_rule_description', type='text', placeholder='This rule protects again attacks', title='This rule protects again attacks') }}</td>
</tr>
</table>
@ -69,7 +71,7 @@
<script src="/inc/codemirror/mode/haproxy.js"></script>
<script src="/inc/codemirror/keymap/sublime.js"></script>
<script src="/inc/configshow.js"></script>
<h4>Config {{waf_rule_file}} from {{ serv }}</h4>
<h4>{{lang.words.config|title()}} {{waf_rule_file}} {{lang.words.from|title()}} {{ serv }}</h4>
</center>
<form action="waf.py" name="saveconfig" id="saveconfig" method="post">
<input type="hidden" value="{{ serv }}" name="serv">
@ -82,13 +84,13 @@
</div>
<p>
<center>
<a href="waf.py?manage_rules=1&serv={{serv}}" class="ui-button ui-widget ui-corner-all" title="Return to rules management">Back</a>
<a href="waf.py?manage_rules=1&serv={{serv}}" class="ui-button ui-widget ui-corner-all" title="Return to rules management">{{lang.words.back|title()}}</a>
{% if role <= 3 %}
<button type="submit" value="save" name="save" class="btn btn-default" title="Save config without reloading the service">Save</button>
<button type="submit" value="save" name="save" class="btn btn-default" title="{{lang.words.save|title()}} {{lang.words.without}} {{lang.words.reloading}}">{{lang.words.save|title()}}</button>
{% if service == 'haproxy' %}
<button type="submit" value="" name="" class="btn btn-default">Save and restart</button>
<button type="submit" value="" name="" class="btn btn-default">{{lang.phrases.save_and_restart}}</button>
{% elif service == 'nginx' %}
<button type="submit" value="" name="reload" class="btn btn-default">Save and reload</button>
<button type="submit" value="" name="reload" class="btn btn-default">{{lang.phrases.save_and_reload}}</button>
{% endif %}
{% endif %}
</center>
@ -147,16 +149,16 @@
{% else %}
<table class="overview">
<tr class="overviewHead">
<td class="padding10 first-collumn">Server</td>
<td class="padding10">Actions</td>
<td class="padding10">WAF mode</td>
<td class="padding10 first-collumn">{{lang.words.server|title()}}</td>
<td class="padding10">{{lang.words.actions|title()}}</td>
<td class="padding10">WAF {{lang.words.mode}}</td>
{% if service == 'haproxy' %}
<td>Metrics</td>
<td>{{lang.words.metrics|title()}}</td>
{% endif %}
<td>Manage rules</td>
<td>Log</td>
<td>{{lang.words.manage|title()}} {{lang.words.rules}}</td>
<td>{{lang.words.log|title()}}</td>
<td>
<a onclick="showOverviewWaf(ip, hostnamea)" title="Refresh" style="float: right; margin-right: 25px;">
<a onclick="showOverviewWaf(ip, hostnamea)" title="{{lang.words.refresh|title()}}" style="float: right; margin-right: 25px;">
<span class="refresh"></span>
</a>
</td>
@ -172,16 +174,16 @@
<script src="/inc/chart.min.js"></script>
<div id="table_metrics"></div>
<div style="padding-left: 25px;float: left;margin-top: 3px;">
<b>Time range:</b>
<b>{{lang.words.time_range|title()}}:</b>
<select title="Choose time range" id="time-range">
<option value="30">30 minutes</option>
<option value="60">1 hour</option>
<option value="180">3 hours</option>
<option value="360">6 hours</option>
<option value="720">12 hours</option>
<option value="30">30 {{lang.words.minutes}}</option>
<option value="60">1 {{lang.words.hour}}</option>
<option value="180">3 {{lang.words.hours}}</option>
<option value="360">6 {{lang.words.hours2}}</option>
<option value="720">12 {{lang.words.hours2}}</option>
</select>
</div>
<div id="refresh" style="text-align: right;margin-top: 10px;margin-right: 20px; margin-bottom: 10px;" title="Refresh metrics" onclick="showWafMetrics()">
<div id="refresh" style="text-align: right;margin-top: 10px;margin-right: 20px; margin-bottom: 10px;" title="{{lang.words.refresh|title()}}" onclick="showWafMetrics()">
<span class="refresh"></span>
</div>
{% for s in servers %}
@ -220,7 +222,7 @@
});
</script>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px; clear: both;">
Read the description and watch a video about WAF <a href="https://roxy-wi.org/description/waf" class="link" title="WAF" target="_blank">here</a>
{{lang.words.read|title()}} {{lang.words.desc}} <a href="https://roxy-wi.org/description/waf" class="link" title="WAF" target="_blank">{{lang.words.here}}</a>
</div>
{% endif %}
{% endif %}

View File

@ -22,7 +22,7 @@ user_params = roxywi_common.get_users_params()
try:
roxywi_auth.check_login(user_params['user_uuid'], user_params['token'])
except Exception as e:
print(f'error {e}')
print('error: your session is expired')
sys.exit()
roxywi_auth.page_for_admin()
@ -41,12 +41,17 @@ except Exception as e:
user_subscription = roxywi_common.return_unsubscribed_user_status()
roxywi_common.logging('Roxy-WI server', f'Cannot get a user plan: {e}', roxywi=1)
if user_params['lang'] == 'ru':
title = 'Админка'
else:
title = 'Admin area'
rendered_template = template.render(
title="Admin area: Manage users", role=user_params['role'], user=user_params['user'], users=users, groups=sql.select_groups(),
title=title, role=user_params['role'], user=user_params['user'], users=users, groups=sql.select_groups(),
servers=sql.select_servers(full=1), roles=sql.select_roles(), masters=masters, sshs=sql.select_ssh(),
settings=settings, backups=sql.select_backups(), services=services, timezones=pytz.all_timezones,
page="users.py", user_services=user_params['user_services'], ldap_enable=ldap_enable, gits=gits, guide_me=1,
user_status=user_subscription['user_status'], user_plan=user_subscription['user_plan'], token=user_params['token'],
is_needed_tool=is_needed_tool
is_needed_tool=is_needed_tool, lang=user_params['lang']
)
print(rendered_template)

View File

@ -37,7 +37,6 @@ if configver:
if service in ('haproxy', 'nginx', 'keepalived', 'apache'):
service_desc = sql.select_service(service)
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id):
title = f"Working with versions {service_desc.service} configs"
servers = roxywi_common.get_dick_permit(service=service_desc.slug)
action = f'versions.py?service={service_desc.slug}'
conf_format = 'conf'
@ -104,8 +103,9 @@ if serv is not None and form.getvalue('config') is not None:
rendered_template = template.render(
h2=1, title=title, role=user_params['role'], user=user_params['user'], select_id="serv", serv=serv, aftersave=aftersave,
h2=1, role=user_params['role'], user=user_params['user'], select_id="serv", serv=serv, aftersave=aftersave,
selects=user_params['servers'], stderr=stderr, open=form.getvalue('open'), Select=form.getvalue('del'), file=file,
configver=configver, service=service, user_services=user_params['user_services'], action=action, token=user_params['token']
configver=configver, service=service, user_services=user_params['user_services'], action=action, token=user_params['token'],
lang=user_params['lang']
)
print(rendered_template)

View File

@ -21,7 +21,7 @@ user_params = roxywi_common.get_users_params()
try:
roxywi_auth.check_login(user_params['user_uuid'], user_params['token'])
except Exception as e:
except Exception:
print('error: your session is expired')
sys.exit()
@ -74,9 +74,14 @@ if form.getvalue('type') is None:
selects.append(['roxy-wi.error.log', 'error.log'])
selects.append(['roxy-wi.access.log', 'access.log'])
if user_params['lang'] == 'ru':
title = 'Просмотр внутренних логов'
else:
title = 'View internal logs'
rendered_template = template.render(
h2=1, autorefresh=1, title="View internal logs", role=user_params['role'], user=user_params['user'], serv=serv,
h2=1, autorefresh=1, title=title, role=user_params['role'], user=user_params['user'], serv=serv,
select_id="viewlogs", selects=selects, rows=rows, grep=grep, exgrep=exgrep, hour=hour, hour1=hour1, minut=minut,
minut1=minut1, page=page, user_services=user_params['user_services'], token=user_params['token']
minut1=minut1, page=page, user_services=user_params['user_services'], token=user_params['token'], lang=user_params['lang']
)
print(rendered_template)

View File

@ -107,6 +107,6 @@ rendered_template = template.render(
h2=1, title=title, autorefresh=autorefresh, role=user_params['role'], user=user_params['user'], serv=serv, servers=servers_waf,
servers_all=servers, manage_rules=manage_rules, rules=rules, user_services=user_params['user_services'],
waf_rule_file=waf_rule_file, waf_rule_id=waf_rule_id, config=config_read, cfg=cfg, token=user_params['token'],
config_file_name=config_file_name, service=service
config_file_name=config_file_name, service=service, lang=user_params['lang']
)
print(rendered_template)

View File

@ -1596,34 +1596,49 @@ function editList(list, color) {
if (data.indexOf('error:') != '-1') {
toastr.error(data);
} else {
var cancel_word = $('#translate').attr('data-cancel');
var save_word = $('#translate').attr('data-just_save');
var delete_word = $('#translate').attr('data-delete');
var upload_and_reload = $('#translate').attr('data-upload_and_reload');
var upload_and_restart = $('#translate').attr('data-upload_and_restart');
var edit_word = $('#translate').attr('data-edit');
$('#edit_lists').text(data);
$( "#dialog-confirm-cert-edit" ).dialog({
resizable: false,
height: "auto",
width: 650,
modal: true,
title: "Edit "+color+" list "+list,
buttons: {
"Delete": function() {
$( this ).dialog( "close" );
confirmDeleting('list', list, $( this ), color);
},
"Just save": function() {
$( this ).dialog( "close" );
saveList('save', list, color);
},
"Save and reload": function() {
$( this ).dialog( "close" );
saveList('reload', list, color);
},
"Save and restart": function() {
$( this ).dialog( "close" );
saveList('restart', list, color);
},
Cancel: function() {
$( this ).dialog( "close" );
title: edit_word + " "+list,
buttons: [{
text: delete_word,
click: function () {
$(this).dialog("close");
confirmDeleting('list', list, $(this), color);
}
}
}, {
text: save_word,
click: function () {
$(this).dialog("close");
saveList('save', list, color);
}
}, {
text: upload_and_reload,
click: function () {
$(this).dialog("close");
saveList('reload', list, color);
}
}, {
text: upload_and_restart,
click: function () {
$(this).dialog("close");
saveList('restart', list, color);
}
}, {
text: cancel_word,
click: function () {
$(this).dialog("close");
}
}]
});
}
}
@ -1704,7 +1719,9 @@ function generateConfig(form_name) {
name_id = '#peers-name'
}
if(!checkIsServerFiled(serv)) return false;
if(!checkIsServerFiled(name_id, 'The name cannot be empty')) return false;
var empty_name = $('#translate').attr('data-empty_name');
var generated_title = $('#translate').attr('data-generated_config');
if(!checkIsServerFiled(name_id, empty_name)) return false;
var input = $("<input>")
.attr("name", "generateconfig").val("1").attr("type", "hidden").attr("id", "generateconfig");
$('#'+form_name +' input[name=acl_then_value]').each(function(){
@ -1738,7 +1755,7 @@ function generateConfig(form_name) {
height: "auto",
width: 650,
modal: true,
title: "Generated config",
title: generated_title,
buttons: {
Ok: function () {
$(this).dialog("close");
@ -1838,28 +1855,33 @@ function addProxy(form_name) {
});
}
function confirmDeleting(deleting_thing, id, dialog_id, color) {
var cancel_word = $('#translate').attr('data-cancel');
var delete_word = $('#translate').attr('data-delete');
$( "#dialog-confirm" ).dialog({
resizable: false,
height: "auto",
width: 400,
modal: true,
title: "Are you sure you want to delete this " + deleting_thing + " " +id + "?",
buttons: {
"Delete": function() {
title: delete_word + " " + deleting_thing + " " +id + "?",
buttons: [{
text: delete_word,
click: function () {
if (deleting_thing == "SSL cert") {
deleteSsl(id);
$(dialog_id).dialog( "close" );
$(dialog_id).dialog("close");
} else if (deleting_thing == "list") {
deleteList(id, color);
$(dialog_id).dialog( "close" );
$(dialog_id).dialog("close");
}
$( this ).dialog( "close" );
},
Cancel: function() {
$(this).dialog("close");
}
}, {
text: cancel_word,
click: function() {
$( this ).dialog( "close" );
$(dialog_id).dialog( "open" );
}
}
}]
});
}
function deleteId(id) {
@ -1962,7 +1984,8 @@ function makeid(length) {
}
function showUserlists() {
var serv = $( "#existing_userlist_serv option:selected" ).val();
if(!checkIsServerFiled(serv)) return false;
var select_id = $( "#existing_userlist_serv" );
if(!checkIsServerFiled(select_id)) return false;
$.ajax({
url: "options.py",
data: {
@ -1994,7 +2017,8 @@ function changePortCheckFromServerPort() {
$($(this)).next().val(iNum);
});
}
function checkIsServerFiled(select_id, message = 'Select a server first') {
var select_server = $('#translate').attr('data-select_server');
function checkIsServerFiled(select_id, message = select_server) {
if ($(select_id).val() == null || $(select_id).val() == '') {
toastr.warning(message);
return false;

Some files were not shown because too many files have changed in this diff Show More