Files

61 lines
2.1 KiB
HTML

{% extends "base.html" %}
{% block title %}用户视角 — Palladium Monitor{% endblock %}
{% block content %}
<div class="page-header">
<h1>👤 用户视角</h1>
<p class="page-subtitle">按用户聚合 LD 板使用情况 (数据来自详细版 test_server 输出)</p>
</div>
{% if pagination['items'] %}
<!-- 用户列表表 -->
<div class="card">
<table class="data-table users-table">
<thead>
<tr>
<th>用户</th>
<th>使用 LD 数</th>
<th>LD 板</th>
<th>Rack</th>
<th>T-Pod</th>
<th>设计名</th>
</tr>
</thead>
<tbody>
{% for item in pagination['items'] %}
<tr>
<td class="text-mono user-cell">{{ item.user }}</td>
<td class="text-center" style="font-weight:bold">{{ item.ld_count }}</td>
<td class="boards-cell">{{ item.boards }}</td>
<td class="text-mono">{{ item.racks }}</td>
<td class="text-mono">{{ item.pods }}</td>
<td class="design-cell">{{ item.designs }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- 分页 -->
{% if pagination['pages'] > 1 %}
<div class="pagination">
{% if pagination['page'] > 1 %}
<a href="{{ url_for('users_page', page=pagination['page'] - 1) }}" class="page-btn">← 上一页</a>
{% endif %}
<span class="page-info">第 {{ pagination['page'] }} / {{ pagination['pages'] }} 页 (共 {{ pagination['total'] }} 个用户)</span>
{% if pagination['page'] < pagination['pages'] %}
<a href="{{ url_for('users_page', page=pagination['page'] + 1) }}" class="page-btn">下一页 →</a>
{% endif %}
</div>
{% endif %}
{% else %}
<div class="empty-state-full">
<div class="empty-icon">👤</div>
<h2>暂无用户数据</h2>
<p>请先使用 <code>test_server</code> (非 -short 模式) 采集数据,
详细输出会包含每个域的 Owner/PID/T-Pod/Design 信息。</p>
<p>或粘贴详细版 test_server 输出到仪表板页面进行解析。</p>
</div>
{% endif %}
{% endblock %}