v0.1.2
Go quality gates / test (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-12-01 00:16:15 +01:00
1 parent de13d851a8
commit a28362b82c
34 files changed
+1541 -341

No files matched your search

@@ -22,11 +22,38 @@
</div>
<div class="section-actions"><a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records">View DNS records</a><a class="btn-ui" href="{{.Data.ZoneURL}}/transfers">Transfer history</a><a class="btn-ui" href="{{.Data.ZoneURL}}/operations">Zone operations</a></div>
{{else if eq .Data.Tab "records"}}
<section class="panel"><div class="toolbar"><form class="toolbar-form" method="get" action="{{.Data.ZoneURL}}/records"><input class="field field-search" name="name" placeholder="Record name begins with..." aria-label="Filter record names" value="{{selectval .Data.Filter "name"}}"><select class="field field-select" aria-label="Record type" name="type"><option value="">All types</option>{{range $type := recordTypes}}<option value="{{$type}}" {{if eq (selectval $.Data.Filter "type") $type}}selected{{end}}>{{$type}}</option>{{end}}</select><button type="submit" class="btn-ui"><svg class="ico"><use href="{{asset "icons.svg"}}#search"/></svg>Filter</button></form>
<div class="toolbar-end"><span class="subtle desktop-only">{{.Data.Pagination.Total}} records</span>{{if .Data.IsPrimary}}<a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records/new"><svg class="ico"><use href="{{asset "icons.svg"}}#plus"/></svg>Add record</a>{{else}}<span class="tag muted-tag">Secondary · read-only</span>{{end}}</div></div>
<div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>RDATA</th><th>TTL</th>{{if .Data.IsPrimary}}<th class="right">ACTIONS</th>{{end}}</tr></thead><tbody>
{{range .Data.Records}}<tr><td class="mono entity">{{.Name}}</td><td><span class="tag green">{{.Type}}</span></td><td class="mono rdata">{{.Data}}</td><td class="mono">{{.TTL}}</td>{{if $.Data.IsPrimary}}<td class="right">{{if ne .Type "SOA"}}<div class="row-actions"><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/edit?page={{$.Data.Pagination.Page}}" class="icon-button" aria-label="Edit record {{.Name}}" title="Edit"><svg class="ico"><use href="{{asset "icons.svg"}}#edit"/></svg></a><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/delete?page={{$.Data.Pagination.Page}}" class="icon-button danger-hover" aria-label="Delete record {{.Name}}" title="Delete"><svg class="ico"><use href="{{asset "icons.svg"}}#trash"/></svg></a></div>{{else}}<span class="subtle" title="SOA is managed by zone replacement">Managed</span>{{end}}</td>{{end}}</tr>{{else}}<tr><td class="empty" colspan="5">No records returned for this filter.</td></tr>{{end}}
</tbody></table></div><div class="table-footer"><span>{{len .Data.Records}} / {{.Data.Pagination.Total}} records · page {{.Data.Pagination.Page}}</span><div class="pagination-ui">{{if gt .Data.Pagination.Page 1}}<a class="btn-ui btn-small" href="{{.Data.ZoneURL}}/records?page={{dec .Data.Pagination.Page}}&amp;name={{selectval .Data.Filter "name"}}&amp;type={{selectval .Data.Filter "type"}}">Previous</a>{{end}}{{if lt (multiply .Data.Pagination.Page .Data.Pagination.PerPage) .Data.Pagination.Total}}<a class="btn-ui btn-small" href="{{.Data.ZoneURL}}/records?page={{inc .Data.Pagination.Page}}&amp;name={{selectval .Data.Filter "name"}}&amp;type={{selectval .Data.Filter "type"}}">Next</a>{{end}}</div></div></section>
<section class="panel">
<div class="toolbar">
<form class="toolbar-form" method="get" action="{{.Data.ZoneURL}}/records" aria-label="Record filters">
<input class="field field-search" name="name" placeholder="Record name begins with..." aria-label="Filter record names" value="{{selectval .Data.Filter "name"}}">
<select class="field field-select" aria-label="Record type" name="type">
<option value="">All types</option>
{{range $type := filterRecordTypes}}<option value="{{$type}}" {{if eq (selectval $.Data.Filter "type") $type}}selected{{end}}>{{$type}}</option>{{end}}
</select>
<label class="record-dnssec-toggle" title="Exclude RRSIG, DNSKEY, NSEC/NSEC3, DS, CDS and other DNSSEC records from the record list">
<input type="checkbox" name="hide_dnssec" value="1" data-record-filter-toggle {{if .Data.HideDNSSEC}}checked{{end}}>
<span>Hide DNSSEC records</span>
</label>
<button type="submit" class="btn-ui"><svg class="ico"><use href="{{asset "icons.svg"}}#search"/></svg>Filter</button>
</form>
<div class="toolbar-end">
<span class="subtle desktop-only">{{if .Data.HideDNSSEC}}DNSSEC records hidden{{else}}{{int .Data.Pagination.Total}} records{{end}}</span>
{{if .Data.IsPrimary}}<a class="btn-ui btn-primary-ui" href="{{.Data.ZoneURL}}/records/new"><svg class="ico"><use href="{{asset "icons.svg"}}#plus"/></svg>Add record</a>{{else}}<span class="tag muted-tag">Secondary · read-only</span>{{end}}
</div>
</div>
<div class="table-scroll"><table class="data-table"><thead><tr><th>NAME</th><th>TYPE</th><th>RDATA</th><th>TTL</th>{{if .Data.IsPrimary}}<th class="right">ACTIONS</th>{{end}}</tr></thead><tbody>
{{range .Data.Records}}
<tr><td class="mono entity">{{.Name}}</td><td><span class="tag green">{{.Type}}</span></td><td class="mono rdata">{{.Data}}</td><td class="mono">{{.TTL}}</td>{{if $.Data.IsPrimary}}<td class="right">{{if ne .Type "SOA"}}<div class="row-actions"><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/edit" class="icon-button" aria-label="Edit record {{.Name}}" title="Edit"><svg class="ico"><use href="{{asset "icons.svg"}}#edit"/></svg></a><a href="{{$.Data.ZoneURL}}/records/{{.ID}}/delete" class="icon-button danger-hover" aria-label="Delete record {{.Name}}" title="Delete"><svg class="ico"><use href="{{asset "icons.svg"}}#trash"/></svg></a></div>{{else}}<span class="subtle" title="SOA is managed by zone replacement">Managed</span>{{end}}</td>{{end}}</tr>
{{else}}<tr><td class="empty" colspan="{{if .Data.IsPrimary}}5{{else}}4{{end}}">{{if .Data.HideDNSSEC}}No non-DNSSEC records match these filters. Uncheck the box to show all records.{{else}}No records returned for this filter.{{end}}</td></tr>{{end}}
</tbody></table></div>
<div class="table-footer">
<span>{{if .Data.HideDNSSEC}}{{len .Data.Records}} matching records · page {{.Data.Pagination.Page}} · {{int .Data.Pagination.Total}} total before DNSSEC filtering{{else}}{{len .Data.Records}} / {{int .Data.Pagination.Total}} records · page {{.Data.Pagination.Page}}{{end}}</span>
<div class="pagination-ui">
{{if .Data.RecordsPrevURL}}<a class="btn-ui btn-small" href="{{.Data.RecordsPrevURL}}">Previous</a>{{end}}
{{if .Data.RecordsNextURL}}<a class="btn-ui btn-small" href="{{.Data.RecordsNextURL}}">Next</a>{{end}}
</div>
</div>
</section>
<div class="notice-inline mt-panel">Writes are protected with the zone serial ETag. SOA records are managed through whole-zone replacement; secondaries are read-only.</div>
{{else if eq .Data.Tab "transfers"}}
<section class="panel"><div class="panel-head"><div><h2>Zone transfer history</h2><p>Recorded inbound and outbound AXFR / IXFR events</p></div></div><div class="table-scroll"><table class="data-table"><thead><tr><th>TIME</th><th>DIRECTION</th><th>TYPE</th><th>PEER</th><th>SERIAL</th><th>RECORDS</th><th>DURATION</th><th>RESULT</th></tr></thead><tbody>{{range .Data.Transfers}}<tr><td class="mono subtle">{{when .TimeUnix}}</td><td>{{.Direction}}</td><td><span class="tag green">{{.Kind}}</span></td><td class="mono">{{.Peer}}</td><td class="mono">{{if .Serial}}{{.Serial}}{{else}}—{{end}}</td><td>{{.Records}}</td><td class="mono">{{.DurationMS}} ms</td><td><span class="dot {{if .OK}}ok{{else}}danger{{end}}"></span>{{if .OK}}Completed{{else}}{{if .Error}}{{.Error}}{{else}}Failed{{end}}{{end}}</td></tr>{{else}}<tr><td class="empty" colspan="8">No recorded transfers. This API provides history, not a live transfer queue.</td></tr>{{end}}</tbody></table></div></section>