diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-25 09:36:01 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-25 11:47:15 +0200 |
commit | 727536b5632c8f568efd0f5354d8ac1748e0bad4 (patch) | |
tree | 3c66e7e92c886302ab1fd0d607e282aa453e260a /doc/invocations-http-server | |
parent | 10caf1e1fba66899ddf9b4d047cd21e04e21142e (diff) | |
download | justbuild-727536b5632c8f568efd0f5354d8ac1748e0bad4.tar.gz |
Invocation http server: indicate incomplete data
With just-mr supporting a custom prefix to be shown at the beginning
of a logged invocation, users might be pointed to the web server very
early. Therefore, properly indicate if the invocation data is not yet
complete.
Diffstat (limited to 'doc/invocations-http-server')
-rwxr-xr-x | doc/invocations-http-server/server.py | 4 | ||||
-rw-r--r-- | doc/invocations-http-server/templates/invocation.html | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py index 68955841..b8ea24d5 100755 --- a/doc/invocations-http-server/server.py +++ b/doc/invocations-http-server/server.py @@ -189,12 +189,14 @@ class InvocationServer: "entries": entries}) def do_get_invocation(self, invocation): - params = {"invocation": invocation} + params = {"invocation": invocation, + "have_profile": False} try: with open(os.path.join( self.logsdir, invocation, self.profile)) as f: profile = json.load(f) + params["have_profile"] = True except: profile = {} diff --git a/doc/invocations-http-server/templates/invocation.html b/doc/invocations-http-server/templates/invocation.html index 7fec7e6e..65ec9127 100644 --- a/doc/invocations-http-server/templates/invocation.html +++ b/doc/invocations-http-server/templates/invocation.html @@ -98,6 +98,7 @@ Inocations {{invocation | e}} {% endif %} </ul> +{% if have_profile %} <h2>Failed actions</h2> {% if failed_actions %} <ul> @@ -124,7 +125,9 @@ In order of decreasing run time. {% else %} <i>(none)</i> {% endif %} - +{% else %} +<b>No profiling data available; invocation data is not (yet) complete.</b> +{% endif %} {% endblock %} |