| 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 |
{% if !used_by.is_empty() %} |
| 14 |
<h2>Diffuses to <span class="count-chip">{{ used_by.len() }}</span></h2> |
| 15 |
{% 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 %} |
| 16 |
{% call d::rows(used_by) %} |
| 17 |
{% endif %} |
| 18 |
{% if !follows.is_empty() %} |
| 19 |
<h2>Takes from <span class="count-chip">{{ follows.len() }}</span></h2> |
| 20 |
<div class="table"><table class="diffusion"> |
| 21 |
<tr><th>Upstream</th><th>Subrepo</th><th>Behind</th><th>Upstream │ downstream</th><th>Open bump</th><th>Last landed</th></tr> |
| 22 |
{% for (up, c) in follows %} |
| 23 |
<tr> |
| 24 |
<td><a href="/{{ up.owner }}/{{ up.name }}/diffusion">{{ up.owner }}/{{ up.name }}</a></td> |
| 25 |
<td class="small">{{ c.path }} <span class="lbl lbl-bm">{{ c.bookmark }}</span></td> |
| 26 |
<td class="small">{% match c.behind %}{% when Some(n) %}{{ n }}{% when None %}<span class="mute">?</span>{% endmatch %}</td> |
| 27 |
<td>{% call d::chip(c) %}</td> |
| 28 |
<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> |
| 29 |
<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> |
| 30 |
</tr> |
| 31 |
{% endfor %} |
| 32 |
</table></div> |
| 33 |
{% endif %} |
| 34 |
{% 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 %} |
| 35 |
<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> |
| 36 |
</div> |
| 37 |
{% endblock %} |