{% extends "base.html" %} {#- one form, two uses: `editing` is the key of the entry being changed, or none to add one #} {% block title %}{{ 'Edit ' ~ values.get('title', editing) if editing else 'Add a Harbor benchmark' }} — Nullius{% endblock %} {% block crumb %}/ benchmarks / {% if editing %}{{ editing }} / edit{% else %}add{% endif %}{% endblock %} {% block head %}{% endblock %} {% block body %} {% set v = values %} {% macro radio(name, value, title, sub='', disabled=false) %} {% endmacro %}
{% if editing %}

Edit {{ values.get('title') or editing }}

Saving writes {{ catalogue_dir }}/benchmarks/{{ editing }}/benchmark.json; the entry's other files and fields are kept.

{% else %}

Add a Harbor benchmark

Name the dataset, read it from Harbor, check the entry. Saving writes {{ catalogue_dir }}/benchmarks/<key>/benchmark.json.

{% endif %}
{% if not writable %}

Benchmarks are added from a browser on the application host only.

{% endif %} {% if errors %} {% endif %}

1Where Harbor gets it

{{ radio('source', 'hub', 'Harbor hub', 'org/name, as on hub.harborframework.com') }} {{ radio('source', 'registry', 'Harbor registry', 'name@version, as Harbor\'s registry lists it') }}

2Catalogue entry

{% if not editing and routable %} {#- a benchmark already run on the Nullius standard gets this dataset as its Harbor route: one benchmark, one card #} {% endif %}
{#- labels carry no hints, so every box starts on the same line: a hint is the box's placeholder, and a field says something below itself only when there is something to say (nb-msg) #}
Harness
Origin
{% for o in origins %}{{ radio('origin', o, o|capitalize, 'the publisher\'s, run the way it certifies' if o == 'official' else 'found and adapted here: published, flaws still to find') }}{% endfor %}
Timeouts, seconds as the dataset's tasks declare them: read from Harbor
{% for key, label in [('env_setup', 'Environment setup'), ('agent_setup', 'Agent setup'), ('agent_run', 'Agent'), ('verify', 'Verifier')] %} {% endfor %}
{% if v.get('logo_kept') %}{% endif %}
Dataset key and title
Cancel
{% endblock %}