mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 13:01:12 +00:00
fix: device.class possible null
This commit is contained in:
@@ -333,7 +333,12 @@
|
|||||||
<tr id="device-info-{{ loop.index }}" class="detail-row" style="display: none;">
|
<tr id="device-info-{{ loop.index }}" class="detail-row" style="display: none;">
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<div class="content-full">
|
<div class="content-full">
|
||||||
<pre>{{ device.class|tojson(indent=4) }}</pre>
|
{% if device.class %}
|
||||||
|
<pre>{{ device.class | tojson(indent=4) }}</pre>
|
||||||
|
{% else %}
|
||||||
|
<!-- 这里可以放占位内容,比如 -->
|
||||||
|
<pre>// No data</pre>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if device.is_online %}
|
{% if device.is_online %}
|
||||||
<div class="status-badge"><span class="online-status">在线</span></div>
|
<div class="status-badge"><span class="online-status">在线</span></div>
|
||||||
@@ -366,7 +371,12 @@
|
|||||||
<button class="copy-btn" onclick="copyToClipboard(this.previousElementSibling.textContent, event)">复制</button>
|
<button class="copy-btn" onclick="copyToClipboard(this.previousElementSibling.textContent, event)">复制</button>
|
||||||
<button class="debug-btn" onclick="toggleDebugInfo(this, event)">调试</button>
|
<button class="debug-btn" onclick="toggleDebugInfo(this, event)">调试</button>
|
||||||
<div class="debug-info" style="display:none;">
|
<div class="debug-info" style="display:none;">
|
||||||
<pre>{{ action_info|tojson(indent=2) }}</pre>
|
{% if action_info %}
|
||||||
|
<pre>{{ action_info | tojson(indent=4) }}</pre>
|
||||||
|
{% else %}
|
||||||
|
<!-- 这里可以放占位内容,比如 -->
|
||||||
|
<pre>// No data</pre>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user