OXYGENHUB
# 80642fde09cc oxygenhub / templates / flow_runs.html
3.6 KiB · HTML · last changed Push without starting a run: [skip flow] (closes #284) 16 days ago source blame history raw
42fa9554 Andy McCall ↶ 1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Flow · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "flow") %}{% endblock %}
6
{% block content %}
e97500b7 Andy McCall ↶ 7
<div class="head"><h1>Flow <small>pipeline runs · <a href="{{ repo.url }}/deployments">deployments</a> · <a href="{{ repo.url }}/insights" target="_blank" rel="noopener" title="Pickup time, jobs, durations and runners, charted">charts ↗</a></small></h1>
4f692533 Andy McCall ↶ 8
{% if can_run %}<form class="inline" method="post" action="{{ repo.url }}/flow/start"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><label for="run-bookmark" class="small mute">Run the pipeline of</label> <select id="run-bookmark" name="bookmark">{% for b in bookmarks %}<option value="{{ b }}">{{ b }}</option>{% endfor %}</select> <button type="submit" class="primary-btn">Run pipeline</button></form>{% endif %}
1edac4b6 Andy McCall ↶ 9
</div>
4f692533 Andy McCall ↶ 10
{% if let Some(w) = why_not %}<p class="small mute">{{ w }}</p>{% endif %}
1edac4b6 Andy McCall ↶ 11
{% if let Some(e) = error %}<p class="error">Could not start a run: {{ e }}</p>{% endif %}
42fa9554 Andy McCall ↶ 12
{% if runs.is_empty() %}
13
<section class="panel">
14
  {% if enabled %}
4f692533 Andy McCall ↶ 15
  <p>No runs yet. Add <code>.flow/pipeline.kdl</code> to a bookmark and push: every push that moves a bookmark runs it in OxygenFlow microVMs. Once it is there, <strong>Run pipeline</strong> above runs a bookmark's current state without a push, as does the button beside each bookmark and on each change.</p>
42fa9554 Andy McCall ↶ 16
  {% else %}
c7067c7b Andy McCall 17
  <p>OxygenFlow is not enabled for this repository. A site administrator turns it on under <a href="{{ repo.url }}/settings/flow">Settings › Pipelines</a>.</p>
42fa9554 Andy McCall ↶ 18
  {% endif %}
19
<pre class="snippet">schema-version 1
20
21
sandbox "alpine" {
22
    runtime "microvm"
23
    rootfs "cas://blob/…"   // flow rootfs import prints this
24
    memory-limit "512MiB"
25
}
26
27
job "test" {
28
    sandbox "alpine"
29
    exec "sh" "-eu" "test.sh"
30
}</pre>
31
</section>
32
{% else %}
33
<table class="list flow-runs">
34
  <thead><tr><th></th><th>Run</th><th>Jobs</th><th>Bookmark</th><th>State</th><th>By</th><th>When</th><th>Took</th></tr></thead>
35
  <tbody>
36
  {% for row in runs %}
37
  <tr class="st-{{ row.r.status }}">
38
    <td class="st"><span class="flow-glyph st-{{ row.r.status }}" title="{{ row.r.status }}">{{ crate::web::flow::glyph(row.r.status) }}</span></td>
bf3d0754 Andy McCall ↶ 39
    <td><a href="{{ repo.url }}/flow/{{ row.r.number }}"><strong>#{{ row.r.number }}</strong></a> <span class="small mute">{{ row.r.status }}{% if let Some(p) = row.place %}, {{ p }}{% endif %}</span></td>
367f34b8 Andy McCall ↶ 40
    <td class="flow-dots">{% for (n, s) in row.jobs %}<span class="flow-glyph st-{{ s }}" title="{{ n }}: {{ s }}">{{ crate::web::flow::glyph(s) }}</span>{% endfor %}{% if row.r.status == "error" %}<span class="small bad">pipeline invalid</span>{% else if row.r.status == "skipped" %}<span class="small mute" title="{{ row.r.error }}">skipped by its push</span>{% endif %}</td>
4f692533 Andy McCall ↶ 41
    <td>{% if row.r.bookmark.is_empty() %}<span class="tag" title="Run on one change, not a bookmark">change</span>{% else %}<span class="lbl lbl-bm">{{ row.r.bookmark }}</span>{% endif %}</td>
af9c6ca1 Andy McCall ↶ 42
    <td><a href="{{ repo.url }}/tree/{{ row.r.heads }}" title="state {{ row.r.state }}"><code>{{ row.r.state|short }}</code></a></td>
42fa9554 Andy McCall ↶ 43
    <td>{{ row.r.actor }}</td>
44
    <td><time title="{{ row.r.created_ms|when_i }}">{{ row.r.created_ms|ago_i }}</time></td>
45
    <td class="small mute">{{ row.duration }}</td>
46
  </tr>
47
  {% endfor %}
48
  </tbody>
49
</table>
50
{% if let Some(b) = older %}<p class="center"><a class="go small" href="{{ repo.url }}/flow?before={{ b }}">older runs</a></p>{% endif %}
51
{% endif %}
52
{% endblock %}