oficina / alta Public

Clone
git clone https://amadan.net/oficina/alta

Plain git — no account needed to clone.

Download

Download this file

1{{define "content"}}
2{{$t := .Data.Team}}
3{{template "page-header" dict "Title" $t.Name "Sub" (printf "%s · environment %s%s" $t.Label $t.Environment (or (and $t.TeamSQID (printf " · Home team %s" $t.TeamSQID)) " · not yet at Home"))}}
4<section>
5 <h2>Apps</h2>
6 <table class="alta-grid">
7 <thead><tr><th scope="col">App</th><th scope="col">Steps</th></tr></thead>
8 <tbody>
9 {{range .Data.Apps}}
10 <tr><th scope="row">{{.Name}}{{if eq .State "retired"}} (retired){{end}}<br><small class="alta-quiet">{{.Host}}</small>{{with .Written}}<br><small class="alta-quiet">Written as {{.}}</small>{{end}}</th>
11 <td><ul class="alta-steps">{{range .Steps}}<li class="alta-step" data-state="{{.State}}"><span>{{if eq .State "done"}}✓{{else if eq .State "parked"}}◷{{else if eq .State "failed"}}✕{{else}}·{{end}} {{.Name}}</span>{{with .Words}} <small>{{.}}</small>{{end}}</li>{{end}}</ul></td></tr>
12 {{end}}
13 </tbody>
14 </table>
15</section>
16<section class="alta-actions">
17 <form method="post" action="/teams/{{$t.Label}}/audit"><button type="submit" rst-btn>Audit</button></form>
18 {{if .Data.Seeded}}<a rst-btn="danger" href="/teams/{{$t.Label}}/retire">Retire apps…</a>{{end}}
19</section>
20{{if not .Data.NothingToContinue}}
21<section class="alta-box" id="continue">
22 <h2>Continue under a new plan</h2>
23 <p>{{if .Data.ContinueRefused}}{{.Data.ContinueRefused}}{{else}}Continues {{.Data.Continue}}.{{end}} An app whose environment is already written keeps the choice it was written with; one not yet written takes the choice made here.</p>
24 <form method="post" action="/teams/{{$t.Label}}/apps">
25 {{template "run-options" .Data.Options}}
26 <button type="submit" rst-btn="primary">Continue under a new plan</button>
27 </form>
28</section>
29{{end}}
30{{if and .Data.Seeded .Data.Addable}}
31<section class="alta-box">
32 <h2>Add apps</h2>
33 <form method="post" action="/teams/{{$t.Label}}/apps">
34 <fieldset class="alta-apps"><legend>Apps</legend>{{range .Data.Addable}}<label><input type="checkbox" name="app" value="{{.}}"> {{.}}</label>{{end}}</fieldset>
35 {{template "run-options" .Data.Options}}
36 <button type="submit" rst-btn>Submit plan to Home</button>
37 </form>
38</section>
39{{end}}
40{{if or (not .Data.Seeded) (and .Data.NeedsOwner (not .Data.HoldsOwner))}}
41<section class="alta-box">
42 <h2>Owner's address</h2>
43 {{if not .Data.Seeded}}<p>The team is not yet at Home. If Home refused the owner (a mistyped address, or someone who has not signed in at oficina.works), correct it here, then continue under a new plan. The label stays this team's.</p>
44 {{else}}<p>Alta deleted the owner's address once every allowlist was written. An app that needs it again (a stopgap allowlist edit) asks for it here; Alta deletes it again once written.</p>{{end}}
45 <form method="post" action="/teams/{{$t.Label}}/owner">
46 {{template "field" dict "ID" "owner" "Name" "owner" "Label" "Owner email" "Type" "email" "Required" true "Autocomplete" "off"}}
47 <button type="submit" rst-btn>{{if .Data.Seeded}}Hold it until written{{else}}Use this address{{end}}</button>
48 </form>
49</section>
50{{end}}
51<section>
52 <h2>Runs</h2>
53 {{if .Data.Runs}}<ul>{{range .Data.Runs}}<li><a href="/runs/{{.ID}}">Run {{.ID}}</a> · {{.Kind}}{{if or (eq .Kind "create-team") (eq .Kind "add-apps")}} · {{.Options.Profile}}{{if .Options.Samples}}, samples{{end}}{{end}} · {{.State}}{{with .Code}} · {{describe .}}{{end}}</li>{{end}}</ul>{{else}}<p>None.</p>{{end}}
54</section>
55<section>
56 <h2>Audit</h2>
57 {{if .Data.Audit}}<ul class="alta-audit">{{range .Data.Audit}}<li><time>{{when .At}}</time> {{.Event}}{{with .App}} · {{.}}{{end}}{{with .Detail}} · {{.}}{{end}}</li>{{end}}</ul>{{else}}<p>Nothing yet.</p>{{end}}
58</section>
59{{end}}
60