- chore(ui): add module file and main stub - feat(ui): add layout, pages and partials - feat(ui): add stylesheet and scripts - feat(ui): add page renderer and static file handler - test(ui): cover rendering, escaping and static serving
95 lines
3.6 KiB
HTML
95 lines
3.6 KiB
HTML
{{- /* SPDX-License-Identifier: GPL-2.0-or-later */ -}}
|
|
{{- /* Copyright (C) 2026 Bryan Joshua Pedini */ -}}
|
|
{{define "title"}}{{.Zone}}{{end}}
|
|
{{define "content"}}<p class="crumbs"><a href="/">Zones</a></p>
|
|
<div class="page-head">
|
|
<h1 id="zone-title">{{.Zone}}</h1>
|
|
<div class="actions">
|
|
<a class="btn" id="export-link" href="/">Export zone file</a>
|
|
<a class="btn" id="import-link" href="/">Import zone file</a>
|
|
</div>
|
|
</div>
|
|
|
|
<section class="card" aria-labelledby="soa-title">
|
|
<div class="section-head">
|
|
<h2 id="soa-title">SOA</h2>
|
|
<div class="actions">
|
|
<button type="button" class="btn btn-small" id="soa-managed" hidden>Use managed serial</button>
|
|
<button type="button" class="btn btn-small" id="soa-edit" disabled>Edit SOA</button>
|
|
</div>
|
|
</div>
|
|
<dl class="dl" id="soa-summary"></dl>
|
|
<p class="muted" id="soa-status" role="status">Loading...</p>
|
|
</section>
|
|
|
|
<section class="card" id="problems-panel" aria-labelledby="problems-title" hidden>
|
|
<h2 id="problems-title">Problems</h2>
|
|
<ul class="problems" id="problems-list"></ul>
|
|
</section>
|
|
|
|
<section class="card" aria-labelledby="records-title">
|
|
<div class="section-head">
|
|
<h2 id="records-title">Records</h2>
|
|
<div class="actions">
|
|
<button type="button" class="btn btn-danger btn-small" id="bulk-delete" disabled>Delete selected</button>
|
|
<button type="button" class="btn btn-primary btn-small" id="record-add">Add record</button>
|
|
</div>
|
|
</div>
|
|
<div class="toolbar">
|
|
<div class="field">
|
|
<label for="filter-type">Type</label>
|
|
<select id="filter-type"><option value="">All types</option></select>
|
|
</div>
|
|
<div class="field grow">
|
|
<label for="filter-text">Search records</label>
|
|
<input id="filter-text" type="search" autocomplete="off" spellcheck="false">
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="table" id="records-table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="check"><input type="checkbox" id="select-all" aria-label="Select all records on this page"></th>
|
|
<th scope="col">Name</th><th scope="col">Type</th><th scope="col">TTL</th><th scope="col">Value</th><th scope="col">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="records-body"></tbody>
|
|
</table>
|
|
</div>
|
|
<p class="muted" id="records-status" role="status">Loading records...</p>
|
|
<div class="pager" id="pager" hidden>
|
|
<button type="button" class="btn btn-small" id="page-prev">Previous</button>
|
|
<span id="page-info"></span>
|
|
<button type="button" class="btn btn-small" id="page-next">Next</button>
|
|
</div>
|
|
</section>
|
|
{{if .IsAdmin}}
|
|
<section class="card" id="users-panel" aria-labelledby="users-title">
|
|
<h2 id="users-title">Users</h2>
|
|
<p class="muted">Users who can see and change this zone. Administrators always can.</p>
|
|
<ul class="list" id="zone-users"></ul>
|
|
<p class="muted" id="zone-users-status" role="status">Loading...</p>
|
|
<form class="inline-form" id="zone-user-form" novalidate>
|
|
<div class="field">
|
|
<label for="zone-user-pick">Delegate this zone to</label>
|
|
<select id="zone-user-pick" name="username"></select>
|
|
</div>
|
|
<button type="submit" class="btn btn-small" id="zone-user-add">Add user</button>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="card danger-zone" id="danger" aria-labelledby="danger-title">
|
|
<h2 id="danger-title">Danger zone</h2>
|
|
<p>Deleting the zone removes every record and every delegation of this zone. This cannot be undone.</p>
|
|
<form class="inline-form" id="zone-delete-form" novalidate>
|
|
<div class="field">
|
|
<label for="zone-delete-confirm">Type the zone name to confirm</label>
|
|
<input id="zone-delete-confirm" name="confirm" type="text" autocomplete="off" autocapitalize="none" spellcheck="false">
|
|
</div>
|
|
<button type="submit" class="btn btn-danger" id="zone-delete" disabled>Delete zone</button>
|
|
</form>
|
|
</section>
|
|
{{end}}
|
|
{{template "soa_dialog" .}}
|
|
{{template "record_dialog" .}}{{end}}
|