feat: 新增业务类型、显卡信息字段;优化列表列宽和字符截断;删除是否带卡列
This commit is contained in:
@@ -57,9 +57,12 @@
|
||||
<tr><td class="text-muted">机柜位置</td><td>{{ asset.cabinet_position|default:"-" }}</td></tr>
|
||||
<tr><td class="text-muted">BMC地址</td><td><code>{{ asset.bmc_address|default:"-" }}</code></td></tr>
|
||||
<tr><td class="text-muted">IP地址</td><td><code>{{ asset.ip_address|default:"-" }}</code></td></tr>
|
||||
<tr><td class="text-muted">显卡类型</td><td>{{ asset.gpu_type|default:"-" }}</td></tr>
|
||||
<tr><td class="text-muted">卡数</td><td>{{ asset.gpu_count|default:"-" }}</td></tr>
|
||||
<tr><td class="text-muted">负责人</td><td>{{ asset.responsible_person|default:"-" }}</td></tr>
|
||||
<tr><td class="text-muted">使用部门</td><td>{{ asset.department|default:"-" }}</td></tr>
|
||||
<tr><td class="text-muted">使用人</td><td>{{ asset.user|default:"-" }}</td></tr>
|
||||
<tr><td class="text-muted">业务类型</td><td>{{ asset.business_type|default:"-" }}</td></tr>
|
||||
<tr><td class="text-muted">状态</td>
|
||||
<td><span class="badge
|
||||
{% if asset.status == 'in_use' %}bg-success
|
||||
|
||||
@@ -81,6 +81,16 @@
|
||||
<label class="form-label text-muted">{{ form.ip_address.label }}</label>
|
||||
{{ form.ip_address }}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label text-muted">{{ form.gpu_type.label }}</label>
|
||||
{{ form.gpu_type }}
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label text-muted">{{ form.gpu_count.label }}</label>
|
||||
{{ form.gpu_count }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted">{{ form.status.label }}</label>
|
||||
{{ form.status }}
|
||||
@@ -97,6 +107,10 @@
|
||||
<label class="form-label text-muted">{{ form.user.label }}</label>
|
||||
{{ form.user }}
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label text-muted">{{ form.business_type.label }}</label>
|
||||
{{ form.business_type }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -69,17 +69,23 @@
|
||||
<table class="table table-dark table-hover table-striped mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>资产编号</th>
|
||||
<th style="width:50px">ID</th>
|
||||
<th style="width:60px">机柜</th>
|
||||
<th style="width:150px">机柜位置</th>
|
||||
<th style="width:80px">资产编号</th>
|
||||
<th>设备名称</th>
|
||||
<th>分类</th>
|
||||
<th>品牌/型号</th>
|
||||
<th>资产面值</th>
|
||||
<th>位置</th>
|
||||
<th style="width:80px">位置</th>
|
||||
<th>BMC地址</th>
|
||||
<th>IP地址</th>
|
||||
<th>负责人</th>
|
||||
<th>显卡类型</th>
|
||||
<th>卡数</th>
|
||||
<th style="width:60px">负责人</th>
|
||||
<th>使用部门</th>
|
||||
<th>使用人</th>
|
||||
<th style="width:60px">使用人</th>
|
||||
<th>业务类型</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
@@ -87,20 +93,23 @@
|
||||
<tbody>
|
||||
{% for asset in page_obj %}
|
||||
<tr>
|
||||
<td><a href="{% url 'asset_detail' asset.pk %}" class="text-info">{{ asset.asset_number }}</a></td>
|
||||
<td class="text-muted small" title="{{ asset.id }}">{{ asset.id|stringformat:"s"|truncatechars:3 }}</td>
|
||||
<td title="{{ asset.cabinet }}">{{ asset.cabinet|default:"-"|truncatechars:3 }}</td>
|
||||
<td title="{{ asset.cabinet_position }}">{{ asset.cabinet_position|default:"-"|truncatechars:10 }}</td>
|
||||
<td><a href="{% url 'asset_detail' asset.pk %}" class="text-info" title="{{ asset.asset_number }}">{{ asset.asset_number|truncatechars:3 }}</a></td>
|
||||
<td>{{ asset.name }}</td>
|
||||
<td><span class="badge bg-secondary">{{ asset.category.name }}</span></td>
|
||||
<td>{{ asset.brand }} {% if asset.model %}{{ asset.model }}{% endif %}</td>
|
||||
<td>{% if asset.asset_value %}¥{{ asset.asset_value }}{% else %}-{% endif %}</td>
|
||||
<td>
|
||||
{{ asset.location }}
|
||||
{% if asset.cabinet %}<small class="text-muted"> {{ asset.cabinet }}{% if asset.cabinet_position %}/{{ asset.cabinet_position }}{% endif %}</small>{% endif %}
|
||||
</td>
|
||||
<td title="{{ asset.location }}">{{ asset.location|default:"-"|truncatechars:5 }}</td>
|
||||
<td><code>{{ asset.bmc_address|default:"-" }}</code></td>
|
||||
<td><code>{{ asset.ip_address|default:"-" }}</code></td>
|
||||
<td>{{ asset.responsible_person|default:"-" }}</td>
|
||||
<td>{{ asset.gpu_type|default:"-" }}</td>
|
||||
<td>{{ asset.gpu_count|default:"-" }}</td>
|
||||
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px" title="{{ asset.responsible_person }}">{{ asset.responsible_person|default:"-" }}</td>
|
||||
<td>{{ asset.department|default:"-" }}</td>
|
||||
<td>{{ asset.user|default:"-" }}</td>
|
||||
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px" title="{{ asset.user }}">{{ asset.user|default:"-" }}</td>
|
||||
<td>{{ asset.business_type|default:"-" }}</td>
|
||||
<td>
|
||||
<span class="badge
|
||||
{% if asset.status == 'in_use' %}bg-success
|
||||
@@ -123,7 +132,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="10" class="text-center text-light opacity-75 py-4">暂无资产数据</td></tr>
|
||||
<tr><td colspan="20" class="text-center text-light opacity-75 py-4">暂无资产数据</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user