2018-05-05 12:40:41 +00:00
|
|
|
{% extends "base.html" %}
|
2023-02-28 13:56:14 +00:00
|
|
|
{% block title %}{{lang.menu_links.overview.title}}{% endblock %}
|
2023-02-13 14:45:45 +00:00
|
|
|
{% block h2 %}{{lang.menu_links.overview.h2}}{% endblock %}
|
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 %}
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="servers.py#servers" title="{{lang.words.manage|title()}} {{lang.words.servers}}">{{lang.words.servers|title()}}</a>
|
2021-03-01 15:03:51 +00:00
|
|
|
{% else %}
|
2023-02-13 14:45:45 +00:00
|
|
|
{{lang.words.servers|title()}}
|
2021-03-01 15:03:51 +00:00
|
|
|
{% 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%;">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="/app/hapservers.py?service=haproxy" title="HAProxy {{lang.words.servers}} {{lang.words.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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="/app/hapservers.py?service=nginx" title="NGINX {{lang.words.servers}} {{lang.words.overview}}" class="logs_link">
|
2022-04-20 08:08:36 +00:00
|
|
|
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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="/app/hapservers.py?service=apache" title="Apache {{lang.words.servers}} {{lang.words.overview}}" class="logs_link">
|
2022-04-15 09:49:00 +00:00
|
|
|
Apache
|
|
|
|
</a>
|
|
|
|
</td>
|
2021-08-18 08:38:15 +00:00
|
|
|
<td class="padding10">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="/app/hapservers.py?service=keepalived" title="Keepalived {{lang.words.servers}} {{lang.words.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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="/app/waf.py?service=haproxy" title="HAProxy WAF {{lang.words.servers}} {{lang.words.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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a onclick="showOverview(ip, hostnamea)" title="{{lang.words.refresh|title()}}" 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 %}
|
2023-02-13 14:45:45 +00:00
|
|
|
<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}}
|
2019-10-14 06:55:29 +00:00
|
|
|
</a>
|
|
|
|
{% else %}
|
2023-02-13 14:45:45 +00:00
|
|
|
Roxy-WI {{lang.words.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>
|
2023-02-13 14:45:45 +00:00
|
|
|
<a onclick="showOverviewHapWI()" title="{{lang.words.refresh|title()}}" 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-02-13 14:45:45 +00:00
|
|
|
<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}}
|
2020-07-16 08:03:08 +00:00
|
|
|
</a>
|
|
|
|
{% else %}
|
2023-02-13 14:45:45 +00:00
|
|
|
Roxy-WI {{lang.words.services_status}}
|
2022-03-26 20:23:02 +00:00
|
|
|
{% endif %}
|
2023-01-02 20:01:20 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2023-02-13 14:45:45 +00:00
|
|
|
<a onclick="showServicesOverview()" title="{{lang.words.refresh|title()}}" style="float: right; margin-right: 15px;">
|
2023-01-02 20:01:20 +00:00
|
|
|
<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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="{{admin_uri}}#users" title="{{lang.words.manage|title()}} {{lang.words.users2}}" class="logs_link">{{lang.words.login|title()}}</a>
|
2022-05-11 07:55:36 +00:00
|
|
|
</td>
|
2023-02-13 14:45:45 +00:00
|
|
|
<td class="second-collumn">{{lang.words.groups|title()}}</td>
|
|
|
|
<td>{{lang.words.role|title()}}</td>
|
2022-05-11 07:55:36 +00:00
|
|
|
<td>
|
2022-07-03 06:11:34 +00:00
|
|
|
<span class="add-button-wi" id="show_all_users" style="display: none;">
|
2023-02-13 14:45:45 +00:00
|
|
|
<span title="{{lang.words.show_all|title()}} {{lang.words.users}}" id="show-all-users" style="color: #fff">
|
|
|
|
{{lang.words.show_all|title()}}
|
2022-05-11 07:55:36 +00:00
|
|
|
</span>
|
2020-08-04 16:40:58 +00:00
|
|
|
</span>
|
2022-05-11 07:55:36 +00:00
|
|
|
</td>
|
|
|
|
<td style="padding-right: 10px;">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a onclick="showUsersOverview()" title="{{lang.words.refresh|title()}}" style="float: right;">
|
2022-05-11 07:55:36 +00:00
|
|
|
<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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<a href="users.py#groups" title="Manage groups" class="logs_link">{{lang.words.groups|title()}}</a>
|
2021-09-03 08:07:55 +00:00
|
|
|
</td>
|
2023-02-13 14:45:45 +00:00
|
|
|
<td class="second-collumn" style="width: 40%">{{lang.words.desc|title()}}</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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<span title="{{lang.words.show_all|title()}} {{lang.words.groups}}" id="show-all-groups" style="color: #fff">
|
|
|
|
{{lang.words.show_all|title()}}
|
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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<td class="padding10 first-collumn-wi">{{lang.words.role|title()}}</td>
|
|
|
|
<td class="second-collumn" style="width: 50%">{{lang.words.desc|title()}}</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>
|
2023-02-13 14:45:45 +00:00
|
|
|
<td class="third-collumn-wi">{{ lang.roles[role.name] }}</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 %}
|
2023-02-13 14:45:45 +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="{{lang.words.view|title()}} Roxy-WI {{lang.words.logs}}" class="logs_link">
|
2020-08-11 12:56:53 +00:00
|
|
|
{% else %}
|
2023-02-13 14:45:45 +00:00
|
|
|
<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">
|
2020-08-11 12:56:53 +00:00
|
|
|
{% endif %}
|
2023-03-04 12:42:26 +00:00
|
|
|
{{lang.words.recent|title()}} Roxy-WI {{lang.words.logs}}
|
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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<span title="{{lang.words.show|title()}} {{lang.words.more}}" id="show-all-haproxy-wi-log" style="color: #fff">
|
|
|
|
{{lang.words.show_all|title()}}
|
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">
|
2023-02-13 14:45:45 +00:00
|
|
|
<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>
|
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 %}
|