From 52af0031631c562106dfc568b3483d3a5ced05e3 Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Tue, 20 May 2025 14:54:07 +0200 Subject: invocation server: move show_action macro into separate template file ... to allow reuse. --- doc/invocations-http-server/templates/macros.html | 89 +++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 doc/invocations-http-server/templates/macros.html (limited to 'doc/invocations-http-server/templates/macros.html') diff --git a/doc/invocations-http-server/templates/macros.html b/doc/invocations-http-server/templates/macros.html new file mode 100644 index 00000000..898a422a --- /dev/null +++ b/doc/invocations-http-server/templates/macros.html @@ -0,0 +1,89 @@ +{% macro show_action(action, first = false) %} +
  • + {% if first %} +
    + {% else %} +
    + {% endif %} + + {{ action["name_prefix"] | e }} {{ action["name"] | e}} + {% if action["may_fail"] %} + {% if action["exit_code"] != 0 %} + failure: {{ action["may_fail"] }} + {% else %} + tainted ({{ action["may_fail"] }}) + {% endif %} + {% elif action["primary_output"] %} + {% if action["exit_code"] != 0 %} + failed to build: {{ action["primary_output"] | e }} + {% else %} + build: {{ action["primary_output"] | e }} + {% endif %} + {% endif %} + +
      + {% if action["stdout"] %} +
    • stdout: {{action["stdout"] | e }}
    • + {% endif %} + {% if action["stderr"] %} +
    • stderr: {{action["stderr"] | e }}
    • + {% endif %} + {% if action["cmd"] %} +
    • +
      + command + {{ action["cmd"] | e }} +
      +
    • + {% endif %} + {% if action["origins"] %} +
    • origins +
        + {% for origin in action["origins"] %} +
      • {{ origin | e }}
      • + {% endfor %} +
      +
    • + {% endif %} + {% if action["duration"] %} +
    • duration: {{ action["duration"] | e }}
    • + {% endif %} + {% if action["cached"] %} +
    • cached: {{ action["cached"] | e }}
    • + {% endif %} + {% if action["exit_code"] != 0 %} +
    • exit code: {{ action["exit_code"] }}
    • + {% endif %} + {% if action["output"] %} +
    • output +
        + {% for out in action["output"] %} + {% if action["artifacts"].get(out) %} +
      • + {{ out | e }} + [↓] +
      • + {% else %} +
      • {{ out | e }}
      • + {% endif %} + {% endfor %} +
      +
    • + {% endif %} + {% if action["output_dirs"] %} +
    • output directories +
        + {% for out in action["output_dirs"] %} + {% if action["artifacts"].get(out) %} +
      • {{ out | e }}
      • + {% else %} +
      • {{ out | e }}
      • + {% endif %} + {% endfor %} +
      +
    • + {% endif %} +
    +
    +
  • +{% endmacro %} -- cgit v1.2.3