From 197b2ad13e143bd32670c726e3bfdde126ca7bfb Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Tue, 7 Jul 2026 00:45:03 -0400 Subject: [PATCH] feat(storage): show job error details in history table and output panel --- Makefile | 2 +- web/src/pages/Storage.tsx | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c9ec0ac..6c1db85 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ BINARY=nasctl -VERSION?=0.7.3 +VERSION?=0.7.4 GO?=go LDFLAGS=-s -w -X github.com/darroyo/nasctl/internal/web.Version=$(VERSION) -X github.com/darroyo/nasctl/internal/web.Commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo unknown) BUILD_FLAGS=CGO_ENABLED=0 diff --git a/web/src/pages/Storage.tsx b/web/src/pages/Storage.tsx index 0d06983..cbd97f3 100644 --- a/web/src/pages/Storage.tsx +++ b/web/src/pages/Storage.tsx @@ -453,6 +453,7 @@ export default function Storage() { Tipo Estado Exit + Error Fecha Duración @@ -480,6 +481,13 @@ export default function Storage() { {j.exit_code >= 0 ? j.exit_code : "—"} + + {j.error ? ( + + ⚠ {j.error.split("\n")[0].slice(0, 50)}{j.error.split("\n")[0].length > 50 ? "…" : ""} + + ) : null} + {new Date(j.created_at).toLocaleString()} {j.started_at && j.finished_at @@ -567,6 +575,19 @@ function OutputPanel({ exit={job.exit_code} )} + {job.error && ( +
+
+ ⚠ Error + {job.exit_code >= 0 && ( + exit={job.exit_code} + )} +
+
+            {job.error}
+          
+
+ )}
}
         className="max-h-80 overflow-auto rounded bg-slate-900 p-3 text-xs text-slate-300 font-mono"
@@ -574,7 +595,9 @@ function OutputPanel({
         {filtered.length === 0
           ? job.output
             ? job.output.split("\n").slice(-200).join("\n")
-            : "iniciando…"
+            : job.status === "running"
+              ? "iniciando…"
+              : "Sin salida capturada."
           : filtered.join("\n")}