{# Shared pieces. Markers and help text come from the spec field catalog (UI_WIREFRAMES design principles). #} {% macro marker(path) -%} {%- set f = field(path) -%} {%- if f and f.tag == "mandatory" %} * {%- elif f and f.tag == "conditional" %} * {%- endif -%} {%- endmacro %} {% macro help(path) -%} {%- set f = field(path) -%} {%- if f %}{{ f.description | md }}{% if f.tag == "optional" and f.default_text %} · optional, default {{ f.default_text }}{% elif f.tag == "conditional" %} · required {{ f.condition }}{% endif %}{% endif -%} {%- endmacro %} {% macro result_box(r) -%} {% if r %}
{% if r.ok %}✔{% elif r.ok is sameas false %}✖{% endif %} {{ r.title }}
{% if r.lines %}{% endif %} {% if r.checks %} {% for c in r.checks %}{% endfor %}
checkstatusdetail
{{ c.name }}{{ c.status }}{{ c.message }}
{% endif %}
{% if r.table and r.table.rows %}
{% for c in r.table.columns %}{% endfor %} {% for row in r.table.rows %}{% for v in row %}{% endfor %}{% endfor %}
{{ c }}
{{ cell(v) }}
{% endif %} {% endif %} {%- endmacro %} {% macro status_of(code) -%} {{ '● ok' if code == 0 else '✖ exit ' ~ code }} {%- endmacro %}