Files
RoleForge/app/templates/molecule-tests.xhtml
Sergey Antropoff 1d2301fb09 first commit
2026-04-30 08:59:31 +03:00

91 lines
4.3 KiB
HTML

{% extends "base.xhtml" %}
{% from "macros/page-hero.xhtml" import page_hero %}
{% block content %}
{% if molecule_sub == "run" %}
{{ page_hero("Testing", "Molecule — Run Test", "Queue a Molecule run; open the job from Tasks or copy the molecule run id for Run Details.") }}
{% elif molecule_sub == "details" %}
{{ page_hero("Testing", "Molecule — Run Details", "Load a stored Molecule run by id (from a finished job, Reports, or the API).") }}
{% else %}
{{ page_hero("Testing", "Molecule — Reports", "Recent runs in this app. JUnit HTML from "make molecule-report" on a dev host stays on disk (e.g. /tmp/molecule-report.html) — see docs/molecule-testing.md.") }}
{% endif %}
<section class="card mol-sec mol-sec--run" data-mol="run">
<h2>Run Test</h2>
<form id="molecule-form" class="form-modern">
<div class="schema-grid">
<div class="schema-field">
<label for="molecule-cluster-id">Cluster</label>
<select id="molecule-cluster-id" required="required"></select>
</div>
<div class="schema-field">
<label for="molecule-scenario">Scenario</label>
<input id="molecule-scenario" type="text" value="default" required="required" />
</div>
<div class="schema-field schema-field-wide">
<label id="molecule-scope-label">Test Scope</label>
<div class="radio-segment-group" role="radiogroup" aria-labelledby="molecule-scope-label">
<label class="radio-segment">
<input type="radio" name="molecule-scope" value="cluster" checked="checked" />
<span class="radio-segment-face">
<span class="radio-segment-title">Cluster topology</span>
<span class="radio-segment-desc">Molecule on full cluster</span>
</span>
</label>
<label class="radio-segment">
<input type="radio" name="molecule-scope" value="addon" />
<span class="radio-segment-face">
<span class="radio-segment-title">Single addon</span>
<span class="radio-segment-desc">One addon role</span>
</span>
</label>
<label class="radio-segment">
<input type="radio" name="molecule-scope" value="role" />
<span class="radio-segment-face">
<span class="radio-segment-title">Role</span>
<span class="radio-segment-desc">Arbitrary Ansible role</span>
</span>
</label>
</div>
</div>
<div class="schema-field">
<label for="molecule-addon-target">Addon target</label>
<select id="molecule-addon-target"></select>
</div>
<div class="schema-field">
<label for="molecule-role">Role name</label>
<input id="molecule-role" type="text" placeholder="role name (optional)" />
</div>
<div class="schema-field schema-field-wide">
<div class="form-check form-switch">
<input class="form-check-input" id="molecule-use-makefile" type="checkbox" checked="checked" />
<label class="form-check-label" for="molecule-use-makefile">Use Makefile target mapping</label>
</div>
</div>
</div>
<div class="form-actions form-actions-start">
<button type="submit">Run Molecule</button>
</div>
</form>
<pre id="molecule-run-output" class="form-output"></pre>
</section>
<section class="card mol-sec mol-sec--details" data-mol="details">
<h2>Run Details</h2>
<form id="molecule-load-form" class="form-modern">
<div class="schema-field" style="max-width: 12rem">
<label for="molecule-run-id">Run id</label>
<input id="molecule-run-id" type="number" min="1" required="required" />
</div>
<div class="form-actions form-actions-start">
<button type="submit">Load result</button>
</div>
</form>
<pre id="molecule-result-output" class="form-output"></pre>
</section>
<section class="card mol-sec mol-sec--reports" data-mol="reports">
<h2>Reports</h2>
<p class="muted" style="margin: 0.25rem 0 0.75rem">Runs you have access to (newest first). Open <a href="/molecule/details" class="menu-link">Run details</a> for full JSON, or the task for live logs.</p>
<div id="molecule-reports-list" class="table-wrap" aria-live="polite">
<p class="muted" style="margin: 0">Loading…</p>
</div>
</section>
{% endblock %}