dr-sandbox/app/web/templates/_runs.html
Michael Pilosov d70eff3704 runs filter: N + T chip rows; group all/none meta chips; explicit row layout
- Add N and T axes alongside dataset/algorithm; chips populated from runs
  in the list, axis group hidden when there's a single unique value.
- Dataset+algorithm on row 1, N+T on row 2 via two explicit
  .runs-filter-row flex containers (cleaner than a sentinel break elem
  that double-counted the row-gap).
- 'all' and 'none' meta-chips now wrap as a unit inside .chip-meta-wrap
  so one doesn't orphan to the next line.
- Row is hidden entirely when every axis in it collapses to a single
  value (:has selector on .runs-filter-row).
2026-04-22 17:20:08 -06:00

81 lines
3.6 KiB
HTML

{#
Partial: runs list (right column).
Expects: runs (list of normalised view dicts), optional just_submitted (id)
#}
{% if not runs %}
<div class="empty">No runs yet. Dispatch one from the form on the left.</div>
{% else %}
<ul class="runs">
{% for r in runs %}
<li class="run {% if just_submitted is defined and r.id == just_submitted %}just-submitted{% endif %}{% if r.stale %} stale{% endif %}"
data-embedder="{{ r.embedder_short or '' }}"
data-generator="{{ r.generator_short or '' }}"
data-n="{{ r.params.get('num_points', '') if r.params else '' }}"
data-t="{{ r.params.get('num_timesteps', r.params.get('num_snapshots', '')) if r.params else '' }}">
{% if r.emb_exists and not r.stale %}
<input type="checkbox" class="compare-cb" data-stem="{{ r.emb_file[:-5] }}" aria-label="select run for comparison" />
{% else %}
<span class="compare-cb-slot" aria-hidden="true"></span>
{% endif %}
<div class="stamp">
{% if r.runtime %}<span class="rt">{{ r.runtime }}</span>{% endif %}
{% if r.start %}{{ r.start[:10] }}<br/>{{ r.start[11:19] }}{% else %}&nbsp;{% endif %}
<span class="id">#{{ r.short_id }}</span>
</div>
<div class="body">
<div class="line1">
<span class="badge {{ r.state_type|lower }}">{{ r.state_name }}</span>
<span class="recipe">
<span class="embedder">{{ r.embedder_short or "?" }}</span>
<em>on</em>
<span class="generator">{{ r.generator_short or "?" }}</span>
</span>
</div>
{% if r.params %}
<div class="paramline">
<span><span class="k">N</span>&nbsp;{{ r.params.get('num_points', '?') }}</span>
<span><span class="k">T</span>&nbsp;{{ r.params.get('num_timesteps', r.params.get('num_snapshots', '?')) }}</span>
<span><span class="k">J</span>&nbsp;{{ r.params.get('jitter_scale', '?') }}</span>
<span><span class="k">s</span>&nbsp;{{ r.params.get('seed', '?') }}</span>
{% set ea = r.params.get('embed_args') or {} %}
{% if ea %}
{% for k, v in ea.items() %}
{% if k not in ('n_components','n_dims','random_state') %}
<span><span class="k">{{ k }}</span>&nbsp;{{ v }}</span>
{% endif %}
{% endfor %}
{% endif %}
</div>
{% endif %}
<div class="outputs">
<span class="tag">fig</span>
{% if r.stale %}<span class="stale-note" title="a newer run with identical params overwrote this output">overwritten</span>{% endif %}
{% if r.ref_file %}
{% if r.ref_exists %}
<a href="/figs/{{ r.ref_file }}" target="_blank" rel="noopener">reference</a>
{% else %}
<a aria-disabled="true">reference</a>
{% endif %}
{% else %}
<span style="color:var(--faint);font-style:italic">reference: n/a</span>
{% endif %}
{% if r.emb_file %}
{% if r.emb_exists %}
<a href="/figs/{{ r.emb_file }}" data-role="embedding-link"
data-stem="{{ r.emb_file[:-5] }}" target="_blank" rel="noopener">embedding</a>
{% else %}
<a aria-disabled="true">embedding</a>
{% endif %}
{% else %}
<span style="color:var(--faint);font-style:italic">embedding: n/a</span>
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
{% endif %}