Monorepo for Tangled tangled.org
5

Configure Feed

Select the types of activity you want to include in your feed.

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="input delay:300ms from:input, change from:select, every 10s" 12 > 13 <input type="text" name="did" placeholder="DID or handle" value="{{.FilterByDid}}"> 14 <input type="text" name="name" placeholder="Name" value="{{.FilterByName}}"> 15 <input type="text" name="knot" placeholder="Knot Domain" value="{{.FilterByKnot}}"> 16 <select name="state"> 17 <option value="">-- State --</option> 18 {{ range const.AllRepoStates }} 19 <option value="{{.}}" {{ if eq $.FilterByState . }}selected{{end}}>{{.}}</option> 20 {{ end }} 21 </select> 22 <button type="submit">Filter</button> 23 <a href="/repos">Clear</a> 24 </form> 25</div> 26 27<div id="table"> 28 <div class="repo-state-indicators"> 29 {{range const.AllRepoStates}} 30 <span class="state-pill state-{{.}}"> 31 {{.}}: {{index $.RepoCounts .}} 32 </span> 33 {{end}} 34 </div> 35 <table> 36 <thead> 37 <tr> 38 <th>DID</th> 39 <th>Name</th> 40 <th>Knot</th> 41 <th>State</th> 42 <th>Retry</th> 43 <th>Retry After</th> 44 <th>Error Message</th> 45 <th>Action</th> 46 </tr> 47 </thead> 48 <tbody> 49 {{range .Repos}} 50 <tr> 51 <td><code>{{.Did}}</code></td> 52 <td><a href="https://pdsls.dev/at://{{.Did}}/sh.tangled.repo/{{.Name}}" target="_blank" rel="noopener noreferrer">{{.Name}}</a></td> 53 <td>{{.KnotDomain}}</td> 54 <td><strong>{{.State}}</strong></td> 55 <td>{{.RetryCount}}</td> 56 <td>{{readt .RetryAfter}}</td> 57 <td>{{.ErrorMsg}}</td> 58 <td> 59 <form 60 {{ if .State.IsResyncing -}} 61 hx-post="/api/cancelRepoResync" 62 {{- else -}} 63 hx-post="/api/triggerRepoResync" 64 {{- end }} 65 hx-swap="none" 66 hx-disabled-elt="find button" 67 > 68 <input type="hidden" name="repo" value="{{.RepoDid}}"> 69 <button type="submit">{{ if .State.IsResyncing }}cancel{{ else }}resync{{ end }}</button> 70 </form> 71 </td> 72 </tr> 73 {{else}} 74 <tr><td colspan="99">No repositories found.</td></tr> 75 {{end}} 76 </tbody> 77 </table> 78</div> 79 80<div class="pagination"> 81 {{if gt .Page 1}} 82 <a href="?page={{sub .Page 1}}&did={{.FilterByDid}}&name={{.FilterByName}}&knot={{.FilterByKnot}}&state={{.FilterByState}}">« Previous</a> 83 {{end}} 84 <span>Page {{.Page}}</span> 85 <a href="?page={{add .Page 1}}&did={{.FilterByDid}}&name={{.FilterByName}}&knot={{.FilterByKnot}}&state={{.FilterByState}}">Next »</a> 86</div> 87{{end}}