Add GPU PCI ID fallback names and container passthrough indicators
All checks were successful
Build-Publish / build (linux/amd64) (push) Successful in 7s
Build-Publish / build (linux/arm64) (push) Successful in 15s
Build-Publish / create-manifest (push) Successful in 2s
Build-Publish / publish-template (push) Successful in 9s

This commit is contained in:
j
2026-03-21 08:58:46 +13:00
parent db5cbf99e1
commit bf7f0d44ba
5 changed files with 121 additions and 5 deletions

View File

@@ -329,20 +329,24 @@
<!-- GPUs -->
{% set gpus = d.get('gpu', []) if d.get('gpu') else [] %}
{% if gpus or nvidia_gpus or intel_gpus %}
{% set gpu_pt = d|gpu_passthrough_map %}
<div class="detail-section">
<h4>GPUs</h4>
<table>
{% for ng in nvidia_gpus %}
{% set pt_users = gpu_pt.get(ng.get('pci_address', '')|normalize_pci) %}
<tr>
<td>{{ ng.get('name', 'NVIDIA GPU ' ~ loop.index0) }}</td>
<td>{{ ng.get('name', 'NVIDIA GPU ' ~ loop.index0) }}{% if pt_users %} <span class="gpu-passthrough">&rarr; {{ pt_users|join(', ') }}</span>{% endif %}</td>
<td>{{ ng.get('utilization_percent', '-') }}%</td>
<td>{{ ng.get('memory_used_mb', '-') }} / {{ ng.get('memory_total_mb', '-') }} MB</td>
<td>{{ ng.get('temperature', '-') }}°C</td>
</tr>
{% endfor %}
{% for ig in intel_gpus %}
{% set ig_name = ig.get('name', '')|clean_gpu if ig.get('name') else 'Intel GPU ' ~ loop.index0 %}
{% set pt_users = gpu_pt.get(ig.get('pci_address', '')|normalize_pci) %}
<tr>
<td>Intel GPU {{ loop.index0 }}</td>
<td>{{ ig_name }}{% if pt_users %} <span class="gpu-passthrough">&rarr; {{ pt_users|join(', ') }}</span>{% endif %}</td>
<td>{{ ig.get('utilization_percent', '-') }}%</td>
<td>{% if ig.get('frequency_mhz') %}{{ ig.get('frequency_mhz') }} MHz{% else %}-{% endif %}</td>
<td>{% if ig.get('power_w') %}{{ ig.get('power_w') }} W{% else %}-{% endif %}</td>
@@ -350,7 +354,8 @@
{% endfor %}
{% if not nvidia_gpus and not intel_gpus %}
{% for gpu in gpus %}
<tr><td colspan="4">{{ gpu.get('description', '-')|clean_gpu }}</td></tr>
{% set pt_users = gpu_pt.get(gpu.get('pci_address', '')|normalize_pci) %}
<tr><td colspan="4">{{ gpu.get('description', '-')|clean_gpu }}{% if pt_users %} <span class="gpu-passthrough">&rarr; {{ pt_users|join(', ') }}</span>{% endif %}</td></tr>
{% endfor %}
{% endif %}
</table>