BlueGit

timfa bluegit

Files

bluegit / internal / server / templates / info.html

info.html

feat: stuur volledige details mee in webhook-payloads
timfa project_87923614_bot_3aff574f6f98414b945a8799374f9092 · pushed by timfa · 3 weeks ago
3ca4d219 History
info.html 2.6 KiB Download Raw
1{{define "updatestatus"}}
2<section class="panel" data-update>
3 <h2>{{t "update.title"}}</h2>
4 {{if .Update}}
5 <p>{{t "update.when"}} <time>{{.Update.When}}</time></p>
6 <p>{{t "update.sha"}} <code>{{.Update.SHA}}</code></p>
7 <p>{{t "update.result"}} {{.Update.ResultLabel}}</p>
8 {{if .Update.Error}}<p class="muted">{{.Update.Error}}</p>{{end}}
9 {{else}}
10 <p class="muted">{{t "update.none"}}</p>
11 {{end}}
12</section>
13{{end}}
14
15{{define "info"}}
16{{template "layout-start" .}}
17<article class="spec">
18 <h1>{{t "title.info"}}</h1>
19 <p class="lead">{{t "info.lead"}}</p>
20 <pre class="spec-example">{{.Spec.Example}}</pre>
21 {{range .Spec.Sections}}
22 <h2 id="{{.ID}}">{{.Title}}</h2>
23 {{if .Intro}}<p>{{.Intro}}</p>{{end}}
24 {{if eq .Kind "keywords"}}
25 <table class="spec-table">
26 <thead><tr><th>{{t "info.col.keyword"}}</th><th>{{t "info.col.meaning"}}</th></tr></thead>
27 <tbody>
28 {{range .Items}}<tr><td><code>{{.Name}}</code></td><td>{{.Summary}}</td></tr>{{end}}
29 </tbody>
30 </table>
31 {{else if eq .Kind "variables"}}
32 <table class="spec-table">
33 <thead><tr><th>{{t "info.col.keyword"}}</th><th>{{t "info.col.where"}}</th><th>{{t "info.col.meaning"}}</th></tr></thead>
34 <tbody>
35 {{range .Variables}}<tr><td><code>{{.Name}}</code></td><td>{{.Where}}</td><td>{{.Summary}}</td></tr>{{end}}
36 </tbody>
37 </table>
38 {{else if eq .Kind "list"}}
39 <ul class="spec-list">{{range .Lines}}<li>{{.}}</li>{{end}}</ul>
40 {{else if eq .Kind "presets"}}
41 <table class="spec-table">
42 <thead><tr><th>{{t "info.col.name"}}</th><th>{{t "info.col.base"}}</th><th>{{t "info.col.tools"}}</th></tr></thead>
43 <tbody>
44 {{range .Presets}}
45 <tr>
46 <td><code>{{.Name}}</code></td>
47 <td><code>{{.From}}</code>{{if .Runtime}}<div class="muted">{{.Runtime}}</div>{{end}}</td>
48 <td>{{if .Tools}}{{range $i, $tool := .Tools}}{{if $i}}, {{end}}<code>{{$tool}}</code>{{end}}{{else}}{{t "info.presets.mapped"}}{{end}}</td>
49 </tr>
50 {{end}}
51 </tbody>
52 </table>
53 {{end}}
54 {{end}}
55 {{if .ShowUpdate}}{{template "updatestatus" .}}{{end}}
56 <h2 id="api">{{t "info.api.title"}}</h2>
57 <p>{{t "info.api.lead"}}</p>
58 <p>{{t "info.api.auth"}}</p>
59 <p>{{t "info.api.ssh"}}</p>
60 <p><a href="/api/v1/openapi.json">{{t "info.api.spec"}}</a></p>
61 <h2 id="webhooks">{{t "info.sec.webhooks"}}</h2>
62 <p>{{t "info.wh.lead"}}</p>
63 <p><a href="/api/v1/webhooks/openapi.json">{{t "info.wh.spec"}}</a></p>
64 <pre class="spec-example">{{.HookDoc}}</pre>
65 <script type="application/json" id="bluegit-ci-spec">{{.SpecJSON}}</script>
66 <script type="application/json" id="bluegit-api">{{.APIJSON}}</script>
67</article>
68{{template "layout-end" .}}
69{{end}}