This commit is contained in:
2026-06-29 18:38:47 +00:00
parent ef9444a766
commit af5c36e5c6
+91
View File
@@ -1545,6 +1545,97 @@ href="/">
"""
)
def render_result(
command_id,
result
):
body = f"""
<a class="back" href="/">
← Zurück
</a>
<div class="group-card">
<h2>
{html.escape(command_id)}
</h2>
<table>
<tr>
<th>Status</th>
<td>
{html.escape(str(result.get("ok")))}
</td>
</tr>
<tr>
<th>Exit Code</th>
<td>
{html.escape(str(result.get("exit_code")))}
</td>
</tr>
<tr>
<th>Dauer</th>
<td>
{html.escape(str(result.get("duration_ms")))}
ms
</td>
</tr>
<tr>
<th>Request ID</th>
<td>
{html.escape(str(result.get("request_id")))}
</td>
</tr>
</table>
<h3>
Ausgabe
</h3>
<pre>
{html.escape(result.get("stdout", ""))}
</pre>
<h3>
Fehler
</h3>
<pre>
{html.escape(result.get("stderr", ""))}
</pre>
</div>
"""
return render_page(
"Command Ergebnis",
body
)
def render_page(
title,
body