fix(logs): fix terminal colors and payload rendering
This commit is contained in:
@@ -44,11 +44,12 @@ export default function LogsPage() {
|
||||
}),
|
||||
});
|
||||
const d = await r.json();
|
||||
setLogs(
|
||||
typeof d.result === "string"
|
||||
? d.result
|
||||
: JSON.stringify(d.result ?? d.error, null, 2),
|
||||
);
|
||||
let parsed = "";
|
||||
try {
|
||||
parsed = JSON.parse(d.result).logs;
|
||||
} catch {}
|
||||
|
||||
setLogs(parsed || d.result || "No logs returned.");
|
||||
} catch {
|
||||
setLogs("Failed to load logs. Is the container running?");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user