mirror of https://github.com/Aidaho12/haproxy-wi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
289 lines
9.3 KiB
289 lines
9.3 KiB
{% extends "base.html" %}
|
|
{% block content %}
|
|
<script>
|
|
$("#secIntervals").css("display", "none");
|
|
</script>
|
|
<table class="overview-wi">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn-wi">
|
|
Server
|
|
</td>
|
|
<td class="padding10 third-collumn-wi" style="width: 35%;">
|
|
<a href="/app/hapservers.py" title="HAProxy servers overview" class="logs_link">
|
|
HAProxy
|
|
</a>
|
|
</td>
|
|
<td class="padding10">
|
|
<a href="/app/waf.py" title="WAf servers overview" class="logs_link">
|
|
WAF
|
|
</a>
|
|
</td class="padding10">
|
|
<td>
|
|
<a onclick="showOverview()" title="Refresh" style="float: right; margin-right: 25px;"><img src="/inc/images/update.png" alt="restart" class="icon"></a>
|
|
</td>
|
|
</tr>
|
|
<tbody id="ajaxstatus"></tbody>
|
|
</table>
|
|
<table class="overview-wi" style="height: 170;">
|
|
<tr class="overviewHead" style="height: 40px;">
|
|
<td class="padding10 first-collumn-wi">
|
|
{% if role <= 1 %}
|
|
<a href="/app/viewlogs.py?viewlogs=haproxy-wi-{{date}}.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View HAProxy-WI logs" class="logs_link">
|
|
HAProxy-WI server status
|
|
</a>
|
|
{% else %}
|
|
HAProxy-WI server status
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a onclick="showOverviewHapWI()" title="Refresh" style="float: right; margin-right: 25px;"><img src="/inc/images/update.png" alt="restart" class="icon"></a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:90%" colspan="2">
|
|
<pre style="margin: 0;" id="ajaxHapwi">
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="overview-wi" style="height: 165;">
|
|
<tr class="overviewHead" style="height: 40px;">
|
|
<th class="padding10 first-collumn-wi" colspan=4>
|
|
Tools status
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding10 first-collumn-wi">
|
|
{% if metrics_master|int() >= 1 %}
|
|
<span title="running {{ metrics_master }} master processes"><span class="serverUp server-status"></span></span>
|
|
{% else %}
|
|
<span class="serverDown server-status"></span>
|
|
{% endif %}
|
|
{% if role <= 1 %}
|
|
<a href="/app/viewlogs.py?viewlogs=metrics-{{date}}.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View metrics master's logs" class="logs_link">
|
|
<span>Metrics master</span>
|
|
</a>
|
|
{% else %}
|
|
<span>Metrics master</span>
|
|
{% endif %}
|
|
</td>
|
|
<td class="third-collumn-wi">
|
|
{% if checker_master|int() >= 1 %}
|
|
<span title="running {{ checker_master }} master processes"><span class="serverUp server-status"></span></span>
|
|
{% else %}
|
|
<span class="serverDown server-status"></span>
|
|
{% endif %}
|
|
{% if role <= 1 %}
|
|
<a href="/app/viewlogs.py?viewlogs=checker-{{date}}.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View checker master's logs" class="logs_link">
|
|
<span>Checker master</span>
|
|
</a>
|
|
{% else %}
|
|
<span>Checker master</span>
|
|
{% endif %}
|
|
</td>
|
|
<td class="third-collumn-wi">
|
|
{% if keep_alive|int() >= 1 %}
|
|
<span title="running {{ keep_alive }} processe"><span class="serverUp server-status"></span></span>
|
|
{% else %}
|
|
<span class="serverDown server-status"></span>
|
|
{% endif %}
|
|
{% if role <= 1 %}
|
|
<a href="/app/viewlogs.py?viewlogs=keep_alive.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View keep alive logs" class="logs_link">
|
|
<span>Keep alive</span>
|
|
</a>
|
|
{% else %}
|
|
<span>Keep alive</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding10 first-collumn-wi">
|
|
{% if metrics_worker|int() >= 1 %}
|
|
<span title="running {{metrics_worker}} worker processes"><span class="serverUp server-status"></span>
|
|
{% else %}
|
|
<span title="running {{metrics_worker}} worker processes"><span class="serverDown server-status"></span>
|
|
{% endif %}
|
|
{% if role <= 1 %}
|
|
<a href="/app/viewlogs.py?viewlogs=metrics-error.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View worker's logs" class="logs_link">
|
|
<span>Metrics workers</span>
|
|
</a>
|
|
{% else %}
|
|
<span>Metrics workers</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if checker_worker|int() >= 1 %}
|
|
<span title="running {{ checker_worker }} worker processes"><span class="serverUp server-status"></span>
|
|
{% else %}
|
|
<span title="running {{ checker_worker }} worker processes"><span class="serverDown server-status"></span>
|
|
{% endif %}
|
|
{% if role <= 1 %}
|
|
<a href="/app/viewlogs.py?viewlogs=checker-error.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View checker's logs" class="logs_link">
|
|
<span>Checker workers</span>
|
|
</a>
|
|
{% else %}
|
|
<span>Checker workers</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if api|int() == 0 %}
|
|
<span class="serverNone server-status" title="REST API does not work"></span>
|
|
{% else %}
|
|
<span class="serverUp server-status" title="running {{api }} processes"></span>
|
|
{% endif %}
|
|
<a href="https://haproxy-wi.org/description.py?description=api" title="Read about REST API on HAProxy-WI.org" target="_blank" class="logs_link">
|
|
API
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{% if role <= 1 %}
|
|
<table class="overview-wi">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn-wi">Login</td>
|
|
<td class="second-collumn">Group</td>
|
|
<td>Role</td>
|
|
<td>
|
|
<span class="add-button-wi">
|
|
<a title="Show all users" id="show-all-users" style="color: #fff">
|
|
Show all
|
|
</a>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
{% set counter = 0 -%}
|
|
{% for USER in users %}
|
|
{% set counter = counter + loop.index0 %}
|
|
{% if counter <= 2 %}
|
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
|
<td class="padding10 first-collumn-wi">
|
|
<a href="users.py#users" title="Edit user" class="logs_link">
|
|
{{ USER.1 }}
|
|
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
|
|
</a>
|
|
</td>
|
|
{% for group in groups %}
|
|
{% if USER.5 == group.0|string() %}
|
|
<td class="third-collumn-wi">{{ group.1 }}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<td colspan="2">{{ USER.4 }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr style="display: none;" class="show-users {{ loop.cycle('odd', 'even') }}">
|
|
<td class="padding10 first-collumn-wi">
|
|
<a href="users.py#users" title="Edit user" class="logs_link">
|
|
{{ USER.1 }}
|
|
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
|
|
</a>
|
|
</td>
|
|
{% for group in groups %}
|
|
{% if group.0|string() == USER.5 %}
|
|
<td class="third-collumn-wi">{{ group.1 }}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<td colspan="2">{{ USER.4 }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
|
|
<table class="overview-wi">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn-wi">Group</td>
|
|
<td class="second-collumn" style="width: 40%">Desctiption</td>
|
|
<td>
|
|
<span class="add-button-wi">
|
|
<a title="Show all groups" id="show-all-groups" style="color: #fff">
|
|
Show all
|
|
</a>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
{% set counter = 0 -%}
|
|
{% for group in groups %}
|
|
{% set counter = counter + loop.index0 %}
|
|
{% if counter <= 2 %}
|
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
|
<td class="padding10 first-collumn-wi">
|
|
<a href="users.py#groups" title="Edit groups" class="logs_link">
|
|
{{ group.1 }}
|
|
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
|
|
</a>
|
|
</td>
|
|
<td class="third-collumn-wi" colspan="2">{{ group.2 }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr style="display: none;" class="show-groups {{ loop.cycle('odd', 'even') }}">
|
|
<td class="padding10 first-collumn-wi">
|
|
<a href="users.py#groups" title="Edit groups" class="logs_link">
|
|
{{ group.1 }}
|
|
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
|
|
</a>
|
|
</td>
|
|
<td class="third-collumn-wi" colspan="2">{{ group.2 }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
|
|
<table class="overview-wi">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn-wi">Role</td>
|
|
<td class="second-collumn" style="width: 50%">Desctiption</td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
{% for role in roles %}
|
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
|
<td class="padding10 first-collumn-wi">
|
|
{{ role.1 }}
|
|
</td>
|
|
<td class="third-collumn-wi">{{ role.2 }}</td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
<table class="overview-wi">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn-wi">Recent HAProxy-WI`s log</td>
|
|
<td>
|
|
<span class="add-button-wi">
|
|
<a title="Show more log" id="show-all-haproxy-wi-log" style="color: #fff">
|
|
Show more log
|
|
</a>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
{% set counter = 0 -%}
|
|
{% for log in haproxy_wi_log %}
|
|
{% 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">
|
|
{{log }}
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr style="display: none;" class="show-haproxy-wi-log" class="{{ loop.cycle('odd', 'even') }}">
|
|
<td class="padding10 first-collumn-wi" style="font-size: 12.5px" colspan="2">
|
|
{{log }}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tr>
|
|
</table>
|
|
|
|
{% 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>
|
|
<script>
|
|
window.onload = showOverview()
|
|
</script>
|
|
|
|
{% endblock %} |