summaryrefslogtreecommitdiff
path: root/doc/invocations-http-server
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-07 11:36:41 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-07 12:25:56 +0200
commita61004f7495df432c89ff3ff69512bb66eed7cb8 (patch)
treef4f337fa7114943e65b664d8b99ea003acf17b96 /doc/invocations-http-server
parent9ff01a766d98359c7dcf199aa6c4fba7fb427140 (diff)
downloadjustbuild-a61004f7495df432c89ff3ff69512bb66eed7cb8.tar.gz
Invocation server: also show information related to the used remote
Diffstat (limited to 'doc/invocations-http-server')
-rwxr-xr-xdoc/invocations-http-server/server.py8
-rw-r--r--doc/invocations-http-server/templates/invocation.html9
-rw-r--r--doc/invocations-http-server/templates/invocations.html5
3 files changed, 21 insertions, 1 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py
index 0e4175da..0cd3c20d 100755
--- a/doc/invocations-http-server/server.py
+++ b/doc/invocations-http-server/server.py
@@ -120,6 +120,9 @@ class InvocationServer:
"target": json.dumps(target) if target else None,
"config": json.dumps(core_config(config)),
"exit_code": profile_data.get('exit code', 0),
+ "remote_address": profile_data.get('remote', {}).get('address'),
+ "remote_props": json.dumps(
+ profile_data.get('remote', {}).get('properties', {})),
}
invocations.append(invocation)
if count >= 50:
@@ -226,6 +229,11 @@ class InvocationServer:
params["repo_config"] = meta.get('configuration')
params["exit_code"] = profile.get('exit code')
params["analysis_errors"] = profile.get('analysis errors', [])
+ params["remote_address"] = profile.get('remote', {}).get('address')
+ params["remote_props"] = json.dumps(
+ profile.get('remote', {}).get('properties', {}))
+ params["remote_dispatch"] = json.dumps(
+ profile.get('remote', {}).get('dispatch', []))
# 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 73858979..62d98813 100644
--- a/doc/invocations-http-server/templates/invocation.html
+++ b/doc/invocations-http-server/templates/invocation.html
@@ -93,6 +93,15 @@ Inocations {{invocation | e}}
{% if config %}
<li> Target configuration: <tt>{{ config | e }}</tt></li>
{% endif %}
+ {% if remote_address %}
+ <li> remote
+ <ul>
+ <li> address: <tt>{{ remote_address | e }}</tt>
+ <li> properties: <tt>{{ remote_props | e}}</tt>
+ <li> dispatch: <tt>{{ remote_dispatch | e }}</tt>
+ </ul>
+ </li>
+ {% endif %}
{% if exit_code != None %}
<li> exit code: {{ exit_code | e }}</li>
{% endif %}
diff --git a/doc/invocations-http-server/templates/invocations.html b/doc/invocations-http-server/templates/invocations.html
index a3c6dfe2..f2212af0 100644
--- a/doc/invocations-http-server/templates/invocations.html
+++ b/doc/invocations-http-server/templates/invocations.html
@@ -8,10 +8,13 @@ Recent Invocations
{% if invocations %}
<ul>
{% for invocation in invocations %}
- <li> <a href="/invocations/{{invocation.name |e}}">{{ invocation.name | e }}</a>
+ <li> <a href="/invocations/{{invocation.name |e}}"><tt>{{ invocation.name | e }}</tt></a>
{% if invocation.subcommand %}
{{ invocation.subcommand | e }}
{% endif %}
+ {% if invocation.remote_address %}
+ (on <tt>{{ invocation.remote_address | e }}@{{ invocation.remote_props | e }}</tt>)
+ {% endif %}
{% if invocation.target %}
<tt>{{ invocation.target | e}}@{{ invocation.config | e}}</tt>
{% endif %}