carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1{{define "flow"}}{{with .Flow}}{{if .Show}}
2<section class="flow" aria-label="How this app's versions reach the web">
3 <ol class="flow-line">
4 <li class="flow-stage flow-origin{{if .Shipped}} is-held{{end}}">
5 <p class="flow-label">you shipped</p>
6 <p class="flow-version">{{if .Shipped}}<code>{{.Shipped}}</code>{{else}}nothing yet{{end}}</p>
7 {{if not .ShippedAt.IsZero}}<p class="flow-note">{{ago .ShippedAt}}</p>{{end}}
8 </li>
9 {{range .Line}}{{template "flow_stage" .}}{{end}}
10 </ol>
11 {{if .Tests}}
12 <p class="flow-band">Test versions — no delay, and they can point anywhere.</p>
13 <ul class="flow-line flow-aside">{{range .Tests}}{{template "flow_stage" .}}{{end}}</ul>
14 {{end}}
15 {{if .Extra}}
16 <p class="flow-band">Following a channel outside the release path.</p>
17 <ul class="flow-line flow-aside">{{range .Extra}}{{template "flow_stage" .}}{{end}}</ul>
18 {{end}}
19 <p class="small flow-caption">A version moves one step at a time, left to right. Promoting is what moves it.</p>
20</section>
21{{end}}{{end}}{{end}}
22
23{{/* One box: a channel, what it holds, and the addresses it feeds. Used as an
24 <li> in both the ordered release path and the unordered bands below it. */}}
25{{define "flow_stage"}}
26<li class="flow-stage{{if .Version}} is-held{{end}}{{if .Carried}} is-carried{{end}}">
27 <p class="flow-label">{{.Name}}</p>
28 <p class="flow-version">{{if .Version}}<code>{{.Version}}</code>{{else}}nothing{{end}}</p>
29 {{if .Hold}}<p class="flow-note">{{if .FastTrack}}delay skipped{{else}}waits {{.Hold}} here{{end}}</p>{{end}}
30 {{if .Err}}<p class="flow-note error">{{.Err}}</p>{{end}}
31 {{if .RolledUp}}
32 <p class="flow-note">{{.Total}} addresses{{if .Attention}} · <span class="error">{{.Attention}} need{{if eq .Attention 1}}s{{end}} attention</span>{{end}}</p>
33 {{if .Addresses}}
34 <ul class="flow-addrs">
35 {{range .Addresses}}
36 <li class="flow-addr flow-tone-{{.Tone}}">
37 <a href="https://{{.Host}}">{{.Host}}</a>
38 <span class="flow-health">{{if eq .Tone "bad"}}{{icon "triangle-alert"}}{{end}}{{.Health}}</span>
39 </li>
40 {{end}}
41 </ul>
42 {{end}}
43 <p class="flow-note"><a href="{{.MoreURL}}">{{if .Hidden}}+{{.Hidden}} more · {{end}}all addresses</a></p>
44 {{else}}{{if .Addresses}}
45 <ul class="flow-addrs">
46 {{range .Addresses}}
47 <li class="flow-addr flow-tone-{{.Tone}}">
48 <a href="https://{{.Host}}">{{.Host}}</a>
49 <span class="flow-health">{{if eq .Tone "bad"}}{{icon "triangle-alert"}}{{end}}{{.Health}}</span>
50 </li>
51 {{end}}
52 </ul>
53 {{end}}{{end}}
54</li>
55{{end}}
56