OXYGENHUB
# 6907a989e82a oxygenhub / templates / diffusion.html
3.2 KiB · HTML · last changed feat(web): sidebar cards, a shaded tree head, icons, aligned Diffusion tables (closes #152) 22 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
<div class="head"><h1>Diffusion <small>how changes move between this repository and the ones that pin it</small></h1></div>
9
<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>
10
{% if !used_by.is_empty() %}
11
<h2>Diffuses to <span class="count-chip">{{ used_by.len() }}</span></h2>
12
{% 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 %}
13
{% call d::rows(used_by) %}
14
{% endif %}
15
{% if !follows.is_empty() %}
16
<h2>Takes from <span class="count-chip">{{ follows.len() }}</span></h2>
17
<div class="table"><table class="diffusion">
18
  <tr><th>Upstream</th><th>Subrepo</th><th>Behind</th><th>Upstream │ downstream</th><th>Open bump</th><th>Last landed</th></tr>
19
  {% for (up, c) in follows %}
20
  <tr>
21
    <td><a href="/{{ up.owner }}/{{ up.name }}/diffusion">{{ up.owner }}/{{ up.name }}</a></td>
22
    <td class="small">{{ c.path }} <span class="lbl lbl-bm">{{ c.bookmark }}</span></td>
23
    <td class="small">{% match c.behind %}{% when Some(n) %}{{ n }}{% when None %}<span class="mute">?</span>{% endmatch %}</td>
24
    <td>{% call d::chip(c) %}</td>
25
    <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>
26
    <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>
27
  </tr>
28
  {% endfor %}
29
</table></div>
30
{% endif %}
31
{% 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 %}
32
<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>
33
{% endblock %}