{# Run-configuration fields, from presenters.params_view(). Rendered both into the page and, on a pipeline switch, straight into #params-area by /set_pipeline — so this file is the only place the form exists. Field ids are prefixed: a parameter is free to be called "terminal" or "run-btn", and an unprefixed id would then collide with the app's own. A field the run does not use is hidden rather than dropped: it keeps submitting the value it held, so ticking "skip QC" back off restores the thresholds instead of resetting them, and the server ignores whatever a hidden field sends (see model.params.inactive_ids). "active" is only the first paint — data-active-when carries the same condition to the page, which re-evaluates it as the form is filled in. #} {% macro field_state(p) -%} data-param="{{ p.id }}" {%- if p.active_when %} data-active-when='{{ p.active_when | tojson }}'{% endif %} {%- if not p.active %} hidden{% endif %} {%- endmacro %} {# What "reset" puts back. JSON, so a number the pipeline leaves unset stays null rather than becoming the string "None", and a flag stays a boolean. #} {% macro default_of(p) -%} data-default="{{ p.default | tojson | forceescape }}" {%- endmacro %} {# Per section, not per form: a run customises a group or two, and putting one of them back should not throw away what was chosen in the others. #} {% macro reset_button(section) -%} {%- endmacro %} {% macro section_body(section, values) %} {% set live_fields = section.fields | selectattr('active') | list %} {% if section.fields %}
{{ section.description }}
{% endif %} {{ section_body(section, values) }}This pipeline exposes no configurable parameters.
{% endfor %}