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.
171 lines
5.1 KiB
171 lines
5.1 KiB
{% extends "base.html" %}
|
|
{% block content %}
|
|
<script>
|
|
$("#secIntervals").css("display", "none");
|
|
</script>
|
|
{% if role <= 1 %}
|
|
<table class="overview">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn">Login</td>
|
|
<td class="padding10 second-collumn">Email</td>
|
|
<td class="second-collumn">Group</td>
|
|
<td>Role</td>
|
|
<td class="padding10">
|
|
<span class="add-button">
|
|
<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">
|
|
<a href="users.py#users" title="Edit user" style="color: #000;">
|
|
{{ USER.1 }}
|
|
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
|
|
</a>
|
|
</td>
|
|
<td class="padding10 second-collumn"> {{ USER.2 }}</td>
|
|
{% for group in groups %}
|
|
{% if USER.5 == group.0|string() %}
|
|
<td class="third-collumn">{{ group.1 }}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<td>{{ USER.4 }}</td>
|
|
<td></td>
|
|
</tr>
|
|
{% else %}
|
|
<tr style="display: none;" class="show-users {{ loop.cycle('odd', 'even') }}">
|
|
<td class="padding10 first-collumn">
|
|
<a href="users.py#users" title="Edit user" style="color: #000;">
|
|
{{ USER.1 }}
|
|
<img src="/inc/images/edit.png" alt="Edit" width="15" style="margin-bottom: -3px;" />
|
|
</a>
|
|
</td>
|
|
<td class="padding10"> {{ USER.2 }}</td>
|
|
{% for group in groups %}
|
|
{% if group.0|string() == USER.5 %}
|
|
<td class="third-collumn">{{ group.1 }}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<td>{{ USER.4 }}</td>
|
|
<td></td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
<table class="overview">
|
|
<tr class="overviewHead">
|
|
<th class="padding10 first-collumn" colspan=4>
|
|
Tools status
|
|
</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="padding10 first-collumn">
|
|
{% if metrics_master|int() >= 1 %}
|
|
<span title="running {{ metrics_master }} master processes"><span class="serverUp"> UP</span>
|
|
{% else %}
|
|
<span title="running {{ metrics_master }} master processes"><span class="serverDown"> DOWN</span>
|
|
{% endif %}
|
|
<span>Metrics master</span>
|
|
</td>
|
|
<td class="padding10 second-collumn">
|
|
{% if metrics_worker|int() >= 1 %}
|
|
<span title="running {{metrics_worker}} worker processes"><span class="serverUp"> UP</span>
|
|
{% else %}
|
|
<span title="running {{metrics_worker}} worker processes"><span class="serverDown"> DOWN</span>
|
|
{% endif %}
|
|
<span>Metrics workers</span>
|
|
</td>
|
|
<td class="third-collumn">
|
|
{% if checker_master|int() >= 1 %}
|
|
<span title="running {{ checker_master }} master processes"><span class="serverUp"> UP</span>
|
|
{% else %}
|
|
<span title="running {{ checker_master }} master processes"><span class="serverDown"> DOWN</span>
|
|
{% endif %}
|
|
<span>Checker master</span>
|
|
</td>
|
|
<td>
|
|
{% if checker_worker|int() >= 1 %}
|
|
<span title="running {{ checker_worker }} worker processes"><span class="serverUp"> UP</span>
|
|
{% else %}
|
|
<span title="running {{ checker_worker }} worker processes"><span class="serverDown"> DOWN</span>
|
|
{% endif %}
|
|
<span>Checker workers</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{% endif %}
|
|
<table class="overview">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn">
|
|
Server
|
|
</td class="padding10 second-collumn">
|
|
<td class="padding10 second-collumn">
|
|
HAproxy status
|
|
</td>
|
|
<td class="padding10 third-collumn">
|
|
Action
|
|
</td>
|
|
<td class="padding10">
|
|
Last edit
|
|
</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 class="overview">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn">
|
|
Server
|
|
</td class="padding10 second-collumn">
|
|
<td class="padding10 second-collumn">
|
|
WAF status
|
|
</td>
|
|
<td class="padding10 third-collumn">
|
|
Action
|
|
</td>
|
|
<td class="padding10">
|
|
WAF mode
|
|
</td class="padding10">
|
|
<td>
|
|
<a onclick="showOverviewWaf()" title="Refresh" style="float: right; margin-right: 25px;"><img src="/inc/images/update.png" alt="restart" class="icon"></a>
|
|
</td>
|
|
</tr>
|
|
<tbody id="ajaxwafstatus"></tbody>
|
|
</table>
|
|
<table class="overview" >
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn">
|
|
Server
|
|
</td>
|
|
<td class="padding10 second-collumn">
|
|
HAproxy info
|
|
</td>
|
|
<td class="padding10 third-collumn">
|
|
Server status
|
|
</td>
|
|
<td class="padding10">
|
|
Front/Back-ends
|
|
</td>
|
|
<td>
|
|
<a onclick="showOverviewServers()" title="Refresh Server Info" style="float: right; margin-right: 25px;"><img src="/inc/images/update.png" alt="restart" class="icon"></a>
|
|
</td>
|
|
</tr>
|
|
<tbody id="ajaxservers"></tbody>
|
|
</table>
|
|
<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 %} |