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.
149 lines
3.7 KiB
149 lines
3.7 KiB
{%- for t in table %}
|
|
{%- if t.1.0 != '' -%}
|
|
{% set headers = t.1.0.split(':')[1] %}
|
|
{% set headers = headers.split(' ') %}
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#{{t.0.0.strip()}}').on( 'page.dt', function () { $.getScript("/inc/fontawesome.min.js"); } )
|
|
.DataTable( {
|
|
"pageLength": 10,
|
|
"columnDefs": [
|
|
{
|
|
"searchable": false,
|
|
"orderable": false,
|
|
"targets": -1
|
|
}
|
|
],
|
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
|
|
} );
|
|
} );
|
|
</script>
|
|
{% endif %}
|
|
<table class="overview">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn">
|
|
Table name:{{t.0.0}}
|
|
</td>
|
|
<td class="padding10 first-collumn">
|
|
Type: {{t.0.1}}
|
|
</td>
|
|
<td class="padding10 first-collumn">
|
|
Size: {{t.0.2|int() / 1024 / 1024}} Mb
|
|
</td>
|
|
<td class="padding10 first-collumn">
|
|
Used: {{t.0.3}}
|
|
</td>
|
|
<td>
|
|
<button title="Clear table {{t.0.0}}" onclick="clearTable('{{t.0.0}}')">Clear table</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{%- if t.1.0 != '' -%}
|
|
<table class="overview hover order-column display compact" id="{{t.0.0.strip()}}">
|
|
{% set headers = t.1.0.split(':')[1] %}
|
|
{% set headers = headers.split(' ') %}
|
|
<thead>
|
|
<tr class="overviewHead">
|
|
<th class="padding10" style="width: 10%; padding-left: 10px;">IP</th>
|
|
<th>Use</th>
|
|
<th>Exp</th>
|
|
<th>
|
|
{{headers.4.split('=')[0].split('(')[0]}}
|
|
</th>
|
|
{% if headers|length > 5 %}
|
|
<th>
|
|
{{headers.5.split('=')[0].split('(')[0]}}
|
|
</th>
|
|
{% endif %}
|
|
{% if headers|length > 6 %}
|
|
<th>
|
|
{{headers.6.split('=')[0].split('(')[0]}}
|
|
</th>
|
|
{% endif %}
|
|
{% if headers|length > 7 %}
|
|
<th>
|
|
{{headers.7.split('=')[0].split('(')[0]}}
|
|
</th>
|
|
{% endif %}
|
|
{% if headers|length > 8 %}
|
|
<th>
|
|
{{headers.9.split('=')[0].split('(')[0]}}
|
|
</th>
|
|
{% endif %}
|
|
{% if headers|length > 10 %}
|
|
<th>
|
|
{{headers.10.split('=')[0].split('(')[0]}}
|
|
</th>
|
|
{% endif %}
|
|
{% if headers|length > 11 %}
|
|
<th>
|
|
{{headers.11.split('=')[0].split('(')[0]}}
|
|
</th>
|
|
{% endif %}
|
|
<th style="width: 10px;">
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for b in t.1 %}
|
|
{% set body = b.split(' ') %}
|
|
{% if body.0 != '' %}
|
|
<tr>
|
|
<td class="padding10" style="width: 10%; padding-left: 10px;">
|
|
{{body.1.split('=')[1]}}
|
|
</td>
|
|
<td>
|
|
{{body.2.split('=')[1]}}
|
|
</td>
|
|
<td>
|
|
{{body.3.split('=')[1]|int() / 1000 }} s
|
|
</td>
|
|
{% if body|length > 4 %}
|
|
<td>
|
|
{{body.4.split('=')[1]}}
|
|
</td>
|
|
{% endif %}
|
|
{% if body|length > 5 %}
|
|
<td>
|
|
{{body.5.split('=')[1]}}
|
|
</td>
|
|
{% endif %}
|
|
{% if body|length > 6 %}
|
|
<td>
|
|
{{body.6.split('=')[1]}}
|
|
</td>
|
|
{% endif %}
|
|
{% if body|length > 7 %}
|
|
<td>
|
|
{{body.7.split('=')[1]}}
|
|
</td>
|
|
{% endif %}
|
|
{% if body|length > 8 %}
|
|
<td>
|
|
{{body.8.split('=')[1]}}
|
|
</td>
|
|
{% endif %}
|
|
{% if body|length > 9 %}
|
|
<td>
|
|
{{body.9.split('=')[1]}}
|
|
</td>
|
|
{% endif %}
|
|
{% if body|length > 10 %}
|
|
<td>
|
|
{{body.10.split('=')[1]}}
|
|
</td>
|
|
{% endif %}
|
|
<td>
|
|
<a class="delete" title="Delete this entry" style="cursor: pointer;" onclick="deleteTableEntry(this, '{{t.0.0.strip()}}', '{{body.1.split('=')[1]}}')"></a>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<span class="alert alert-warning" style="margin-bottom: 0px;">Table is empty</span>
|
|
{% endif %}
|
|
<br />
|
|
<br />
|
|
{% endfor %} |