Reverse zones: other views' addresses aren't missing PTRs
A reverse zone's missing PTR count covers only its own view's A and AAAA records. Addresses only other views' records use are counted apart (ptr_other_views, 'Other views' in zone show, a note on the zone page) and filled only when asked: fill-ptr --other-views, zone create --fill --other-views, or the New reverse zone dialog's checkbox. This keeps one view's host names out of another view's reverse zones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d18fe18ccd
commit
6cd3f6ef4e
16 files changed
+216
-48
No files matched your search
@@ -72,7 +72,10 @@ export async function render(el, params, query) {
|
||||
h("span", { class: "mono" }, f.address), " → ", h("span", { class: "mono" }, display(f.target)),
|
||||
f.from ? h("span", { class: "muted" }, " (from view " + f.from + ")") : null,
|
||||
f.others && f.others.length ? h("span", { class: "muted" }, " (also " + f.others.map(display).join(", ") + ")") : null)),
|
||||
zone.ptr_missing > (zone.ptr_missing_list || []).length ? h("li", { class: "muted" }, "and " + (zone.ptr_missing - zone.ptr_missing_list.length) + " more") : null)) : null;
|
||||
zone.ptr_missing > (zone.ptr_missing_list || []).length ? h("li", { class: "muted" }, "and " + (zone.ptr_missing - zone.ptr_missing_list.length) + " more") : null))
|
||||
: zone.ptr_other_views && can("zones", true) ? h("div", { class: "muted small" },
|
||||
plural(zone.ptr_other_views, "address", "addresses") + " in " + zone.prefix + " only other views' records use, without a PTR record here. ",
|
||||
h("button", { class: "small", title: "Adds PTR records naming them from the other views' records, publishing those names in view " + zone.view, onclick: () => fillPTR(zone, true) }, "Name them from there")) : null;
|
||||
const tabBar = h("div", { class: "tabs" }, tabs.map(([k, label]) => h("a", { href: "#/zones/" + id + "/" + k, class: k === tab ? "active" : "" }, label)));
|
||||
// The header and tabs show at once. Below them, switching tabs keeps the
|
||||
// previous tab's content (faded) until the new one is loaded, rather
|
||||
@@ -951,9 +954,9 @@ async function toggleZone(zone) {
|
||||
}
|
||||
|
||||
// fillPTR adds the PTR records a reverse zone lacks (docs/reverse.md).
|
||||
async function fillPTR(zone) {
|
||||
async function fillPTR(zone, otherViews) {
|
||||
try {
|
||||
const r = await change("POST", "/zones/" + zone.id + "/fill-ptr");
|
||||
const r = await change("POST", "/zones/" + zone.id + "/fill-ptr", undefined, otherViews ? { query: { other_views: "1" } } : {});
|
||||
toast(describeResult(r));
|
||||
(r.warnings || []).forEach((w) => toast(w, "warn", 10000));
|
||||
rerender();
|
||||
|
||||
Reference in new issue
Block a user