OXYGENHUB
# c4bffee5b0d4 oxygenhub / templates / diffusion.html
3.4 KiB · HTML · last changed Live L5: the issue page, the overview and Diffusion (closes #207) 18 days ago source blame history raw
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% import "diffusion_rows.html" as d %}
4
{% block title %}Diffusion · {{ repo.owner }}/{{ repo.name }}{% endblock %}
5
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
6
{% block tabs %}{% call m::tabs(repo, "diffusion") %}{% endblock %}
7
{% block content %}
8
<script type="application/json" id="backdrop-data">{{ backdrop|safe }}</script>
9
{% include "backdrop.html" %}
10
<div data-backdrop-avoid>
11
<div class="head"><h1>Diffusion <small>how changes move between this repository and the ones that pin it</small></h1></div>
12
<p class="small mute df-key">Each pill has two halves. Left, the upstream: <span class="df-pill"><span class="df-half df-green">checked</span></span> its own run passed, <span class="df-pill"><span class="df-half df-amber">untested</span></span> it has no checks, <span class="df-pill"><span class="df-half df-red">failing</span></span> its run failed. Right, the repository that pins it: <span class="df-pill"><span class="df-half df-green">passes</span></span> its run on the bump passed, <span class="df-pill"><span class="df-half df-red">fails</span></span> it failed, <span class="df-pill"><span class="df-half df-grey">testing</span></span> still running, <span class="df-pill"><span class="df-half df-green">up to date</span></span> nothing to bump.</p>
13
<div data-live="{{ repo.diffusion_topic() }} {{ repo.live_topic() }}" data-fragment="diffusion">
14
{% if !used_by.is_empty() %}
15
<h2>Diffuses to <span class="count-chip">{{ used_by.len() }}</span></h2>
16
{% if unverified %}<div class="strip warn">{{ repo.owner }}/{{ repo.name }} has no checks of its own, so its consumers' bumps are amber: only their own pipelines test them. A <code>.flow/pipeline.kdl</code> here that passes turns them green.</div>{% endif %}
17
{% call d::rows(used_by) %}
18
{% endif %}
19
{% if !follows.is_empty() %}
20
<h2>Takes from <span class="count-chip">{{ follows.len() }}</span></h2>
21
<div class="table"><table class="diffusion">
22
  <tr><th>Upstream</th><th>Subrepo</th><th>Behind</th><th>Upstream │ downstream</th><th>Open bump</th><th>Last landed</th></tr>
23
  {% for (up, c) in follows %}
24
  <tr>
25
    <td><a href="/{{ up.owner }}/{{ up.name }}/diffusion">{{ up.owner }}/{{ up.name }}</a></td>
26
    <td class="small">{{ c.path }} <span class="lbl lbl-bm">{{ c.bookmark }}</span></td>
27
    <td class="small">{% match c.behind %}{% when Some(n) %}{{ n }}{% when None %}<span class="mute">?</span>{% endmatch %}</td>
28
    <td>{% call d::chip(c) %}</td>
29
    <td class="small">{% if let Some(n) = c.bump %}<a href="{{ repo.url }}/proposal/{{ n }}">#{{ n }}</a>{% if let Some((r, st)) = c.run %} · <a href="{{ repo.url }}/flow/{{ r }}">run #{{ r }}</a> <span class="mute">{{ st }}</span>{% endif %}{% else %}<span class="mute">none</span>{% endif %}</td>
30
    <td class="small">{% if let Some((n, at)) = c.landed %}<a href="{{ repo.url }}/proposal/{{ n }}">#{{ n }}</a> <time class="mute" title="{{ at|when_i }}">{{ at|ago_i }}</time>{% else %}<span class="mute">—</span>{% endif %}</td>
31
  </tr>
32
  {% endfor %}
33
</table></div>
34
{% endif %}
35
</div>
36
{% if used_by.is_empty() && follows.is_empty() %}<p class="empty">No repository on this hub pins this one, and it pins none that this hub holds.</p>{% endif %}
37
<p class="small mute">Diffusion opens a proposal in a consumer when its upstream moves, and never lands one itself. How each repository follows is under its Settings › Diffusion. <a href="/help#diffusion">How it works</a></p>
38
</div>
39
{% endblock %}