diff --git a/script-api.py b/script-api.py index b4f2206..490e30b 100755 --- a/script-api.py +++ b/script-api.py @@ -1545,6 +1545,97 @@ href="/"> """ ) + +def render_result( + command_id, + result +): + + body = f""" + + +← Zurück + + + +
+ + +

+{html.escape(command_id)} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Status +{html.escape(str(result.get("ok")))} +
Exit Code +{html.escape(str(result.get("exit_code")))} +
Dauer +{html.escape(str(result.get("duration_ms")))} + ms +
Request ID +{html.escape(str(result.get("request_id")))} +
+ + + +

+Ausgabe +

+ + +
+{html.escape(result.get("stdout", ""))}
+
+ + + +

+Fehler +

+ + +
+{html.escape(result.get("stderr", ""))}
+
+ + +
+ +""" + + + return render_page( + "Command Ergebnis", + body + ) def render_page( title, body