From df6ca084ffa4c6c2630ff3d2a255f4105d0a1fac Mon Sep 17 00:00:00 2001 From: Wild Dragon Dev Date: Thu, 4 Jun 2026 01:48:44 +0000 Subject: [PATCH] feat(web-ui): add Node column to Containers screen + integrated log viewer --- services/web-ui/public/screens-admin.jsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/services/web-ui/public/screens-admin.jsx b/services/web-ui/public/screens-admin.jsx index 6523efb..3026199 100644 --- a/services/web-ui/public/screens-admin.jsx +++ b/services/web-ui/public/screens-admin.jsx @@ -1056,7 +1056,12 @@ function Containers() { const logsModal = logsModalState; const setLogsModal = setLogsModalState; - const showLogs = (c) => setLogsModal(c); + const showLogs = (c) => { + setLogsModal({ ...c, logs: null }); // Show loading state + window.ZAMPP_API.fetch(`/cluster/containers/${c.node_id}/${c.id}/logs`) + .then(d => setLogsModal(p => ({ ...p, logs: d.logs || '(no logs)' }))) + .catch(e => setLogsModal(p => ({ ...p, logs: `Error: ${e.message}` }))); + }; const restartContainer = async (c) => { if (!(await confirm({ title: 'Restart container?', message: 'Restart container "' + c.name + '"?\nIn-flight requests will be dropped.', confirmLabel: 'Restart' }))) return; @@ -1114,16 +1119,9 @@ function Containers() {
-
- Live log streaming over the websocket isn't wired yet. SSH to the host that runs this container and tail the logs directly: -
- - docker compose logs -f {logsModal.name} - -
- Or grab the last 200 lines:  - docker logs --tail 200 {logsModal.name} -
+
+                {logsModal.logs || 'Loading logs…'}
+