summaryrefslogtreecommitdiff
path: root/doc/invocations-http-server/templates
diff options
context:
space:
mode:
Diffstat (limited to 'doc/invocations-http-server/templates')
-rw-r--r--doc/invocations-http-server/templates/base.html13
-rw-r--r--doc/invocations-http-server/templates/blob.html10
-rw-r--r--doc/invocations-http-server/templates/failure.html24
-rw-r--r--doc/invocations-http-server/templates/invocation.html130
-rw-r--r--doc/invocations-http-server/templates/invocations.html35
-rw-r--r--doc/invocations-http-server/templates/tree.html14
6 files changed, 226 insertions, 0 deletions
diff --git a/doc/invocations-http-server/templates/base.html b/doc/invocations-http-server/templates/base.html
new file mode 100644
index 00000000..cf591652
--- /dev/null
+++ b/doc/invocations-http-server/templates/base.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>
+ {% block heading %}Invocation Browser{% endblock %}
+ </title>
+ </head>
+ <body>
+ {% block content %}
+ <i>(no content)</i>
+ {% endblock %}
+ </body>
+</html>
diff --git a/doc/invocations-http-server/templates/blob.html b/doc/invocations-http-server/templates/blob.html
new file mode 100644
index 00000000..2a64d064
--- /dev/null
+++ b/doc/invocations-http-server/templates/blob.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+{% block heading %}
+Blob {{ name | e }}
+{% endblock %}
+
+{% block content %}
+<h1>Blob {{ name | e }}</h1>
+
+<pre>{{ data | e}}</pre>
+{% endblock %}
diff --git a/doc/invocations-http-server/templates/failure.html b/doc/invocations-http-server/templates/failure.html
new file mode 100644
index 00000000..30892281
--- /dev/null
+++ b/doc/invocations-http-server/templates/failure.html
@@ -0,0 +1,24 @@
+{% extends "base.html" %}
+{% block heading %}
+Failure calling an external process
+{% endblock %}
+
+{% block content %}
+<h1>Failure calling an external process</h1>
+
+<ul>
+ {% if failure_kind %}
+ <li> <b>{{ failure_kind | e }}</b></li>
+ {% endif %}
+ <li> Command: <tt>{{ cmd|e }}</tt></li>
+ <li> exit code: <tt>{{ exit_code|e }}</tt></li>
+ {% if stdout %}
+ <li> stdout:
+ <pre>{{ stdout | e }}</pre></li>
+ {% endif %}
+ {% if stderr %}
+ <li> stderr:
+ <pre>{{ stderr | e }}</pre></li>
+ {% endif %}
+</ul>
+{% endblock %}
diff --git a/doc/invocations-http-server/templates/invocation.html b/doc/invocations-http-server/templates/invocation.html
new file mode 100644
index 00000000..7fec7e6e
--- /dev/null
+++ b/doc/invocations-http-server/templates/invocation.html
@@ -0,0 +1,130 @@
+{% extends "base.html" %}
+{% block heading %}
+Inocations {{invocation | e}}
+{% endblock %}
+
+{% macro show_action(action) %}
+<li>
+ <details>
+ <summary>
+ {{ action["name_prefix"] | e }} <tt>{{ action["name"] | e}}</tt>
+ {% if action["may_fail"] %}
+ {% if action["exit_code"] != 0 %}
+ failure: <b>{{ action["may_fail"] }}</b>
+ {% else %}
+ tainted (<tt>{{ action["may_fail"] }}</tt>)
+ {% endif %}
+ {% elif action["primary_output"] %}
+ {% if action["exit_code"] != 0 %}
+ failed to build: <b>{{ action["primary_output"] | e }}</b>
+ {% else %}
+ build: <tt>{{ action["primary_output"] | e }}</tt>
+ {% endif %}
+ {% endif %}
+ </summary>
+ <ul>
+ {% if action["stdout"] %}
+ <li> stdout: <a href="/blob/{{ action["stdout"] | e }}">{{action["stdout"] | e }}</a></li>
+ {% endif %}
+ {% if action["stderr"] %}
+ <li> stderr: <a href="/blob/{{ action["stderr"] | e }}">{{action["stderr"] | e }}</a></li>
+ {% endif %}
+ {% if action["origins"] %}
+ <li> origins
+ <ul>
+ {% for origin in action["origins"] %}
+ <li> <tt>{{ origin | e }}</tt></li>
+ {% endfor %}
+ </ul>
+ </li>
+ {% endif %}
+ {% if action["exit_code"] != 0 %}
+ <li> exit code: {{ action["exit_code"] }}</li>
+ {% endif %}
+ {% if action["output"] %}
+ <li> output
+ <ul>
+ {% for out in action["output"] %}
+ {% if action["artifacts"].get(out) %}
+ <li> <a href="/blob/{{ action["artifacts"].get(out) | e}}"><tt>{{ out | e }}</tt></a></li>
+ {% else %}
+ <li> <tt>{{ out | e }}</tt></li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </li>
+ {% endif %}
+ {% if action["output_dirs"] %}
+ <li> output directories
+ <ul>
+ {% for out in action["output_dirs"] %}
+ {% if action["artifacts"].get(out) %}
+ <li> <a href="/tree/{{ action["artifacts"].get(out) | e}}"><tt>{{ out | e }}</tt></a></li>
+ {% else %}
+ <li> <tt>{{ out | e }}</tt></li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </li>
+ {% endif %}
+ </ul>
+ </details>
+</li>
+{% endmacro %}
+
+{% block content %}
+<h1>Invocation {{invocation | e}}</h1>
+
+<h2>Overview</h2>
+<ul>
+ {% if cmd %}
+ <li> Subcommand and positional arguments: <tt>{{ cmd | e }}</tt></li>
+ {% endif %}
+ {% if cmdline %}
+ <li> Full command line: <tt>{{ cmdline | e }}</tt></li>
+ {% endif %}
+ {% if repo_config %}
+ <li> Repository configuration:
+ <a href="/blob/{{ repo_config | e }}">{{ repo_config | e}}</a></li>
+ {% endif %}
+ {% if target %}
+ <li> Target: <tt>{{ target | e }}</tt></li>
+ {% endif %}
+ {% if config %}
+ <li> Target configuration: <tt>{{ config | e }}</tt></li>
+ {% endif %}
+ {% if exit_code != None %}
+ <li> exit code: {{ exit_code | e }}</li>
+ {% endif %}
+</ul>
+
+<h2>Failed actions</h2>
+{% if failed_actions %}
+<ul>
+ {% for action in failed_actions %}
+ {{ show_action(action) }}
+ {% endfor %}
+</ul>
+{% else %}
+<i>(none)</i>
+{% endif %}
+
+
+<h2>Remaining non-cached actions</h2>
+{% if non_cached %}
+In order of decreasing run time.
+<ul>
+ {% for action in non_cached %}
+ {{ show_action(action) }}
+ {% endfor %}
+ {% if more_non_cached %}
+ <li> &hellip; and {{ more_non_cached | e }} actions</li>
+ {% endif %}
+</ul>
+{% else %}
+<i>(none)</i>
+{% endif %}
+
+
+
+{% endblock %}
diff --git a/doc/invocations-http-server/templates/invocations.html b/doc/invocations-http-server/templates/invocations.html
new file mode 100644
index 00000000..bab67cd3
--- /dev/null
+++ b/doc/invocations-http-server/templates/invocations.html
@@ -0,0 +1,35 @@
+{% extends "base.html" %}
+{% block heading %}
+Recent Invocations
+{% endblock %}
+
+{% block content %}
+<h1>Recent Invocations</h1>
+{% if invocations %}
+<ul>
+ {% for invocation in invocations %}
+ <li> <a href="/invocations/{{invocation.name |e}}">{{ invocation.name | e }}</a>
+ {% if invocation.subcommand %}
+ {{ invocation.subcommand | e }}
+ {% endif %}
+ {% if invocation.target %}
+ <tt>{{ invocation.target | e}}@{{ invocation.config | e}}</tt>
+ {% endif %}
+ {% if invocation.exit_code != 0 %}
+ <b>
+ {% if invocation.exit_code == 1 %}
+ build failed
+ {% elif invocation.exit_code == 2 %}
+ failed
+ {% else %}
+ exit code {{ invocation.exit_code | e }}
+ {% endif %}
+ </b>
+ {% endif %}
+ </li>
+ {% endfor %}
+</ul>
+{% else %}
+<i>(none)</i>
+{% endif %}
+{% endblock %}
diff --git a/doc/invocations-http-server/templates/tree.html b/doc/invocations-http-server/templates/tree.html
new file mode 100644
index 00000000..765be73e
--- /dev/null
+++ b/doc/invocations-http-server/templates/tree.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+{% block heading %}
+Tree {{ name | e }}
+{% endblock %}
+
+{% block content %}
+<h1>Tree {{ name | e }}</h1>
+
+<ul>
+ {% for entry in entries %}
+ <li><a href="/{{ entry["type"] | e}}/{{ entry["hash"] | e}}">{{ entry["path"] | e}}</a></li>
+ {% endfor %}
+</ul>
+{% endblock %}