From e875956b61b47c7b5d4a31c90184f718a733b79f Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Mon, 9 Mar 2026 00:11:32 +0100 Subject: [PATCH] host debug --- modules/pi_control/assets/hosts.js | 10 ++++++++++ modules/pi_control/assets/pi_control.css | 13 +++++++++++++ modules/pi_control/pages/hosts.php | 2 ++ 3 files changed, 25 insertions(+) diff --git a/modules/pi_control/assets/hosts.js b/modules/pi_control/assets/hosts.js index 29e5fcd..3c587a3 100644 --- a/modules/pi_control/assets/hosts.js +++ b/modules/pi_control/assets/hosts.js @@ -140,6 +140,8 @@ const upd = card.querySelector('[data-update-badge]'); const upg = card.querySelector('[data-upgrade-badge]'); const time = card.querySelector('[data-update-time]'); + const updDebug = card.querySelector('[data-update-debug]'); + const upgDebug = card.querySelector('[data-upgrade-debug]'); if (upd) { upd.classList.remove('badge-warn', 'badge-ok', 'badge-error'); if (data.updates && data.updates.error) { @@ -178,6 +180,14 @@ } } } + if (updDebug) { + const raw = (data.updates && (data.updates.raw || data.updates.preview)) || ''; + updDebug.textContent = raw ? `Update Debug: ${raw}` : 'Update Debug: –'; + } + if (upgDebug) { + const raw = (data.os && data.os.raw) || ''; + upgDebug.textContent = raw ? `Upgrade Debug: ${raw}` : 'Upgrade Debug: –'; + } if (time && data.checked_at) { const dt = new Date(data.checked_at); time.textContent = isNaN(dt.getTime()) ? data.checked_at : dt.toLocaleString(); diff --git a/modules/pi_control/assets/pi_control.css b/modules/pi_control/assets/pi_control.css index 8a1dd35..32b9b61 100644 --- a/modules/pi_control/assets/pi_control.css +++ b/modules/pi_control/assets/pi_control.css @@ -206,6 +206,19 @@ border-radius: 12px; } +.host-debug { + margin: 6px 0 0; + padding: 6px 8px; + background: #0b1020; + color: #c7d2fe; + border-radius: 8px; + font-size: 0.7rem; + white-space: pre-wrap; + word-break: break-word; + max-height: 120px; + overflow: auto; +} + .command-list { list-style: none; padding: 0; diff --git a/modules/pi_control/pages/hosts.php b/modules/pi_control/pages/hosts.php index d7c9adf..e450ff2 100644 --- a/modules/pi_control/pages/hosts.php +++ b/modules/pi_control/pages/hosts.php @@ -398,6 +398,8 @@ function hostAuthOk(array $host, bool $strictHostKey): bool OS: – Nie geprüft +
Update Debug: –
+
Upgrade Debug: –