mirror of
https://github.com/swizzin/swizzin_dashboard.git
synced 2024-09-20 14:56:08 +08:00
1f72753744
* Added total values for fields on the Network Info panel * Update top.html Missed some class change * Update netinfo.html Missed some class changes. * Update swizzin.py Typo * Update top.html Typos * Changed class on new column to use a theme class rather than the custom one originally added * Made display of totals column optional via NETWORK_TOTALS config variable and set hidden by default.
82 lines
2.9 KiB
HTML
Executable file
82 lines
2.9 KiB
HTML
Executable file
{% if config.ADMIN_USER == user %}
|
|
<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 %}
|
|
</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 %}
|
|
</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 %}
|
|
</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 %}
|
|
</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 %}
|
|
</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 %}
|
|
</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 %}
|
|
</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 %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|