forked from TillRepo/IrSender
bugfix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user