Files
docker-images/python-tools/templates/index.html
T
ajp_anton b256147d28
Build custom container images / build (map[base_image:php:8-fpm-alpine build_args:PHP_VERSION=8 context:php8-pgsql fingerprint_command:{ apk info -v | LC_ALL=C sort; find /usr/local/lib/php/extensions /usr/local/etc/php/conf.d -type f -exec sha256sum {} + | LC_ALL=C sort; } name:ph… (push) Successful in 48s
Build custom container images / build (map[base_image:postgres:18 build_args:PG_VERSION=18 POSTGIS_VERSION=3 VCHORD_VERSION=0.5.3 context:postgres fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; find /usr/lib/postgresql -type f -exec sha256su… (push) Successful in 1m41s
Build custom container images / build (map[base_image:python:3 build_args:PYTHON_VERSION=3 context:python-tools fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; pip freeze | LC_ALL=C sort; } name:python-tools oci_labels:org.opencontainers.ima… (push) Successful in 1m19s
Refine task form controls
2026-08-18 03:19:07 +00:00

126 lines
6.8 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h1>Tasks</h1>
{% if not groups %}
<p>No task groups found.</p>
{% endif %}
{% for group in groups %}
{% set group_run = latest[("group", group.id)] %}
<section class="group">
<div class="group-heading">
<h2>{{ group.display_name }}</h2>
{% if group.can_run_as_group %}
<form method="post" action="{{ url_for('run_group', group_id=group.id) }}">
<button type="submit">Run group</button>
</form>
{% endif %}
</div>
{% if group_run %}
<p class="run-summary">
Group: <a href="{{ url_for('run_detail', run_id=group_run.id) }}">{{ group_run.status }}</a>
· {{ group_run.finished_at|timestamp if group_run.finished_at else "in progress" }}
</p>
{% endif %}
<ul class="tasks">
{% for task in group.tasks %}
{% set task_run = latest[("task", task.id)] %}
<li class="task">
<div class="task-details">
<h3>{{ task.display_name }}</h3>
{% if task.description %}<p>{{ task.description }}</p>{% endif %}
{% if task_run %}
<p class="run-summary">
Last run:
<a href="{{ url_for('run_detail', run_id=task_run.id) }}">{{ task_run.status }}</a>
· {{ task_run.finished_at|timestamp if task_run.finished_at else "in progress" }}
· <a href="{{ url_for('history', target_kind='task', target_path=task.id) }}">history</a>
</p>
{% endif %}
</div>
<form class="task-form" method="post" action="{{ url_for('run_task', task_id=task.id) }}" enctype="multipart/form-data"{% if task.wait_for_result %} data-wait-for-result{% endif %}{% if task.download_artifacts %} data-download-artifacts{% endif %}>
{% set values = form_values.get(task.id, {}) %}
{% set errors = input_errors.get(task.id, {}) %}
<div class="task-options">
{% for field in task.inputs %}
{% if not task.execution or field.name != task.execution.field.name %}
<div class="task-input">
{% if field.type == "file" %}
<label>{{ field.label }}{% if field.required %} (required){% endif %}
<input type="file" name="{{ field.name }}" {% if field.required %}required{% endif %}{% if field.accept %} accept="{{ field.accept|join(',') }}"{% endif %}>
</label>
{% elif field.type == "multi_choice" %}
<fieldset>
<legend>{{ field.label }}{% if field.required %} (required){% endif %}</legend>
{% set selected = values.get(field.name, field.default or ()) %}
{% for option in field.options %}
<label>
<input type="checkbox" name="{{ field.name }}" value="{{ option.value }}" {% if option.value in selected %}checked{% endif %}>
{{ option.label }}
</label>
{% endfor %}
</fieldset>
{% elif field.type == "choice" %}
<label>{{ field.label }}
<select name="{{ field.name }}" {% if field.required %}required{% endif %}>
{% if not field.required %}<option value="">No selection</option>{% endif %}
{% set selected = values.get(field.name, field.default or "") %}
{% for option in field.options %}
<option value="{{ option.value }}" {% if option.value == selected %}selected{% endif %}>{{ option.label }}</option>
{% endfor %}
</select>
</label>
{% else %}
{% set html_type = "password" if field.sensitive else "number" if field.type == "integer" else "datetime-local" if field.type == "datetime" else field.type %}
<label>{{ field.label }}{% if field.required %} (required){% endif %}
<input
type="{{ html_type }}"
name="{{ field.name }}"
value="{{ "" if field.sensitive else values.get(field.name, field.default if field.default is not none else "") }}"
{% if field.sensitive %}autocomplete="off"{% endif %}
{% if field.required %}required{% endif %}
{% if field.minimum is not none %}min="{{ field.minimum }}"{% endif %}
{% if field.maximum is not none %}max="{{ field.maximum }}"{% endif %}
{% if field.step is not none %}step="{{ field.step }}"{% endif %}
{% if field.pattern %}pattern="{{ field.pattern }}"{% endif %}
>
</label>
{% endif %}
{% if errors.get(field.name) %}<p class="input-error">{{ errors[field.name] }}</p>{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
<div class="task-action">
{% if task.execution %}
<div class="split-button">
{% set execution = task.execution.field %}
{% set selected = values.get(execution.name, execution.default) %}
<label class="visually-hidden" for="{{ task.id|replace('/', '-') }}-{{ execution.name }}">Run mode</label>
<select id="{{ task.id|replace('/', '-') }}-{{ execution.name }}" name="{{ execution.name }}" data-execution-mode>
{% for option in execution.options %}
<option value="{{ option.value }}" {% if option.value == selected %}selected{% endif %}>{{ option.label }}</option>
{% endfor %}
</select>
<button type="submit">
<span class="button-label">{{ task.execution.field.options[0].label }}</span>
{% if task.wait_for_result %}<span class="spinner" aria-hidden="true"></span>{% endif %}
</button>
</div>
{% else %}
<button type="submit">
<span class="button-label">Run</span>
{% if task.wait_for_result %}<span class="spinner" aria-hidden="true"></span>{% endif %}
</button>
{% endif %}
</div>
{% if task.wait_for_result %}<p class="task-result" aria-live="polite"></p>{% endif %}
</form>
</li>
{% else %}
<li>No exposed tasks in this group.</li>
{% endfor %}
</ul>
</section>
{% endfor %}
{% endblock %}