A vibe coded tangled fork which supports pijul.
at cdcae4dfed24485726686bc8fc5131b818ae56ff 71 lines 1.9 kB view raw
1{{template "base" .}} 2{{define "content"}} 3<h2>Repositories</h2> 4 5<div class="filters"> 6 <form 7 hx-get="" 8 hx-target="#table" 9 hx-select="#table" 10 hx-swap="outerHTML" 11 hx-trigger="every 10s" 12 > 13 <input type="text" name="did" placeholder="DID" value="{{.FilterByDid}}"> 14 <input type="text" name="knot" placeholder="Knot Domain" value="{{.FilterByKnot}}"> 15 <select name="state"> 16 <option value="">-- State --</option> 17 {{ range const.AllRepoStates }} 18 <option value="{{.}}" {{ if eq $.FilterByState . }}selected{{end}}>{{.}}</option> 19 {{ end }} 20 </select> 21 <button type="submit">Filter</button> 22 <a href="/repos">Clear</a> 23 </form> 24</div> 25 26<div id="table"> 27 <div class="repo-state-indicators"> 28 {{range .FilterByState.AllStates}} 29 <span class="state-pill state-{{.}}"> 30 {{.}}: {{index $.RepoCounts .}} 31 </span> 32 {{end}} 33 </div> 34 <table> 35 <thead> 36 <tr> 37 <th>DID</th> 38 <th>Name</th> 39 <th>Knot</th> 40 <th>State</th> 41 <th>Retry</th> 42 <th>Retry After</th> 43 <th>Error Message</th> 44 </tr> 45 </thead> 46 <tbody> 47 {{range .Repos}} 48 <tr> 49 <td><code>{{.Did}}</code></td> 50 <td>{{.Name}}</td> 51 <td>{{.KnotDomain}}</td> 52 <td><strong>{{.State}}</strong></td> 53 <td>{{.RetryCount}}</td> 54 <td>{{readt .RetryAfter}}</td> 55 <td>{{.ErrorMsg}}</td> 56 </tr> 57 {{else}} 58 <tr><td colspan="99">No repositories found.</td></tr> 59 {{end}} 60 </tbody> 61 </table> 62</div> 63 64<div class="pagination"> 65 {{if gt .Page 1}} 66 <a href="?page={{sub .Page 1}}&did={{.FilterByDid}}&knot={{.FilterByKnot}}&state={{.FilterByState}}">« Previous</a> 67 {{end}} 68 <span>Page {{.Page}}</span> 69 <a href="?page={{add .Page 1}}&did={{.FilterByDid}}&knot={{.FilterByKnot}}&state={{.FilterByState}}">Next »</a> 70</div> 71{{end}}