Give each view its own page, and add a CNAME from an A record
Views open a page like a zone's, with Settings, Options and Zones tabs (and New zone in that view); the Views page lists and orders them. A and AAAA records get a + CNAME button that fills in the add form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7be0762f48
commit
c696d02513
6 files changed
+139
-49
No files matched your search
@@ -49,7 +49,8 @@ export async function render(el, params, query) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function newZoneDialog(views, zones, settings) {
|
||||
// preset.view picks the view (opened from a view's page).
|
||||
export async function newZoneDialog(views, zones, settings, preset = {}) {
|
||||
const err = h("div");
|
||||
// The zone's name matters most and is easy to get wrong, so the dialog
|
||||
// asks for a domain or a network and shows the resulting zone name.
|
||||
@@ -60,7 +61,7 @@ export async function newZoneDialog(views, zones, settings) {
|
||||
const preview = h("div", { class: "name-preview", "aria-live": "polite" });
|
||||
const kindButtons = h("div", { class: "segmented", role: "group", "aria-label": "Kind of zone" });
|
||||
const type = select([["primary", "primary (Jarl manages the records)"], ["secondary", "secondary (copy from another server)"], ["forward", "forward (send queries to other resolvers)"], ["stub", "stub"], ["static-stub", "static-stub"], ["mirror", "mirror"], ["hint", "hint (root hints)"], ["in-view", "in-view (share a zone from an earlier view)"]], "primary");
|
||||
const view = select([["", views.length ? "– choose a view –" : "(no views)"], ...views.map((v) => [v.name, v.name])], views.length === 1 ? views[0].name : "");
|
||||
const view = select([["", views.length ? "– choose a view –" : "(no views)"], ...views.map((v) => [v.name, v.name])], preset.view || (views.length === 1 ? views[0].name : ""));
|
||||
const ns = textarea((settings.nameservers || []).join("\n"), { class: "mono", rows: 3, placeholder: "ns1.example.com." });
|
||||
const nsAddr = textarea("", { class: "mono", rows: 2, placeholder: "ns1 192.0.2.1" });
|
||||
const contact = input({ value: settings.rname ? emailOf(settings.rname) : "", placeholder: "hostmaster@example.com" });
|
||||
@@ -239,7 +240,7 @@ export function emailOf(rname) {
|
||||
// dnssecLock marks a signed zone with a padlock linking to its DNSSEC tab:
|
||||
// closed while signed, open while signing is being turned off (BIND's
|
||||
// insecure policy).
|
||||
function dnssecLock(z) {
|
||||
export function dnssecLock(z) {
|
||||
if (!z.dnssec_policy) return null;
|
||||
const off = z.dnssec_policy === "insecure";
|
||||
const a = h("a", {
|
||||
|
||||
Reference in new issue
Block a user