Reverse zones: name hosts from other views' records; search and bulk dismiss for long lists
A reverse zone's fill (and fill-ptr, the missing-PTR counts) names an address no record of its own view uses from another view's record, so an internal reverse zone can give the PTR of a host only external has an AAAA for; New reverse zone with a view chosen lists those addresses, marked. Automatic suggestions stay per view. For hundreds of addresses: the New reverse zone list has a search; on the Zones page the public addresses fold away, have a search, show 25 at a time and Dismiss these N dismisses everything a search found in one change (reverse.dismiss takes prefixes; --dismiss takes several). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
304c89dba4
commit
bfab83da6e
11 files changed
+239
-41
No files matched your search
+9
-8
@@ -1209,7 +1209,8 @@ type reverseSuggestion struct {
|
||||
|
||||
func zoneSuggestReverseCmd() *cobra.Command {
|
||||
var create, all bool
|
||||
var dismiss, undismiss, view string
|
||||
var dismiss, undismiss []string
|
||||
var view string
|
||||
cmd := &cobra.Command{
|
||||
Use: "suggest-reverse [--create] [--dismiss NETWORK --view V]",
|
||||
Short: "The reverse zones your private views lack for their records' addresses",
|
||||
@@ -1244,12 +1245,12 @@ IPv6 can be created as a /56 or /64 instead.`,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if dismiss != "" || undismiss != "" {
|
||||
path, prefix := "/reverse-zones/dismiss", dismiss
|
||||
if undismiss != "" {
|
||||
path, prefix = "/reverse-zones/undismiss", undismiss
|
||||
if len(dismiss) > 0 || len(undismiss) > 0 {
|
||||
path, prefixes := "/reverse-zones/dismiss", dismiss
|
||||
if len(undismiss) > 0 {
|
||||
path, prefixes = "/reverse-zones/undismiss", undismiss
|
||||
}
|
||||
resp, err := c.Mutate(ctx(), "POST", path, nil, map[string]any{"view": view, "prefix": prefix})
|
||||
resp, err := c.Mutate(ctx(), "POST", path, nil, map[string]any{"view": view, "prefixes": prefixes})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -1315,8 +1316,8 @@ IPv6 can be created as a /56 or /64 instead.`,
|
||||
},
|
||||
}
|
||||
cmd.Flags().BoolVar(&create, "create", false, "create the ones that are yours, filled with PTR records")
|
||||
cmd.Flags().StringVar(&dismiss, "dismiss", "", "hide the suggestion for this network")
|
||||
cmd.Flags().StringVar(&undismiss, "undismiss", "", "show a dismissed suggestion again")
|
||||
cmd.Flags().StringSliceVar(&dismiss, "dismiss", nil, "hide the suggestions for these networks (comma separated or repeated)")
|
||||
cmd.Flags().StringSliceVar(&undismiss, "undismiss", nil, "show dismissed suggestions again")
|
||||
cmd.Flags().StringVar(&view, "view", "", "only this view; with --dismiss/--undismiss: the suggestion's view")
|
||||
cmd.Flags().BoolVar(&all, "all", false, "also networks not suggested unasked (suggestions off, dismissed, public views)")
|
||||
return cmd
|
||||
|
||||
Reference in new issue
Block a user