summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/invocations-http-server/server.py10
-rw-r--r--doc/invocations-http-server/templates/invocation.html9
2 files changed, 17 insertions, 2 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py
index 05832ada..6ff6b668 100755
--- a/doc/invocations-http-server/server.py
+++ b/doc/invocations-http-server/server.py
@@ -15,6 +15,7 @@
import jinja2
import json
+import re
import os
import subprocess
import werkzeug.exceptions
@@ -328,7 +329,14 @@ class InvocationServer:
params["repo_config"] = meta.get('configuration')
params["exit_code"] = profile.get('exit code')
- params["analysis_errors"] = profile.get('analysis errors', [])
+ analysis_errors = []
+ blob_pattern = re.compile(r'blob ([0-9A-Za-z]{40,64})')
+ for s in profile.get('analysis errors', []):
+ analysis_errors.append({
+ "msg": s,
+ "blobs": blob_pattern.findall(s),
+ })
+ params["analysis_errors"] = analysis_errors
params["remote_address"] = profile.get('remote', {}).get('address')
remote_props = []
for k, v in profile.get('remote', {}).get('properties', {}).items():
diff --git a/doc/invocations-http-server/templates/invocation.html b/doc/invocations-http-server/templates/invocation.html
index c8d77f58..50d5690a 100644
--- a/doc/invocations-http-server/templates/invocation.html
+++ b/doc/invocations-http-server/templates/invocation.html
@@ -158,7 +158,14 @@ Inocations {{invocation | e}}
<h2>Analysis errors</h2>
<ul>
{% for error in analysis_errors %}
- <li> <pre>{{ error | e}}</pre></li>
+ <li> <pre>{{ error["msg"] | e}}</pre>
+ {% if error["blobs"] %}
+ Blobs:
+ {% for blob in error["blobs"] %}
+ <a href="/blob/{{ blob | e }}"><tt>{{ blob | e }}</tt></a>
+ {% endfor %}
+ {% endif %}
+ </li>
{% endfor %}
</ul>
{% else %}