| 1 |
{% extends "base.html" %} |
| 2 |
{% import "admin_nav.html" as an %} |
| 3 |
{% block title %}Runner settings · Administration{% endblock %} |
| 4 |
{% block content %} |
| 5 |
<div class="head"><h1>Runners <small><a href="/admin">Administration</a></small></h1></div> |
| 6 |
<div class="settings-layout"> |
| 7 |
{% call an::nav(crate::web::admin::AdminSection::RunnerSettings) %} |
| 8 |
<div class="sections settings-body"> |
| 9 |
<div class="bar"><span class="modes"><a href="/admin/runners">runners</a><a href="/admin/runners/images">images</a><a href="/admin/runners/settings" class="on">settings</a></span></div> |
| 10 |
{% if let Some(n) = notice %}<p class="note">{{ n }}</p>{% endif %} |
| 11 |
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %} |
| 12 |
<form class="card wide" method="post" action="/admin/runners/settings"> |
| 13 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 14 |
<h2>Job time limits</h2> |
| 15 |
<p class="small mute">A pipeline sets a job's limit with <code>timeout "90m"</code> on the job or its sandbox. These apply to every repository on this hub, to jobs claimed from now on.</p> |
| 16 |
<label for="default_minutes">Default, for a job whose pipeline sets none (minutes)</label> |
| 17 |
<input type="number" id="default_minutes" name="default_minutes" min="1" max="1440" value="{{ default_m }}" required> |
| 18 |
<p class="small mute">hub.toml says {{ file_default_m }}; this page's value wins once saved.</p> |
| 19 |
<label for="max_minutes">Maximum a pipeline may ask for (minutes)</label> |
| 20 |
<input type="number" id="max_minutes" name="max_minutes" min="1" max="1440" value="{{ max_m }}" required> |
| 21 |
<p class="small mute">A longer <code>timeout</code> is cut to this.</p> |
| 22 |
<label for="grace_minutes">Lost after (minutes past a job's limit)</label> |
| 23 |
<input type="number" id="grace_minutes" name="grace_minutes" min="1" max="120" value="{{ grace_m }}" required> |
| 24 |
<p class="small mute">A runner stops a job at its limit and says so at once; a job still running this long after is one its runner no longer reports, and the hub ends it.</p> |
| 25 |
<button type="submit">Save</button> |
| 26 |
</form> |
| 27 |
<form class="card wide" id="priority" method="post" action="/admin/runners/priority"> |
| 28 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 29 |
<h2>Priority</h2> |
| 30 |
<p>Runners take higher levels first; within a level, repositories take turns. An organisation or repository can set its own level, and a maintainer can expedite one run to urgent, with a reason.</p> |
| 31 |
<label for="priority-site">The site's level</label> |
| 32 |
<select id="priority-site" name="priority">{% for p in ["low", "normal", "high"] %}<option{% if *p == priority %} selected{% endif %}>{{ p }}</option>{% endfor %}</select> |
| 33 |
<label for="expedite-cap">The most expedited runs one owner may have going at once</label> |
| 34 |
<input type="number" id="expedite-cap" name="expedite_cap" min="0" max="100" value="{{ expedite_cap }}"> |
| 35 |
<button type="submit">Save</button> |
| 36 |
</form> |
| 37 |
<section class="panel"> |
| 38 |
<h2>Repositories that run Flow</h2> |
| 39 |
{% if flow_repos.is_empty() %}<p class="mute">None listed in hub.toml; each repository's administrator switches Flow on in its Settings.</p>{% else %}<ul class="plain">{% for r in flow_repos %}<li><code>{{ r }}</code></li>{% endfor %}</ul><p class="small mute">From hub.toml's <code>[flow] repos</code>; others are switched on in each repository's Settings.</p>{% endif %} |
| 40 |
</section> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
{% endblock %} |