❤️
This commit is contained in:
122
templates/client_test.html
Normal file
122
templates/client_test.html
Normal file
@@ -0,0 +1,122 @@
|
||||
{% extends "base.html" %}
|
||||
{% block body_class %}page-bg bg-devices{% endblock %}
|
||||
{% block content %}
|
||||
<style>
|
||||
body.bg-devices {
|
||||
background-color: #B3B3DA;
|
||||
background-image:
|
||||
linear-gradient(rgba(179, 179, 218, 0.75), rgba(179, 179, 218, 0.75)),
|
||||
url('{{ url_for("static", filename="bg/bg_notebooks.png", v=1) }}');
|
||||
background-size: auto 40vh;
|
||||
}
|
||||
.client-test-page .card {
|
||||
background-color: #B3B3DA;
|
||||
border: 1px solid #B3B3DA;
|
||||
box-shadow: none;
|
||||
}
|
||||
.client-test-page .card-body {
|
||||
background-color: transparent;
|
||||
}
|
||||
.client-test-page .table td,
|
||||
.client-test-page .table th {
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.client-test-summary {
|
||||
text-align: center;
|
||||
margin-top: -2px;
|
||||
margin-bottom: 8px;
|
||||
color: #5f5f5f;
|
||||
font-weight: 500;
|
||||
}
|
||||
.client-test-status {
|
||||
font-weight: 700;
|
||||
}
|
||||
.client-test-status.is-online {
|
||||
color: #17853b;
|
||||
}
|
||||
.client-test-status.is-offline {
|
||||
color: #c62828;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="client-test-page">
|
||||
<div class="d-flex align-items-center justify-content-between mb-2">
|
||||
<h3 class="mb-0">Тест клиента</h3>
|
||||
</div>
|
||||
|
||||
<div class="client-test-summary">
|
||||
Устройств: {{ rows|length }}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Инв. №</th>
|
||||
<th>Тип</th>
|
||||
<th>Модель</th>
|
||||
<th>Серийный №</th>
|
||||
<th>Имя компьютера</th>
|
||||
<th>CPU</th>
|
||||
<th>GPU</th>
|
||||
<th>Материнская плата</th>
|
||||
<th>Память</th>
|
||||
<th>Накопители</th>
|
||||
<th>ОС</th>
|
||||
<th>IP</th>
|
||||
<th>MAC</th>
|
||||
<th>RustDesk</th>
|
||||
<th>Здание</th>
|
||||
<th>Кабинет</th>
|
||||
<th>Должность</th>
|
||||
<th>ФИО</th>
|
||||
<th>Статус</th>
|
||||
<th>Обновлено</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for id, inventory_number, device_type, model, serial_number, hostname, cpu, gpu, motherboard, memory, storage, os_info, ip_address, mac_address, rustdesk_id, rustdesk_installed, building, cabinet_name, position, full_name, is_online, last_seen, date_added in rows %}
|
||||
<tr>
|
||||
<td>{{ inventory_number }}</td>
|
||||
<td>{{ device_type or '—' }}</td>
|
||||
<td>{{ model or '—' }}</td>
|
||||
<td>{{ serial_number or '—' }}</td>
|
||||
<td>{{ hostname or '—' }}</td>
|
||||
<td>{{ cpu or '—' }}</td>
|
||||
<td>{{ gpu or '—' }}</td>
|
||||
<td>{{ motherboard or '—' }}</td>
|
||||
<td>{{ memory or '—' }}</td>
|
||||
<td>{{ storage or '—' }}</td>
|
||||
<td>{{ os_info or '—' }}</td>
|
||||
<td>{{ ip_address or '—' }}</td>
|
||||
<td>{{ mac_address or '—' }}</td>
|
||||
<td>
|
||||
{% if rustdesk_installed %}
|
||||
Установлен{% if rustdesk_id %}: {{ rustdesk_id }}{% endif %}
|
||||
{% else %}
|
||||
Не установлен
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ building or '—' }}</td>
|
||||
<td>{{ cabinet_name or '—' }}</td>
|
||||
<td>{{ position or '—' }}</td>
|
||||
<td>{{ full_name or '—' }}</td>
|
||||
<td>
|
||||
<span class="client-test-status {{ 'is-online' if is_online else 'is-offline' }}">
|
||||
{{ 'Online' if is_online else 'Offline' }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ last_seen.strftime('%Y-%m-%d %H:%M:%S') if last_seen and last_seen.strftime else (last_seen|string) if last_seen else '—' }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="20" class="text-center text-muted">Данных от тестового клиента пока нет</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user