From 58605c971c8829c36fd0a055d75cc5aaf8c4656a Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Wed, 14 May 2025 19:35:20 +0200 Subject: Invocation server: print only non-empty dispatch lists --- doc/invocations-http-server/server.py | 4 ++-- doc/invocations-http-server/templates/invocation.html | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py index 9e8ece95..30f9c6d1 100755 --- a/doc/invocations-http-server/server.py +++ b/doc/invocations-http-server/server.py @@ -391,8 +391,8 @@ class InvocationServer: "value_hex": value.encode().hex(), }) params["remote_props"] = remote_props - params["remote_dispatch"] = json.dumps( - profile.get('remote', {}).get('dispatch', [])) + remote_dispatch = profile.get('remote', {}).get('dispatch', []) + params["remote_dispatch"] = json.dumps(remote_dispatch) if remote_dispatch else None # For complex conditional data fill with None as default for k in ["cmdline", "cmd", "target", "config"]: params[k] = None diff --git a/doc/invocations-http-server/templates/invocation.html b/doc/invocations-http-server/templates/invocation.html index 8dd075e2..09faf226 100644 --- a/doc/invocations-http-server/templates/invocation.html +++ b/doc/invocations-http-server/templates/invocation.html @@ -137,7 +137,9 @@ Inocations {{invocation | e}} {% else %}
  • Properties: (none)
  • {% endif %} + {% if remote_dispatch %}
  • Dispatch: {{ remote_dispatch | e }}
  • + {% endif %} {% endif %} -- cgit v1.2.3