mirror of https://github.com/Aidaho12/haproxy-wi
parent
7e3ee72cf0
commit
1f49943fae
|
@ -163,7 +163,7 @@ def default_values():
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
Groups.insert(name='All', description='All servers are included in this group by default').on_conflict_ignore().execute()
|
Groups.insert(name='Default', description='All servers are included in this group by default', group_id=1).on_conflict_ignore().execute()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
|
@ -179,11 +179,6 @@ def default_values():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
try:
|
|
||||||
Groups.insert(name='All', description='All servers are included in this group by default').on_conflict_ignore().execute()
|
|
||||||
except Exception as e:
|
|
||||||
print(str(e))
|
|
||||||
|
|
||||||
data_source = [
|
data_source = [
|
||||||
{'code': 'RW', 'name': 'Rwanda'},
|
{'code': 'RW', 'name': 'Rwanda'},
|
||||||
{'code': 'SO', 'name': 'Somalia'},
|
{'code': 'SO', 'name': 'Somalia'},
|
||||||
|
@ -687,6 +682,17 @@ def update_db_v_6_0(**kwargs):
|
||||||
print('Updating... DB has been updated to version 6.0.0.0')
|
print('Updating... DB has been updated to version 6.0.0.0')
|
||||||
|
|
||||||
|
|
||||||
|
def update_db_v_6_0_1(**kwargs):
|
||||||
|
query = Groups.update(name='Default').where(Groups.group_id == '1')
|
||||||
|
try:
|
||||||
|
query.execute()
|
||||||
|
except Exception as e:
|
||||||
|
print("An error occurred:", e)
|
||||||
|
else:
|
||||||
|
if kwargs.get('silent') != 1:
|
||||||
|
print("Updating... DB has been updated to version 6.0.0.0-1")
|
||||||
|
|
||||||
|
|
||||||
def update_ver():
|
def update_ver():
|
||||||
query = Version.update(version='6.0.0.0')
|
query = Version.update(version='6.0.0.0')
|
||||||
try:
|
try:
|
||||||
|
@ -713,6 +719,7 @@ def update_all():
|
||||||
update_db_v_5_4_3()
|
update_db_v_5_4_3()
|
||||||
update_db_v_5_4_3_1()
|
update_db_v_5_4_3_1()
|
||||||
update_db_v_6_0()
|
update_db_v_6_0()
|
||||||
|
update_db_v_6_0_1()
|
||||||
update_ver()
|
update_ver()
|
||||||
|
|
||||||
|
|
||||||
|
@ -734,6 +741,7 @@ def update_all_silent():
|
||||||
update_db_v_5_4_3(silent=1)
|
update_db_v_5_4_3(silent=1)
|
||||||
update_db_v_5_4_3_1(silent=1)
|
update_db_v_5_4_3_1(silent=1)
|
||||||
update_db_v_6_0(silent=1)
|
update_db_v_6_0(silent=1)
|
||||||
|
update_db_v_6_0_1(silent=1)
|
||||||
update_ver()
|
update_ver()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -716,7 +716,7 @@ def install_haproxy(server_ip, **kwargs):
|
||||||
os.system("cp scripts/%s ." % script)
|
os.system("cp scripts/%s ." % script)
|
||||||
|
|
||||||
if haproxy_ver is None:
|
if haproxy_ver is None:
|
||||||
haproxy_ver = '2.4.9-1'
|
haproxy_ver = '2.5.1-1'
|
||||||
|
|
||||||
if proxy is not None and proxy != '' and proxy != 'None':
|
if proxy is not None and proxy != '' and proxy != 'None':
|
||||||
proxy_serv = proxy
|
proxy_serv = proxy
|
||||||
|
@ -1473,7 +1473,7 @@ def get_remote_files(server_ip: str, config_dir: str, file_format: str):
|
||||||
if file_format == 'conf':
|
if file_format == 'conf':
|
||||||
commands = ['sudo ls ' + config_dir + '*/*.' + file_format]
|
commands = ['sudo ls ' + config_dir + '*/*.' + file_format]
|
||||||
else:
|
else:
|
||||||
commands = ['sudo ls ' + config_dir + '/*.' + file_format]
|
commands = ['sudo ls ' + config_dir + '|grep ' + file_format + '$']
|
||||||
config_files = ssh_command(server_ip, commands)
|
config_files = ssh_command(server_ip, commands)
|
||||||
|
|
||||||
return config_files
|
return config_files
|
||||||
|
|
|
@ -22,7 +22,7 @@ try:
|
||||||
services = '0'
|
services = '0'
|
||||||
|
|
||||||
if not stderr:
|
if not stderr:
|
||||||
if service_ver[0] == '* is not installed' or service_ver == '':
|
if service_ver[0] == ' is not installed' or service_ver == '':
|
||||||
servers = ''
|
servers = ''
|
||||||
else:
|
else:
|
||||||
if service == 'nginx':
|
if service == 'nginx':
|
||||||
|
@ -37,6 +37,12 @@ try:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
user_status, user_plan = funct.return_user_status()
|
||||||
|
except Exception as e:
|
||||||
|
user_status, user_plan = 0, 0
|
||||||
|
funct.logging('localhost', 'Cannot get a user plan: ' + str(e), haproxywi=1)
|
||||||
|
|
||||||
|
|
||||||
template = template.render(h2=1, title=title,
|
template = template.render(h2=1, title=title,
|
||||||
autorefresh=1,
|
autorefresh=1,
|
||||||
|
@ -46,5 +52,7 @@ template = template.render(h2=1, title=title,
|
||||||
services=services,
|
services=services,
|
||||||
user_services=user_services,
|
user_services=user_services,
|
||||||
service=service,
|
service=service,
|
||||||
|
user_status=user_status,
|
||||||
|
user_plan=user_plan,
|
||||||
token=token)
|
token=token)
|
||||||
print(template)
|
print(template)
|
||||||
|
|
|
@ -1748,6 +1748,7 @@ if form.getvalue('metrics_hapwi_cpu'):
|
||||||
|
|
||||||
if form.getvalue('new_metrics'):
|
if form.getvalue('new_metrics'):
|
||||||
serv = form.getvalue('server')
|
serv = form.getvalue('server')
|
||||||
|
hostname = sql.get_hostname_by_server_ip(serv)
|
||||||
time_range = form.getvalue('time_range')
|
time_range = form.getvalue('time_range')
|
||||||
metric = sql.select_metrics(serv, time_range=time_range)
|
metric = sql.select_metrics(serv, time_range=time_range)
|
||||||
metrics = {'chartData': {}}
|
metrics = {'chartData': {}}
|
||||||
|
@ -1771,7 +1772,7 @@ if form.getvalue('new_metrics'):
|
||||||
metrics['chartData']['curr_con'] = curr_con
|
metrics['chartData']['curr_con'] = curr_con
|
||||||
metrics['chartData']['curr_ssl_con'] = curr_ssl_con
|
metrics['chartData']['curr_ssl_con'] = curr_ssl_con
|
||||||
metrics['chartData']['sess_rate'] = sess_rate
|
metrics['chartData']['sess_rate'] = sess_rate
|
||||||
metrics['chartData']['server'] = server
|
metrics['chartData']['server'] = hostname + ' (' + server + ')'
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -1779,6 +1780,7 @@ if form.getvalue('new_metrics'):
|
||||||
|
|
||||||
if form.getvalue('new_http_metrics'):
|
if form.getvalue('new_http_metrics'):
|
||||||
serv = form.getvalue('server')
|
serv = form.getvalue('server')
|
||||||
|
hostname = sql.get_hostname_by_server_ip(serv)
|
||||||
time_range = form.getvalue('time_range')
|
time_range = form.getvalue('time_range')
|
||||||
metric = sql.select_metrics_http(serv, time_range=time_range)
|
metric = sql.select_metrics_http(serv, time_range=time_range)
|
||||||
metrics = {'chartData': {}}
|
metrics = {'chartData': {}}
|
||||||
|
@ -1805,7 +1807,7 @@ if form.getvalue('new_http_metrics'):
|
||||||
metrics['chartData']['http_3xx'] = http_3xx
|
metrics['chartData']['http_3xx'] = http_3xx
|
||||||
metrics['chartData']['http_4xx'] = http_4xx
|
metrics['chartData']['http_4xx'] = http_4xx
|
||||||
metrics['chartData']['http_5xx'] = http_5xx
|
metrics['chartData']['http_5xx'] = http_5xx
|
||||||
metrics['chartData']['server'] = server
|
metrics['chartData']['server'] = hostname + ' (' + server + ')'
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -1813,6 +1815,7 @@ if form.getvalue('new_http_metrics'):
|
||||||
|
|
||||||
if form.getvalue('new_waf_metrics'):
|
if form.getvalue('new_waf_metrics'):
|
||||||
serv = form.getvalue('server')
|
serv = form.getvalue('server')
|
||||||
|
hostname = sql.get_hostname_by_server_ip(serv)
|
||||||
time_range = form.getvalue('time_range')
|
time_range = form.getvalue('time_range')
|
||||||
metric = sql.select_waf_metrics(serv, time_range=time_range)
|
metric = sql.select_waf_metrics(serv, time_range=time_range)
|
||||||
metrics = {'chartData': {}}
|
metrics = {'chartData': {}}
|
||||||
|
@ -1828,7 +1831,7 @@ if form.getvalue('new_waf_metrics'):
|
||||||
|
|
||||||
metrics['chartData']['labels'] = labels
|
metrics['chartData']['labels'] = labels
|
||||||
metrics['chartData']['curr_con'] = curr_con
|
metrics['chartData']['curr_con'] = curr_con
|
||||||
metrics['chartData']['server'] = serv
|
metrics['chartData']['server'] = hostname + ' (' + serv + ')'
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -1836,6 +1839,7 @@ if form.getvalue('new_waf_metrics'):
|
||||||
|
|
||||||
if form.getvalue('new_nginx_metrics'):
|
if form.getvalue('new_nginx_metrics'):
|
||||||
serv = form.getvalue('server')
|
serv = form.getvalue('server')
|
||||||
|
hostname = sql.get_hostname_by_server_ip(serv)
|
||||||
time_range = form.getvalue('time_range')
|
time_range = form.getvalue('time_range')
|
||||||
metric = sql.select_nginx_metrics(serv, time_range=time_range)
|
metric = sql.select_nginx_metrics(serv, time_range=time_range)
|
||||||
metrics = {'chartData': {}}
|
metrics = {'chartData': {}}
|
||||||
|
@ -1851,7 +1855,7 @@ if form.getvalue('new_nginx_metrics'):
|
||||||
|
|
||||||
metrics['chartData']['labels'] = labels
|
metrics['chartData']['labels'] = labels
|
||||||
metrics['chartData']['curr_con'] = curr_con
|
metrics['chartData']['curr_con'] = curr_con
|
||||||
metrics['chartData']['server'] = serv
|
metrics['chartData']['server'] = hostname + ' (' + serv + ')'
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -3774,6 +3778,12 @@ if form.getvalue('loadchecker'):
|
||||||
services = funct.get_services_status()
|
services = funct.get_services_status()
|
||||||
groups = sql.select_groups()
|
groups = sql.select_groups()
|
||||||
page = form.getvalue('page')
|
page = form.getvalue('page')
|
||||||
|
try:
|
||||||
|
user_status, user_plan = funct.return_user_status()
|
||||||
|
except Exception as e:
|
||||||
|
user_status, user_plan = 0, 0
|
||||||
|
funct.logging('localhost', 'Cannot get a user plan: ' + str(e), haproxywi=1)
|
||||||
|
if user_status:
|
||||||
if page == 'servers.py':
|
if page == 'servers.py':
|
||||||
user_group = funct.get_user_group(id=1)
|
user_group = funct.get_user_group(id=1)
|
||||||
telegrams = sql.get_user_telegram_by_group(user_group)
|
telegrams = sql.get_user_telegram_by_group(user_group)
|
||||||
|
@ -3781,11 +3791,16 @@ if form.getvalue('loadchecker'):
|
||||||
else:
|
else:
|
||||||
telegrams = sql.select_telegram()
|
telegrams = sql.select_telegram()
|
||||||
slacks = sql.select_slack()
|
slacks = sql.select_slack()
|
||||||
|
else:
|
||||||
|
telegrams = ''
|
||||||
|
slacks = ''
|
||||||
|
|
||||||
template = template.render(services=services,
|
template = template.render(services=services,
|
||||||
telegrams=telegrams,
|
telegrams=telegrams,
|
||||||
groups=groups,
|
groups=groups,
|
||||||
slacks=slacks,
|
slacks=slacks,
|
||||||
|
user_status=user_status,
|
||||||
|
user_plan=user_plan,
|
||||||
page=page)
|
page=page)
|
||||||
print(template)
|
print(template)
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,12 @@ else:
|
||||||
cmd = "systemctl is-active roxy-wi-portscanner"
|
cmd = "systemctl is-active roxy-wi-portscanner"
|
||||||
port_scanner, port_scanner_stderr = funct.subprocess_execute(cmd)
|
port_scanner, port_scanner_stderr = funct.subprocess_execute(cmd)
|
||||||
|
|
||||||
|
try:
|
||||||
|
user_status, user_plan = funct.return_user_status()
|
||||||
|
except Exception as e:
|
||||||
|
user_status, user_plan = 0, 0
|
||||||
|
funct.logging('localhost', 'Cannot get a user plan: ' + str(e), haproxywi=1)
|
||||||
|
|
||||||
|
|
||||||
output_from_parsed_template = template.render(h2=1, autorefresh=0,
|
output_from_parsed_template = template.render(h2=1, autorefresh=0,
|
||||||
title=title,
|
title=title,
|
||||||
|
@ -53,5 +59,7 @@ output_from_parsed_template = template.render(h2=1, autorefresh=0,
|
||||||
port_scanner=''.join(port_scanner),
|
port_scanner=''.join(port_scanner),
|
||||||
port_scanner_stderr=port_scanner_stderr,
|
port_scanner_stderr=port_scanner_stderr,
|
||||||
user_services=user_services,
|
user_services=user_services,
|
||||||
|
user_status=user_status,
|
||||||
|
user_plan=user_plan,
|
||||||
token=token)
|
token=token)
|
||||||
print(output_from_parsed_template)
|
print(output_from_parsed_template)
|
||||||
|
|
|
@ -42,6 +42,11 @@ else:
|
||||||
title = "SMON Dashboard"
|
title = "SMON Dashboard"
|
||||||
autorefresh = 1
|
autorefresh = 1
|
||||||
|
|
||||||
|
try:
|
||||||
|
user_status, user_plan = funct.return_user_status()
|
||||||
|
except Exception as e:
|
||||||
|
user_status, user_plan = 0, 0
|
||||||
|
funct.logging('localhost', 'Cannot get a user plan: ' + str(e), haproxywi=1)
|
||||||
|
|
||||||
template = template.render(h2=1, title=title,
|
template = template.render(h2=1, title=title,
|
||||||
autorefresh=autorefresh,
|
autorefresh=autorefresh,
|
||||||
|
@ -56,5 +61,7 @@ template = template.render(h2=1, title=title,
|
||||||
action=action,
|
action=action,
|
||||||
sort=sort,
|
sort=sort,
|
||||||
user_services=user_services,
|
user_services=user_services,
|
||||||
|
user_status=user_status,
|
||||||
|
user_plan=user_plan,
|
||||||
token=token)
|
token=token)
|
||||||
print(template)
|
print(template)
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for group in groups %}
|
{% for group in groups %}
|
||||||
<tr id="group-{{ group.group_id }}" class="{{ loop.cycle('odd', 'even') }}">
|
<tr id="group-{{ group.group_id }}" class="{{ loop.cycle('odd', 'even') }}">
|
||||||
{% if group.name == "All" %}
|
{% if group.name == "Default" %}
|
||||||
<td class="padding10 first-collumn">{{ group.name }}</td>
|
<td class="padding10 first-collumn">{{ group.name }}</td>
|
||||||
<td>{{ group.description }}</td>
|
<td>{{ group.description }}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{% from 'include/input_macros.html' import input, select %}
|
{% from 'include/input_macros.html' import input, select %}
|
||||||
|
{% if user_status == 0 or user_plan == 'user' %}
|
||||||
|
{% include 'include/no_sub.html' %}
|
||||||
|
{% else %}
|
||||||
{% for s in services %}
|
{% for s in services %}
|
||||||
{% if s.0 == 'roxy-wi-checker' %}
|
{% if s.0 == 'roxy-wi-checker' %}
|
||||||
{% if s.3 != '* is not installed' and s.3 != '' %}
|
{% if s.3 != '* is not installed' and s.3 != '' %}
|
||||||
|
@ -122,3 +125,4 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
|
@ -61,11 +61,13 @@
|
||||||
{% if user %}
|
{% 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="Server and service status" class="overview-link">Overview</a></li>
|
||||||
{% if '1' in user_services %}
|
{% if '1' in user_services %}
|
||||||
<li class="p_menu"><a title="Actions with Haproxy" class="config-show">Haproxy</a>
|
<li class="p_menu">
|
||||||
|
<a href="/app/hapservers.py" title="HAProxy servers overview" class="config-show">Haproxy</a>
|
||||||
<ul class="v_menu">
|
<ul class="v_menu">
|
||||||
<li><a href="/app/hapservers.py" title="HAProxy servers overview" class="overview-link head-submenu">Overview</a> </li>
|
<li><a href="/app/hapservers.py" title="HAProxy servers overview" class="overview-link head-submenu">Overview</a> </li>
|
||||||
<li><a href="/app/config.py" title="Working with HAProxy configs" class="edit head-submenu">Configs</a></li>
|
<li><a href="/app/config.py" title="Working with HAProxy configs" class="edit head-submenu">Configs</a></li>
|
||||||
<li><a href="/app/viewsttats.py" title="HAProxy statistics " class="stats head-submenu">Stats</a></li>
|
<li><a href="/app/viewsttats.py" title="HAProxy statistics " class="stats head-submenu">Stats</a></li>
|
||||||
|
<li><a href="/app/logs.py" title="HAProxy logs " class="logs head-submenu">Logs</a></li>
|
||||||
<li><a href="/app/runtimeapi.py" title="Runtime API - Roxy-WI" class="runtime head-submenu">Runtime API</a></li>
|
<li><a href="/app/runtimeapi.py" title="Runtime API - Roxy-WI" class="runtime head-submenu">Runtime API</a></li>
|
||||||
<li><a href="/app/metrics.py" title="HAProxy's metrics" class="metrics head-submenu">Metrics</a></li>
|
<li><a href="/app/metrics.py" title="HAProxy's metrics" class="metrics head-submenu">Metrics</a></li>
|
||||||
{% if role <= 3 %}
|
{% if role <= 3 %}
|
||||||
|
@ -80,11 +82,12 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if '2' in user_services %}
|
{% if '2' in user_services %}
|
||||||
<li class="p_menu">
|
<li class="p_menu">
|
||||||
<a title="Actions with NGINX" class="nginx-menu">NGINX</a>
|
<a href="/app/hapservers.py?service=nginx" title="Overview NGINX servers" class="nginx-menu">NGINX</a>
|
||||||
<ul class="v_menu">
|
<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/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/config.py?service=nginx" title="Working with NGINX configs" class="edit head-submenu">Configs</a></li>
|
||||||
<li><a href="/app/viewsttats.py?service=nginx" title="NGINX statistics" class="stats head-submenu">Stats</a></li>
|
<li><a href="/app/viewsttats.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/metrics.py?service=nginx" title="NGINX's metrics" class="metrics head-submenu">Metrics</a></li>
|
||||||
{% if role <= 3 %}
|
{% if role <= 3 %}
|
||||||
<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/versions.py?service=nginx" title="Working with versions NGINX configs" class="version head-submenu">Versions</a></li>
|
||||||
|
@ -95,10 +98,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if '4' in user_services %}
|
{% if '4' in user_services %}
|
||||||
<li class="p_menu">
|
<li class="p_menu">
|
||||||
<a title="Actions with Apache" class="apache-menu">Apache</a>
|
<a href="/app/hapservers.py?service=apache" title="Overview Apache servers" class="apache-menu">Apache</a>
|
||||||
<ul class="v_menu">
|
<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/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/config.py?service=apache" title="Working with Apache configs" class="edit head-submenu">Configs</a></li>
|
||||||
|
<li><a href="/app/logs.py?service=apache" title="Apache logs " class="logs head-submenu">Logs</a></li>
|
||||||
{% if role <= 3 %}
|
{% 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/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 - Roxy-WI" class="cert head-submenu" id="add3">SSL</a></li>
|
<li><a href="/app/add.py?service=apache#ssl" title="Add proxy: Upload SSL certificates - Roxy-WI" class="cert head-submenu" id="add3">SSL</a></li>
|
||||||
|
@ -109,7 +113,7 @@
|
||||||
{% if '3' in user_services %}
|
{% if '3' in user_services %}
|
||||||
{% if role <= 2 %}
|
{% if role <= 2 %}
|
||||||
<li class="p_menu">
|
<li class="p_menu">
|
||||||
<a title="Keepalived" class="ha">Keepalived</a>
|
<a href="/app/hapservers.py?service=keepalived" title="Overview Keepalived servers" class="ha">Keepalived</a>
|
||||||
<ul class="v_menu">
|
<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/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 - Roxy-WI" class="keepalived head-submenu">HA</a></li>
|
<li><a href="/app/ha.py" title="Create and configure HA cluster - Roxy-WI" class="keepalived head-submenu">HA</a></li>
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
|
<div id="backup_tabs">
|
||||||
|
{% if user_status == 0 or user_plan == 'user' %}
|
||||||
|
{% include 'include/no_sub.html' %}
|
||||||
|
{% else %}
|
||||||
<table class="overview" id="ajax-backup-table">
|
<table class="overview" id="ajax-backup-table">
|
||||||
<tr class="overviewHead">
|
<tr class="overviewHead">
|
||||||
<td class="padding10 first-collumn">Servers</td>
|
<td class="padding10 first-collumn">Servers</td>
|
||||||
<td class="padding10">Remote server</td>
|
<td class="padding10">Remote server</td>
|
||||||
<td class="padding10">Remote folder</td>
|
<td class="padding10">Remote folder</td>
|
||||||
<td class="padding10">Backup type</td>
|
<td class="padding10">Backup type</td>
|
||||||
<td class="padding10">Period time</td>
|
<td class="padding10">Period</td>
|
||||||
<td class="padding10">Credentials</td>
|
<td class="padding10">Credentials</td>
|
||||||
<td class="padding10">Description</td>
|
<td class="padding10">Description</td>
|
||||||
<td style="margin-left: 5px;"></td>
|
<td style="margin-left: 5px;"></td>
|
||||||
|
@ -70,3 +74,6 @@
|
||||||
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
|
<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>
|
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>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
<link href="/inc/chart.min.css" rel="stylesheet">
|
<link href="/inc/chart.min.css" rel="stylesheet">
|
||||||
<script src="/inc/metrics.js"></script>
|
<script src="/inc/metrics.js"></script>
|
||||||
<script src="/inc/chart.min.js"></script>
|
<script src="/inc/chart.min.js"></script>
|
||||||
{% if services == '0' %}
|
{% if user_status == 0 or user_plan == 'user' %}
|
||||||
|
{% include 'include/no_sub.html' %}
|
||||||
|
{% elif services == '0' %}
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<br />
|
<br />
|
||||||
<h3>You have not installed Metrics service.
|
<h3>You have not installed Metrics service.
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
padding-top: 5px !important;
|
padding-top: 5px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{% if user_status == 0 or user_plan == 'user' %}
|
||||||
|
{% include 'include/no_sub.html' %}
|
||||||
|
{% else %}
|
||||||
{% if history %}
|
{% if history %}
|
||||||
{% include 'include/port_scan_history.html' %}
|
{% include 'include/port_scan_history.html' %}
|
||||||
{% elif port_scanner_stderr != '' %}
|
{% elif port_scanner_stderr != '' %}
|
||||||
|
@ -245,4 +248,5 @@
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
<script src="/inc/users.js"></script>
|
<script src="/inc/users.js"></script>
|
||||||
<script src="/inc/fontawesome.min.js"></script>
|
<script src="/inc/fontawesome.min.js"></script>
|
||||||
<script src="/inc/jquery.timeago.js" type="text/javascript"></script>
|
<script src="/inc/jquery.timeago.js" type="text/javascript"></script>
|
||||||
{% if smon_error != '' %}
|
{% if user_status == 0 or user_plan == 'user' %}
|
||||||
|
{% include 'include/no_sub.html' %}
|
||||||
|
{% elif smon_error != '' %}
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<br />
|
<br />
|
||||||
<h3>You have not installed SMON service. Read <a href="https://roxy-wi.org/services.py?service=smon"
|
<h3>You have not installed SMON service. Read <a href="https://roxy-wi.org/services.py?service=smon"
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
.add .fa-clone, .plus .fa-plus, .plus-after .fa-plus, .minus-after .fa-minus {
|
.add .fa-clone, .plus .fa-plus, .plus-after .fa-plus, .minus-after .fa-minus {
|
||||||
color: var(--green-color);
|
color: var(--green-color);
|
||||||
}
|
}
|
||||||
.plus-after > .fa-plus, .minus-after > .fa-minus {
|
.plus-after > .fa-plus, .minus-after > .fa-minus, .minus > .fa-minus, .plus > .fa-plus {
|
||||||
color: var(--blue-color);
|
color: var(--blue-color);
|
||||||
}
|
}
|
||||||
.add-proxy::before {
|
.add-proxy::before {
|
||||||
|
|
|
@ -54,6 +54,7 @@ $( function() {
|
||||||
|
|
||||||
$( "#saveconfig" ).on("click", ":submit", function(e){
|
$( "#saveconfig" ).on("click", ":submit", function(e){
|
||||||
var frm = $('#saveconfig');
|
var frm = $('#saveconfig');
|
||||||
|
var service = $('#service').val();
|
||||||
myCodeMirror.save();
|
myCodeMirror.save();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: frm.attr('action'),
|
url: frm.attr('action'),
|
||||||
|
@ -64,7 +65,7 @@ $( function() {
|
||||||
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error') != '-1' || data.indexOf('failed ') != '-1' || data.indexOf('emerg] ') != '-1') {
|
if (data.indexOf('error: ') != '-1' || data.indexOf('Fatal') != '-1' || data.indexOf('Error') != '-1' || data.indexOf('failed ') != '-1' || data.indexOf('emerg] ') != '-1') {
|
||||||
toastr.clear();
|
toastr.clear();
|
||||||
toastr.error(data);
|
toastr.error(data);
|
||||||
} else if (data.indexOf('command not found') != '-1') {
|
} else if (data.indexOf(service + ': command not found') != '-1') {
|
||||||
try {
|
try {
|
||||||
var service = findGetParameter('service');
|
var service = findGetParameter('service');
|
||||||
toastr.error('Cannot save config. There is no ' + service);
|
toastr.error('Cannot save config. There is no ' + service);
|
||||||
|
|
|
@ -42,6 +42,10 @@ $( function() {
|
||||||
show_current_page($(this))
|
show_current_page($(this))
|
||||||
} else if(cur_url[0] == 'config.py' && cur_url[1].split('&')[0] == 'service=nginx' && link2 == 'config.py?service=nginx'){
|
} else if(cur_url[0] == 'config.py' && cur_url[1].split('&')[0] == 'service=nginx' && link2 == 'config.py?service=nginx'){
|
||||||
show_current_page($(this))
|
show_current_page($(this))
|
||||||
|
} else if(cur_url[0] == 'logs.py' && cur_url[1].split('&')[0] == 'service=nginx' && link2 == 'logs.py?service=nginx'){
|
||||||
|
show_current_page($(this))
|
||||||
|
} else if(cur_url[0] == 'logs.py' && cur_url[1].split('&')[0] == 'service=apache' && link2 == 'logs.py?service=apache'){
|
||||||
|
show_current_page($(this))
|
||||||
} else if(cur_url[0] == 'hapservers.py' && cur_url[1].split('&')[0] == 'service=nginx' && link2 == 'hapservers.py?service=nginx'){
|
} else if(cur_url[0] == 'hapservers.py' && cur_url[1].split('&')[0] == 'service=nginx' && link2 == 'hapservers.py?service=nginx'){
|
||||||
show_current_page($(this))
|
show_current_page($(this))
|
||||||
} else if(cur_url[0] == 'hapservers.py' && cur_url[1].split('&')[0] == 'service=keepalived' && link2 == 'hapservers.py?service=keepalived'){
|
} else if(cur_url[0] == 'hapservers.py' && cur_url[1].split('&')[0] == 'service=keepalived' && link2 == 'hapservers.py?service=keepalived'){
|
||||||
|
|
|
@ -595,8 +595,8 @@ ul{
|
||||||
background-color: #EBF1F1 !important;
|
background-color: #EBF1F1 !important;
|
||||||
}
|
}
|
||||||
.ui-state-active {
|
.ui-state-active {
|
||||||
background-color: #4A89D8 !important;
|
background-color: #376fb6 !important;
|
||||||
border: none var(--blue-color) !important;
|
border: none var(--link-dark-blue) !important;
|
||||||
}
|
}
|
||||||
.ui-tabs-nav {
|
.ui-tabs-nav {
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
|
|
Loading…
Reference in New Issue