2018-05-05 12:40:41 +00:00
|
|
|
{% extends "base.html" %}
|
2021-02-27 18:21:07 +00:00
|
|
|
{% block content %}
|
2022-09-25 18:20:46 +00:00
|
|
|
<link href="/inc/css/chart.min.css" rel="stylesheet">
|
2020-05-10 06:17:07 +00:00
|
|
|
<script src="/inc/metrics.js"></script>
|
|
|
|
<script src="/inc/chart.min.js"></script>
|
2019-12-27 04:31:09 +00:00
|
|
|
<script src="/inc/overview.js"></script>
|
2018-05-05 12:40:41 +00:00
|
|
|
<script>
|
2018-09-07 07:44:23 +00:00
|
|
|
$("#secIntervals").css("display", "none");
|
2019-12-27 04:31:09 +00:00
|
|
|
var ip = []
|
|
|
|
var hostnamea = []
|
|
|
|
{% for s in servers %}
|
|
|
|
ip.push("{{s[2]}}")
|
2021-07-01 07:19:23 +00:00
|
|
|
var host = "{{s[2]}}"
|
2020-03-19 13:11:35 +00:00
|
|
|
host = host.replace(/\./g, '\\.');
|
2021-07-01 07:19:23 +00:00
|
|
|
host = host.replace(/ /g, '');
|
2020-03-19 13:11:35 +00:00
|
|
|
hostnamea.push(host)
|
2019-12-27 04:31:09 +00:00
|
|
|
{% endfor %}
|
2018-05-09 12:21:09 +00:00
|
|
|
</script>
|
2020-02-08 16:29:46 +00:00
|
|
|
<style>
|
|
|
|
.fa-sync-alt { margin-bottom: -1px; }
|
|
|
|
</style>
|
2022-11-28 07:47:18 +00:00
|
|
|
<table class="overview-wi" id="overview-roxy-wi">
|
2019-09-23 11:18:38 +00:00
|
|
|
<tr class="overviewHead">
|
|
|
|
<td class="padding10 first-collumn-wi">
|
2021-03-01 15:03:51 +00:00
|
|
|
{% if role <= 2 %}
|
|
|
|
<a href="servers.py#servers" title="Manage servers">Servers</a>
|
|
|
|
{% else %}
|
|
|
|
Server
|
|
|
|
{% endif %}
|
2019-10-05 20:41:07 +00:00
|
|
|
</td>
|
2021-08-18 08:38:15 +00:00
|
|
|
<td class="padding10 third-collumn-wi" style="width: 20%;">
|
2022-11-14 09:33:59 +00:00
|
|
|
<a href="/app/hapservers.py?service=haproxy" title="HAProxy servers overview" class="logs_link">
|
2019-10-14 06:55:29 +00:00
|
|
|
HAProxy
|
|
|
|
</a>
|
2019-09-23 11:18:38 +00:00
|
|
|
</td>
|
2021-08-18 08:38:15 +00:00
|
|
|
<td class="padding10">
|
2022-04-20 08:08:36 +00:00
|
|
|
<a href="/app/hapservers.py?service=nginx" title="NGINX servers overview" class="logs_link">
|
|
|
|
NGINX
|
2020-02-05 11:37:40 +00:00
|
|
|
</a>
|
2020-02-05 08:15:57 +00:00
|
|
|
</td>
|
2022-04-15 09:49:00 +00:00
|
|
|
<td class="padding10">
|
|
|
|
<a href="/app/hapservers.py?service=apache" title="Apache servers overview" class="logs_link">
|
|
|
|
Apache
|
|
|
|
</a>
|
|
|
|
</td>
|
2021-08-18 08:38:15 +00:00
|
|
|
<td class="padding10">
|
2021-10-26 14:26:19 +00:00
|
|
|
<a href="/app/hapservers.py?service=keepalived" title="Keepalived servers overview" class="logs_link">
|
2021-08-18 08:38:15 +00:00
|
|
|
Keepalived
|
|
|
|
</a>
|
2020-02-02 14:23:00 +00:00
|
|
|
</td>
|
2019-09-23 11:18:38 +00:00
|
|
|
<td class="padding10">
|
2022-11-14 09:33:59 +00:00
|
|
|
<a href="/app/waf.py?service=haproxy" title="HAProxy WAF servers overview" class="logs_link">
|
2019-10-14 06:55:29 +00:00
|
|
|
WAF
|
|
|
|
</a>
|
2021-02-27 18:21:07 +00:00
|
|
|
</td>
|
|
|
|
<td class="padding10">
|
2021-02-28 07:18:17 +00:00
|
|
|
<a onclick="showOverview(ip, hostnamea)" title="Refresh" style="float: right;">
|
2022-04-27 18:10:26 +00:00
|
|
|
<span class="refresh"></span>
|
2020-02-08 16:29:46 +00:00
|
|
|
</a>
|
2019-09-23 11:18:38 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2019-12-27 04:31:09 +00:00
|
|
|
{% for s in servers %}
|
2021-07-01 07:19:23 +00:00
|
|
|
<tr class="{{ loop.cycle('odd', 'even') }}" id="{{s[2]}}"></tr>
|
2019-12-27 04:31:09 +00:00
|
|
|
{% endfor %}
|
2019-09-23 11:18:38 +00:00
|
|
|
</table>
|
2022-11-28 07:47:18 +00:00
|
|
|
<table class="overview-wi" id="overview-load">
|
2021-09-15 05:40:51 +00:00
|
|
|
<tr class="overviewHead" style="height: 30px;">
|
2020-07-02 14:44:13 +00:00
|
|
|
<td class="padding10 first-collumn-wi" colspan="2">
|
2019-10-14 06:55:29 +00:00
|
|
|
{% if role <= 1 %}
|
2022-07-05 19:53:33 +00:00
|
|
|
<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">
|
2021-06-02 07:28:07 +00:00
|
|
|
Roxy-WI server status
|
2019-10-14 06:55:29 +00:00
|
|
|
</a>
|
|
|
|
{% else %}
|
2021-06-02 07:28:07 +00:00
|
|
|
Roxy-WI server status
|
2019-10-14 06:55:29 +00:00
|
|
|
{% endif %}
|
2019-10-04 17:04:25 +00:00
|
|
|
</td>
|
2019-10-04 19:20:09 +00:00
|
|
|
<td>
|
2021-02-28 07:18:17 +00:00
|
|
|
<a onclick="showOverviewHapWI()" title="Refresh" style="float: right; margin-right: 15px;">
|
2022-04-27 18:10:26 +00:00
|
|
|
<span class="refresh"></span>
|
2020-02-08 16:29:46 +00:00
|
|
|
</a>
|
2019-10-04 19:20:09 +00:00
|
|
|
</td>
|
2019-10-04 16:58:47 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-02-28 05:55:24 +00:00
|
|
|
<td style="width:100%" colspan="3">
|
2021-02-27 18:21:07 +00:00
|
|
|
<div id="cpu_div" style="height: 140px;width: 50%;float: left; margin:0; padding:0;">
|
2020-05-10 06:17:07 +00:00
|
|
|
<canvas id="cpu" role="img"></canvas>
|
|
|
|
</div>
|
2021-02-27 18:21:07 +00:00
|
|
|
<div id="ram_div" style="height: 140px;width: 50%;float: right;margin:0; padding:0;">
|
2020-05-10 06:17:07 +00:00
|
|
|
<canvas id="ram" role="img"></canvas>
|
|
|
|
</div>
|
2019-10-04 16:58:47 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2022-11-28 07:47:18 +00:00
|
|
|
<table class="overview-wi" id="overview-services">
|
2023-01-02 20:01:20 +00:00
|
|
|
<thead>
|
|
|
|
<tr class="overviewHead">
|
|
|
|
<td class="padding10 first-collumn-wi" colspan=2>
|
2020-08-23 14:54:09 +00:00
|
|
|
{% if role <= 1 %}
|
2023-01-02 20:01:20 +00:00
|
|
|
<a href="/app/users.py#services" title="View services status" class="logs_link">
|
|
|
|
Roxy-WI services status
|
2020-07-16 08:03:08 +00:00
|
|
|
</a>
|
|
|
|
{% else %}
|
2023-01-02 20:01:20 +00:00
|
|
|
Roxy-WI services status
|
2022-03-26 20:23:02 +00:00
|
|
|
{% endif %}
|
2023-01-02 20:01:20 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a onclick="showServicesOverview()" title="Refresh" style="float: right; margin-right: 15px;">
|
|
|
|
<span class="refresh"></span>
|
2021-04-03 04:10:37 +00:00
|
|
|
</a>
|
2023-01-02 20:01:20 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="services_ovw"></tbody>
|
2019-09-23 11:18:38 +00:00
|
|
|
</table>
|
2020-08-11 06:44:03 +00:00
|
|
|
{% if role <= 2 %}
|
2021-09-03 08:07:55 +00:00
|
|
|
{% if role == 2 %}
|
|
|
|
{% set admin_uri = 'servers.py' %}
|
|
|
|
{% elif role == 1 %}
|
|
|
|
{% set admin_uri = 'users.py' %}
|
|
|
|
{% endif %}
|
2022-11-28 07:47:18 +00:00
|
|
|
<table class="overview-wi" id="overview-users">
|
2022-05-11 07:55:36 +00:00
|
|
|
<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>
|
|
|
|
</td>
|
|
|
|
<td class="second-collumn">Groups</td>
|
|
|
|
<td>Role</td>
|
|
|
|
<td>
|
2022-07-03 06:11:34 +00:00
|
|
|
<span class="add-button-wi" id="show_all_users" style="display: none;">
|
2022-05-11 07:55:36 +00:00
|
|
|
<span title="Show all users" id="show-all-users" style="color: #fff">
|
|
|
|
Show all
|
|
|
|
</span>
|
2020-08-04 16:40:58 +00:00
|
|
|
</span>
|
2022-05-11 07:55:36 +00:00
|
|
|
</td>
|
|
|
|
<td style="padding-right: 10px;">
|
|
|
|
<a onclick="showUsersOverview()" title="Refresh" style="float: right;">
|
|
|
|
<span class="refresh"></span>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2021-09-15 05:40:51 +00:00
|
|
|
<tbody id="users-table"></tbody>
|
2018-05-09 12:21:09 +00:00
|
|
|
</table>
|
2020-08-11 06:44:03 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if role <= 1 %}
|
2022-11-28 07:47:18 +00:00
|
|
|
<table class="overview-wi" id="overview-groups">
|
2019-09-23 11:18:38 +00:00
|
|
|
<tr class="overviewHead">
|
2021-09-03 08:07:55 +00:00
|
|
|
<td class="padding10 first-collumn-wi">
|
|
|
|
<a href="users.py#groups" title="Manage groups" class="logs_link">Group</a>
|
|
|
|
</td>
|
2020-07-19 04:08:15 +00:00
|
|
|
<td class="second-collumn" style="width: 40%">Description</td>
|
2019-10-04 16:58:47 +00:00
|
|
|
<td>
|
2022-07-03 06:11:34 +00:00
|
|
|
{% if groups|length > 3 %}
|
2021-09-15 05:40:51 +00:00
|
|
|
<span class="add-button-wi">
|
2020-08-04 16:40:58 +00:00
|
|
|
<span title="Show all groups" id="show-all-groups" style="color: #fff">
|
2019-10-04 16:58:47 +00:00
|
|
|
Show all
|
2020-08-04 16:40:58 +00:00
|
|
|
</span>
|
2019-10-04 16:58:47 +00:00
|
|
|
</span>
|
2022-07-03 06:11:34 +00:00
|
|
|
{% endif %}
|
2019-10-04 16:58:47 +00:00
|
|
|
</td>
|
2019-09-23 11:18:38 +00:00
|
|
|
</tr>
|
2019-10-04 16:58:47 +00:00
|
|
|
{% set counter = 0 -%}
|
2019-09-23 11:18:38 +00:00
|
|
|
{% for group in groups %}
|
2019-10-04 16:58:47 +00:00
|
|
|
{% set counter = counter + loop.index0 %}
|
|
|
|
{% if counter <= 2 %}
|
2019-09-23 11:18:38 +00:00
|
|
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
|
|
|
<td class="padding10 first-collumn-wi">
|
2021-09-03 08:07:55 +00:00
|
|
|
{{ group.name }}
|
2019-09-23 11:18:38 +00:00
|
|
|
</td>
|
2021-08-18 08:38:15 +00:00
|
|
|
<td class="third-collumn-wi" colspan="2">{{ group.description }}</td>
|
2019-10-04 16:58:47 +00:00
|
|
|
</tr>
|
|
|
|
{% else %}
|
|
|
|
<tr style="display: none;" class="show-groups {{ loop.cycle('odd', 'even') }}">
|
2021-09-03 08:07:55 +00:00
|
|
|
<td class="padding10 first-collumn-wi">
|
|
|
|
{{ group.name }}
|
2019-10-04 16:58:47 +00:00
|
|
|
</td>
|
2021-08-18 08:38:15 +00:00
|
|
|
<td class="third-collumn-wi" colspan="2">{{ group.description }}</td>
|
2019-09-23 11:18:38 +00:00
|
|
|
</tr>
|
2019-10-04 16:58:47 +00:00
|
|
|
{% endif %}
|
2019-09-23 11:18:38 +00:00
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table class="overview-wi">
|
|
|
|
<tr class="overviewHead">
|
|
|
|
<td class="padding10 first-collumn-wi">Role</td>
|
2020-07-19 04:08:15 +00:00
|
|
|
<td class="second-collumn" style="width: 50%">Description</td>
|
2019-09-23 11:18:38 +00:00
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
{% for role in roles %}
|
|
|
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
|
|
|
<td class="padding10 first-collumn-wi">
|
2021-08-18 08:38:15 +00:00
|
|
|
{{ role.name }}
|
2019-09-23 11:18:38 +00:00
|
|
|
</td>
|
2021-08-18 08:38:15 +00:00
|
|
|
<td class="third-collumn-wi">{{ role.description }}</td>
|
2019-09-23 11:18:38 +00:00
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2020-08-11 09:54:03 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if role <= 2 %}
|
2022-11-28 07:47:18 +00:00
|
|
|
<table class="overview-wi" id="overview-logs">
|
2019-12-08 10:44:23 +00:00
|
|
|
<tr class="overviewHead">
|
2020-03-05 18:56:13 +00:00
|
|
|
<td class="padding10 first-collumn-wi">
|
2020-08-11 12:56:53 +00:00
|
|
|
{% if role == 2 %}
|
2022-07-05 19:53:33 +00:00
|
|
|
<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">
|
2020-08-11 12:56:53 +00:00
|
|
|
{% else %}
|
2022-07-05 19:53:33 +00:00
|
|
|
<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">
|
2020-08-11 12:56:53 +00:00
|
|
|
{% endif %}
|
2021-06-02 07:28:07 +00:00
|
|
|
Recent Roxy-WI log
|
2020-03-05 18:56:13 +00:00
|
|
|
</a>
|
|
|
|
</td>
|
2019-12-08 10:44:23 +00:00
|
|
|
<td>
|
2022-07-05 19:53:33 +00:00
|
|
|
{% if roxy_wi_log|length > 3 %}
|
2019-12-08 10:44:23 +00:00
|
|
|
<span class="add-button-wi">
|
2020-08-04 16:40:58 +00:00
|
|
|
<span title="Show more log" id="show-all-haproxy-wi-log" style="color: #fff">
|
2022-03-26 20:23:02 +00:00
|
|
|
Show more log
|
2020-08-04 16:40:58 +00:00
|
|
|
</span>
|
2019-12-08 10:44:23 +00:00
|
|
|
</span>
|
2022-07-03 06:11:34 +00:00
|
|
|
{% endif %}
|
2019-12-08 10:44:23 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
{% set counter = 0 -%}
|
2022-07-05 19:53:33 +00:00
|
|
|
{% for log in roxy_wi_log %}
|
2019-12-08 10:44:23 +00:00
|
|
|
{% set counter = counter + loop.index0 %}
|
|
|
|
{% if counter <= 2 %}
|
|
|
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
|
|
|
<td class="padding10 first-collumn-wi" style="font-size: 12.5px;" colspan="2">
|
2022-07-03 06:11:34 +00:00
|
|
|
{{ log }}
|
2019-12-08 10:44:23 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% else %}
|
2022-07-03 06:11:34 +00:00
|
|
|
<tr style="display: none;" class="show-haproxy-wi-log {{ loop.cycle('odd', 'even') }}">
|
2019-12-08 10:44:23 +00:00
|
|
|
<td class="padding10 first-collumn-wi" style="font-size: 12.5px" colspan="2">
|
2022-07-03 06:11:34 +00:00
|
|
|
{{ log }}
|
2019-12-08 10:44:23 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
</table>
|
2022-04-24 07:08:45 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if role <= 1 %}
|
2022-11-28 07:47:18 +00:00
|
|
|
<table class="overview-wi" id="overview-subs">
|
2022-04-24 07:08:45 +00:00
|
|
|
<tr class="overviewHead" style="height: 30px;">
|
|
|
|
<td class="padding10 first-collumn-wi" colspan="2">
|
2022-11-14 09:33:59 +00:00
|
|
|
<a href="https://roxy-wi.org/cabinet" title="Personal cabinet" class="logs_link" target="_blank">Subscription</a>
|
2022-04-24 07:08:45 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tbody id="sub-table"></tbody>
|
|
|
|
</table>
|
2018-05-09 12:21:09 +00:00
|
|
|
{% endif %}
|
2018-05-10 17:25:45 +00:00
|
|
|
<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>
|
2018-05-09 12:21:09 +00:00
|
|
|
<script>
|
2022-11-28 07:47:18 +00:00
|
|
|
showOverview(ip, hostnamea);
|
2018-05-05 12:40:41 +00:00
|
|
|
</script>
|
2022-11-28 07:47:18 +00:00
|
|
|
{% include 'include/intro/ovw.html' %}
|
2022-12-06 18:29:14 +00:00
|
|
|
{% include 'include/intro/js_script.html' %}
|
2020-05-10 06:17:07 +00:00
|
|
|
{% endblock %}
|