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 %}
|
2024-02-04 07:28:17 +00:00
|
|
|
<link href="{{ url_for('static', filename='css/chart.min.css') }}" rel="stylesheet">
|
2023-09-17 09:42:39 +00:00
|
|
|
<script src="/inc/metrics.js"></script>
|
2023-07-17 06:15:55 +00:00
|
|
|
<script src="/inc/chart.min-4.3.0.js"></script>
|
2023-09-17 09:42:39 +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 = []
|
2024-02-04 07:28:17 +00:00
|
|
|
{% for s in g.user_params['servers'] %}
|
2019-12-27 04:31:09 +00:00
|
|
|
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">
|
2024-02-04 07:28:17 +00:00
|
|
|
{% if g.user_params['role'] <= 2 %}
|
2023-09-17 09:42:39 +00:00
|
|
|
<a href="servers#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-09-17 09:42:39 +00:00
|
|
|
<a href="/app/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-09-17 09:42:39 +00:00
|
|
|
<a href="/app/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-09-17 09:42:39 +00:00
|
|
|
<a href="/app/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-09-17 09:42:39 +00:00
|
|
|
<a href="/app/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-09-17 09:42:39 +00:00
|
|
|
<a href="/app/waf/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>
|
2024-02-04 07:28:17 +00:00
|
|
|
{% for s in g.user_params['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">
|
2024-02-04 07:28:17 +00:00
|
|
|
{% if g.user_params['role'] <= 1 %}
|
2023-10-16 10:12:36 +00:00
|
|
|
<a href="/app/logs/internal" title="{{lang.words.view|title()}} Roxy-WI {{lang.words.logs}}" class="logs_link">
|
2023-02-13 14:45:45 +00:00
|
|
|
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>
|
2024-02-04 07:28:17 +00:00
|
|
|
{% if g.user_params['role'] <= 1 %}
|
2023-10-16 10:12:36 +00:00
|
|
|
<a href="admin#tools" title="{{lang.words.view|title()}} {{lang.words.services}} {{lang.words.status}}" class="logs_link">
|
2023-02-13 14:45:45 +00:00
|
|
|
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>
|
2024-02-04 07:28:17 +00:00
|
|
|
{% if g.user_params['role'] <= 2 %}
|
|
|
|
{% if g.user_params['role'] == 2 %}
|
2023-09-17 09:42:39 +00:00
|
|
|
{% set admin_uri = 'servers' %}
|
2024-02-04 07:28:17 +00:00
|
|
|
{% elif g.user_params['role'] == 1 %}
|
2024-01-17 06:08:27 +00:00
|
|
|
{% set admin_uri = 'admin' %}
|
2021-09-03 08:07:55 +00:00
|
|
|
{% 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-04-02 16:58:55 +00:00
|
|
|
<span id="show-all-users">
|
|
|
|
{{lang.words.show_all}}
|
|
|
|
</span>
|
|
|
|
<span id="hide-all-users" style="display: none;">
|
|
|
|
{{lang.words.hide|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 %}
|
2024-02-04 07:28:17 +00:00
|
|
|
{% if g.user_params['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">
|
2024-01-17 06:08:27 +00:00
|
|
|
<a href="/app/users#groups" title="{{lang.words.manage|title()}} {{lang.words.groups3}}" 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-04-02 16:58:55 +00:00
|
|
|
<span id="show-all-groups">
|
|
|
|
{{lang.words.show_all}}
|
|
|
|
</span>
|
|
|
|
<span id="hide-all-groups" style="display: none;">
|
|
|
|
{{lang.words.hide|title()}} {{lang.words.groups}}
|
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>
|
|
|
|
|
2023-04-02 16:58:55 +00:00
|
|
|
<table class="overview-wi" id="overview-roles">
|
2019-09-23 11:18:38 +00:00
|
|
|
<tr class="overviewHead">
|
2023-02-13 14:45:45 +00:00
|
|
|
<td class="padding10 first-collumn-wi">{{lang.words.role|title()}}</td>
|
2023-04-02 16:58:55 +00:00
|
|
|
<td class="second-collumn" style="width: 60%">{{lang.words.desc|title()}}</td>
|
|
|
|
</tr>
|
2019-09-23 11:18:38 +00:00
|
|
|
{% 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
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2020-08-11 09:54:03 +00:00
|
|
|
{% endif %}
|
2024-02-04 07:28:17 +00:00
|
|
|
{% if g.user_params['role'] <= 2 %}
|
2023-10-16 10:12:36 +00:00
|
|
|
<script>ShowOverviewLogs();</script>
|
|
|
|
<table class="overview-wi" id="overview-logs"></table>
|
2022-04-24 07:08:45 +00:00
|
|
|
{% endif %}
|
2024-02-04 07:28:17 +00:00
|
|
|
{% if g.user_params['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>
|
2023-10-16 10:12:36 +00:00
|
|
|
<td style="padding-right: 10px;">
|
|
|
|
<a onclick="showSubOverview()" title="{{lang.words.refresh|title()}}" style="float: right;">
|
|
|
|
<span class="refresh"></span>
|
|
|
|
</a>
|
|
|
|
</td>
|
2022-04-24 07:08:45 +00:00
|
|
|
</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 %}
|