swizzin_dashboard/templates/top.html

82 lines
2.9 KiB
HTML
Raw Normal View History

2020-03-10 08:39:15 +08:00
{% if config.ADMIN_USER == user %}
2020-03-08 06:34:57 +08:00
<table class="table table-condensed table-hover table-dark table-borderless">
<thead class="table-active">
<tr>
<th scope="col">Period</th>
<th scope="col" class="text-info text-center">Down</th>
<th scope="col" class="text-success text-center">Up</th>
{% if config.NETWORK_TOTALS == True %}
<th scope="col" class="text-warning text-center">Total</th>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
</thead>
<tbody>
<tr>
<td>This Hour</td>
<td class="text-info text-right text-center">{{ hour['rx'] }}</td>
<td class="text-success text-center">{{ hour['tx'] }}</td>
{% if config.NETWORK_TOTALS == True %}
<td class="text-warning text-center">{{ hour['total'] }}</td>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
<tr>
<td>Last Hour</td>
<td class="text-info text-center">{{ lasthour['rx'] }}</td>
<td class="text-success text-center">{{ lasthour['tx'] }}</td>
{% if config.NETWORK_TOTALS == True %}
<td class="text-warning text-center">{{ lasthour['total'] }}</td>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
<tr>
<td>This Day</td>
<td class="text-info text-center">{{ day['rx'] }}</td>
<td class="text-success text-center">{{ day['tx'] }}</td>
{% if config.NETWORK_TOTALS == True %}
<td class="text-warning text-center">{{ day['total'] }}</td>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
<tr>
<td>This Month</td>
<td class="text-info text-center">{{ month['rx'] }}</td>
<td class="text-success text-center">{{ month['tx'] }}</td>
{% if config.NETWORK_TOTALS == True %}
<td class="text-warning text-center">{{ month['total'] }}</td>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
<tr>
<td>All Time</td>
<td class="text-info text-center">{{ alltime['rx'] }}</td>
<td class="text-success text-center">{{ alltime['tx'] }}</td>
{% if config.NETWORK_TOTALS == True %}
<td class="text-warning text-center">{{ alltime['total'] }}</td>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
</tbody>
</table>
<table class="table table-condensed table-hover table-dark table-borderless">
<thead class="table-active">
<tr>
<th scope="col">Date</th>
<th scope="col" class="text-info text-center">Down</th>
<th scope="col" class="text-success text-center">Up</th>
{% if config.NETWORK_TOTALS == True %}
<th scope="col" class="text-warning text-center">Total</th>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
</thead>
<tbody>
{% for t in top %}
<tr>
<td>{{ t['date'] }}</td>
<td class="text-info text-center">{{ t['rx'] }}</td>
<td class="text-success text-center">{{ t['tx'] }}</td>
{% if config.NETWORK_TOTALS == True %}
<td class="text-warning text-center">{{ t['total'] }}</td>
{% endif %}
2020-03-08 06:34:57 +08:00
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}