feat: 楼栋/机柜列调整为表格第一列

This commit is contained in:
2026-05-19 16:17:23 +08:00
parent cabfc54618
commit 17e14e7608

View File

@@ -88,9 +88,9 @@
<table class="w-full text-sm"> <table class="w-full text-sm">
<thead> <thead>
<tr class="bg-gray-50 text-gray-500 text-xs uppercase tracking-wider"> <tr class="bg-gray-50 text-gray-500 text-xs uppercase tracking-wider">
<th class="px-4 py-3 text-left font-medium">楼栋/机柜</th>
<th class="px-4 py-3 text-left font-medium">设备名称</th> <th class="px-4 py-3 text-left font-medium">设备名称</th>
<th class="px-4 py-3 text-left font-medium">型号</th> <th class="px-4 py-3 text-left font-medium">型号</th>
<th class="px-4 py-3 text-left font-medium">楼栋/机柜</th>
<th class="px-4 py-3 text-left font-medium">主IP</th> <th class="px-4 py-3 text-left font-medium">主IP</th>
<th class="px-4 py-3 text-left font-medium">主序列号</th> <th class="px-4 py-3 text-left font-medium">主序列号</th>
<th class="px-4 py-3 text-left font-medium">状态</th> <th class="px-4 py-3 text-left font-medium">状态</th>
@@ -102,16 +102,16 @@
<tbody class="divide-y divide-gray-50"> <tbody class="divide-y divide-gray-50">
{% for device in devices %} {% for device in devices %}
<tr class="device-row transition-colors"> <tr class="device-row transition-colors">
<td class="px-4 py-3">
<div class="font-medium text-gray-800">{{ device.device_name }}</div>
<div class="text-xs text-gray-400">{{ device.brand|default:"" }}</div>
</td>
<td class="px-4 py-3 text-gray-600">{{ device.model|default:"-" }}</td>
<td class="px-4 py-3 text-gray-600"> <td class="px-4 py-3 text-gray-600">
{{ device.building|default:"-" }} {{ device.building|default:"-" }}
{% if device.cabinet %} / {{ device.cabinet }}{% endif %} {% if device.cabinet %} / {{ device.cabinet }}{% endif %}
{% if device.floor %} {{ device.floor }}{% endif %} {% if device.floor %} {{ device.floor }}{% endif %}
</td> </td>
<td class="px-4 py-3">
<div class="font-medium text-gray-800">{{ device.device_name }}</div>
<div class="text-xs text-gray-400">{{ device.brand|default:"" }}</div>
</td>
<td class="px-4 py-3 text-gray-600">{{ device.model|default:"-" }}</td>
<td class="px-4 py-3"> <td class="px-4 py-3">
{% with primary_ip=device.ips.all|first %} {% with primary_ip=device.ips.all|first %}
{% if primary_ip and primary_ip.is_primary %} {% if primary_ip and primary_ip.is_primary %}