netbox-plugin-dns 1.2.5__py3-none-any.whl → 1.2.7b2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of netbox-plugin-dns might be problematic. Click here for more details.

Files changed (65) hide show
  1. netbox_dns/__init__.py +15 -1
  2. netbox_dns/api/serializers.py +3 -0
  3. netbox_dns/api/serializers_/dnssec_key_template.py +46 -0
  4. netbox_dns/api/serializers_/dnssec_policy.py +83 -0
  5. netbox_dns/api/serializers_/zone.py +10 -0
  6. netbox_dns/api/serializers_/zone_template.py +13 -4
  7. netbox_dns/api/urls.py +4 -0
  8. netbox_dns/api/views.py +18 -0
  9. netbox_dns/choices/__init__.py +2 -0
  10. netbox_dns/choices/dnssec_key_template.py +63 -0
  11. netbox_dns/choices/dnssec_policy.py +40 -0
  12. netbox_dns/choices/record.py +2 -25
  13. netbox_dns/choices/utilities.py +26 -0
  14. netbox_dns/fields/__init__.py +2 -0
  15. netbox_dns/fields/choice_array.py +20 -0
  16. netbox_dns/fields/timeperiod.py +31 -0
  17. netbox_dns/filtersets/__init__.py +3 -0
  18. netbox_dns/filtersets/dnssec_key_template.py +51 -0
  19. netbox_dns/filtersets/dnssec_policy.py +73 -0
  20. netbox_dns/filtersets/zone.py +23 -4
  21. netbox_dns/filtersets/zone_template.py +11 -0
  22. netbox_dns/forms/__init__.py +2 -0
  23. netbox_dns/forms/dnssec_key_template.py +188 -0
  24. netbox_dns/forms/dnssec_policy.py +563 -0
  25. netbox_dns/forms/record.py +12 -6
  26. netbox_dns/forms/record_template.py +9 -3
  27. netbox_dns/forms/zone.py +70 -22
  28. netbox_dns/forms/zone_template.py +29 -0
  29. netbox_dns/graphql/__init__.py +7 -3
  30. netbox_dns/graphql/filters.py +16 -0
  31. netbox_dns/graphql/schema.py +20 -0
  32. netbox_dns/graphql/types.py +67 -3
  33. netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
  34. netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
  35. netbox_dns/migrations/0015_dnssec.py +168 -0
  36. netbox_dns/migrations/0016_dnssec_policy_status.py +18 -0
  37. netbox_dns/migrations/0017_dnssec_policy_zone_zone_template.py +41 -0
  38. netbox_dns/models/__init__.py +2 -0
  39. netbox_dns/models/dnssec_key_template.py +114 -0
  40. netbox_dns/models/dnssec_policy.py +201 -0
  41. netbox_dns/models/zone.py +29 -16
  42. netbox_dns/models/zone_template.py +16 -6
  43. netbox_dns/navigation.py +49 -0
  44. netbox_dns/signals/dnssec.py +32 -0
  45. netbox_dns/tables/__init__.py +2 -0
  46. netbox_dns/tables/dnssec_key_template.py +48 -0
  47. netbox_dns/tables/dnssec_policy.py +131 -0
  48. netbox_dns/tables/zone.py +17 -1
  49. netbox_dns/tables/zone_template.py +4 -0
  50. netbox_dns/templates/netbox_dns/dnsseckeytemplate.html +70 -0
  51. netbox_dns/templates/netbox_dns/dnssecpolicy.html +155 -0
  52. netbox_dns/templates/netbox_dns/zone.html +16 -0
  53. netbox_dns/templates/netbox_dns/zonetemplate/child.html +46 -0
  54. netbox_dns/templates/netbox_dns/zonetemplate.html +12 -0
  55. netbox_dns/urls.py +16 -0
  56. netbox_dns/validators/__init__.py +1 -0
  57. netbox_dns/validators/dnssec.py +146 -0
  58. netbox_dns/views/__init__.py +2 -0
  59. netbox_dns/views/dnssec_key_template.py +87 -0
  60. netbox_dns/views/dnssec_policy.py +153 -0
  61. {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/METADATA +2 -2
  62. {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/RECORD +65 -39
  63. {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/WHEEL +1 -1
  64. {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/LICENSE +0 -0
  65. {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/top_level.txt +0 -0
netbox_dns/navigation.py CHANGED
@@ -92,6 +92,46 @@ managed_record_menu_item = PluginMenuItem(
92
92
  permissions=["netbox_dns.view_record"],
93
93
  )
94
94
 
95
+ dnsseckeytemplate_menu_item = PluginMenuItem(
96
+ link="plugins:netbox_dns:dnsseckeytemplate_list",
97
+ link_text=_("DNSSEC Key Templates"),
98
+ permissions=["netbox_dns.view_dnsseckeytemplate"],
99
+ buttons=(
100
+ PluginMenuButton(
101
+ "plugins:netbox_dns:dnsseckeytemplate_add",
102
+ _("Add"),
103
+ "mdi mdi-plus-thick",
104
+ permissions=["netbox_dns.add_dnsseckeytemplate"],
105
+ ),
106
+ PluginMenuButton(
107
+ "plugins:netbox_dns:dnsseckeytemplate_bulk_import",
108
+ _("Import"),
109
+ "mdi mdi-upload",
110
+ permissions=["netbox_dns.add_dnsseckeytemplate"],
111
+ ),
112
+ ),
113
+ )
114
+
115
+ dnssecpolicy_menu_item = PluginMenuItem(
116
+ link="plugins:netbox_dns:dnssecpolicy_list",
117
+ link_text=_("DNSSEC Policies"),
118
+ permissions=["netbox_dns.view_dnssecpolicy"],
119
+ buttons=(
120
+ PluginMenuButton(
121
+ "plugins:netbox_dns:dnssecpolicy_add",
122
+ _("Add"),
123
+ "mdi mdi-plus-thick",
124
+ permissions=["netbox_dns.add_dnssecpolicy"],
125
+ ),
126
+ PluginMenuButton(
127
+ "plugins:netbox_dns:dnssecpolicy_bulk_import",
128
+ _("Import"),
129
+ "mdi mdi-upload",
130
+ permissions=["netbox_dns.add_dnssecpolicy"],
131
+ ),
132
+ ),
133
+ )
134
+
95
135
  zonetemplate_menu_item = PluginMenuItem(
96
136
  link="plugins:netbox_dns:zonetemplate_list",
97
137
  link_text=_("Zone Templates"),
@@ -187,6 +227,13 @@ if top_level_menu:
187
227
  managed_record_menu_item,
188
228
  ),
189
229
  ),
230
+ (
231
+ _("DNSSEC"),
232
+ (
233
+ dnsseckeytemplate_menu_item,
234
+ dnssecpolicy_menu_item,
235
+ ),
236
+ ),
190
237
  (
191
238
  _("Templates"),
192
239
  (
@@ -211,6 +258,8 @@ else:
211
258
  nameserver_menu_item,
212
259
  record_menu_item,
213
260
  managed_record_menu_item,
261
+ dnsseckeytemplate_menu_item,
262
+ dnssecpolicy_menu_item,
214
263
  registrar_menu_item,
215
264
  contact_menu_item,
216
265
  )
@@ -0,0 +1,32 @@
1
+ from django.dispatch import receiver
2
+ from django.db.models.signals import m2m_changed
3
+ from django.core.exceptions import ValidationError
4
+
5
+ from netbox.context import current_request
6
+ from utilities.exceptions import AbortRequest
7
+
8
+ from netbox_dns.validators import validate_key_template_assignment
9
+
10
+ from netbox_dns.models import DNSSECPolicy, DNSSECKeyTemplate
11
+
12
+
13
+ @receiver(m2m_changed, sender=DNSSECPolicy.key_templates.through)
14
+ def dnssec_policy_key_templates_changed(action, instance, pk_set, **kwargs):
15
+ request = current_request.get()
16
+
17
+ key_templates = instance.key_templates.all()
18
+ match action:
19
+ case "pre_remove":
20
+ key_templates = key_templates.exclude(pk__in=pk_set)
21
+ case "pre_add":
22
+ key_templates |= DNSSECKeyTemplate.objects.filter(pk__in=pk_set)
23
+ case _:
24
+ return
25
+
26
+ try:
27
+ validate_key_template_assignment(key_templates)
28
+ except ValidationError as exc:
29
+ if request is not None:
30
+ raise AbortRequest(exc)
31
+ else:
32
+ raise exc
@@ -6,3 +6,5 @@ from .registration_contact import *
6
6
  from .registrar import *
7
7
  from .zone_template import *
8
8
  from .record_template import *
9
+ from .dnssec_key_template import *
10
+ from .dnssec_policy import *
@@ -0,0 +1,48 @@
1
+ import django_tables2 as tables
2
+ from django.utils.translation import gettext_lazy as _
3
+
4
+
5
+ from netbox.tables import (
6
+ NetBoxTable,
7
+ ChoiceFieldColumn,
8
+ TagColumn,
9
+ )
10
+ from tenancy.tables import TenancyColumnsMixin
11
+
12
+ from netbox_dns.models import DNSSECKeyTemplate
13
+
14
+
15
+ __all__ = ("DNSSECKeyTemplateTable",)
16
+
17
+
18
+ class DNSSECKeyTemplateTable(TenancyColumnsMixin, NetBoxTable):
19
+ name = tables.Column(
20
+ verbose_name=_("Name"),
21
+ linkify=True,
22
+ )
23
+ type = ChoiceFieldColumn(
24
+ verbose_name=_("Key Type"),
25
+ )
26
+ lifetime = tables.Column(
27
+ verbose_name=_("Lifetime"),
28
+ )
29
+ algorithm = ChoiceFieldColumn(
30
+ verbose_name=_("Algorithm"),
31
+ )
32
+ key_size = ChoiceFieldColumn(
33
+ verbose_name=_("Key Size"),
34
+ )
35
+ tags = TagColumn(
36
+ url_name="plugins:netbox_dns:dnsseckeytemplate_list",
37
+ )
38
+
39
+ class Meta(NetBoxTable.Meta):
40
+ model = DNSSECKeyTemplate
41
+ fields = ("description",)
42
+ default_columns = (
43
+ "name",
44
+ "type",
45
+ "algorithm",
46
+ "key_size",
47
+ "tags",
48
+ )
@@ -0,0 +1,131 @@
1
+ import django_tables2 as tables
2
+ from django.utils.translation import gettext_lazy as _
3
+
4
+
5
+ from netbox.tables import (
6
+ NetBoxTable,
7
+ TagColumn,
8
+ ChoiceFieldColumn,
9
+ ActionsColumn,
10
+ )
11
+ from tenancy.tables import TenancyColumnsMixin
12
+
13
+ from netbox_dns.models import DNSSECPolicy
14
+
15
+
16
+ __all__ = (
17
+ "DNSSECPolicyTable",
18
+ "DNSSECPolicyDisplayTable",
19
+ )
20
+
21
+
22
+ class DNSSECPolicyTable(TenancyColumnsMixin, NetBoxTable):
23
+ name = tables.Column(
24
+ verbose_name=_("Name"),
25
+ linkify=True,
26
+ )
27
+ status = ChoiceFieldColumn(
28
+ verbose_name=_("Status"),
29
+ )
30
+ dnskey_ttl = tables.Column(
31
+ verbose_name=_("DNSKEY TTL"),
32
+ )
33
+ purge_keys = tables.Column(
34
+ verbose_name=_("Purge Keys"),
35
+ )
36
+ publish_safety = tables.Column(
37
+ verbose_name=_("Publish Safety"),
38
+ )
39
+ retire_safety = tables.Column(
40
+ verbose_name=_("Retire Safety"),
41
+ )
42
+ signatures_jitter = tables.Column(
43
+ verbose_name=_("Signatures Jitter"),
44
+ )
45
+ signatures_refresh = tables.Column(
46
+ verbose_name=_("Signatures Refresh"),
47
+ )
48
+ signatures_validity = tables.Column(
49
+ verbose_name=_("Signatures Validity"),
50
+ )
51
+ signatures_validity_dnskey = tables.Column(
52
+ verbose_name=_("Signatures Validity (DNSKEY)"),
53
+ )
54
+ max_zone_ttl = tables.Column(
55
+ verbose_name=_("Max Zone TTL"),
56
+ )
57
+ dnskey_ttl = tables.Column(
58
+ verbose_name=_("DNSKEY TTL"),
59
+ )
60
+ zone_propagation_delay = tables.Column(
61
+ verbose_name=_("Zone Propagation Delay"),
62
+ )
63
+ create_cdnskey = tables.BooleanColumn(
64
+ verbose_name=_("Create CDNSKEY"),
65
+ )
66
+ cds_digest_types = tables.Column(
67
+ verbose_name=_("CDS Digest Types"),
68
+ )
69
+ parent_ds_ttl = tables.Column(
70
+ verbose_name=_("Parent DS TTL"),
71
+ )
72
+ parent_propagation_delay = tables.Column(
73
+ verbose_name=_("Parent Propagation Delay"),
74
+ )
75
+ use_nsec3 = tables.BooleanColumn(
76
+ verbose_name=_("Use NSEC3"),
77
+ )
78
+ nsec3_iterations = tables.Column(
79
+ verbose_name=_("NSEC3 Iterations"),
80
+ )
81
+ nsec3_opt_out = tables.BooleanColumn(
82
+ verbose_name=_("NSEC3 Opt Out"),
83
+ )
84
+ nsec3_salt_size = tables.Column(
85
+ verbose_name=_("NSEC3 Salt Size"),
86
+ )
87
+ tags = TagColumn(
88
+ url_name="plugins:netbox_dns:dnssecpolicy_list",
89
+ )
90
+
91
+ class Meta(NetBoxTable.Meta):
92
+ model = DNSSECPolicy
93
+ fields = ("description",)
94
+ default_columns = (
95
+ "name",
96
+ "description",
97
+ "status",
98
+ "use_nsec3",
99
+ "tags",
100
+ )
101
+
102
+
103
+ class DNSSECPolicyDisplayTable(TenancyColumnsMixin, NetBoxTable):
104
+ actions = ActionsColumn(actions="")
105
+
106
+ name = tables.Column(
107
+ verbose_name=_("Name"),
108
+ linkify=True,
109
+ )
110
+ status = ChoiceFieldColumn(
111
+ verbose_name=_("Status"),
112
+ )
113
+ create_cdnskey = tables.BooleanColumn(
114
+ verbose_name=_("Create CDNSKEY"),
115
+ )
116
+ use_nsec3 = tables.BooleanColumn(
117
+ verbose_name=_("Use NSEC3"),
118
+ )
119
+ tags = TagColumn(
120
+ url_name="plugins:netbox_dns:dnssecpolicy_list",
121
+ )
122
+
123
+ class Meta(NetBoxTable.Meta):
124
+ model = DNSSECPolicy
125
+ fields = ("description",)
126
+ default_columns = (
127
+ "name",
128
+ "description",
129
+ "status",
130
+ "tags",
131
+ )
netbox_dns/tables/zone.py CHANGED
@@ -5,13 +5,17 @@ from netbox.tables import (
5
5
  ChoiceFieldColumn,
6
6
  NetBoxTable,
7
7
  TagColumn,
8
+ ActionsColumn,
8
9
  )
9
10
  from tenancy.tables import TenancyColumnsMixin
10
11
 
11
12
  from netbox_dns.models import Zone
12
13
 
13
14
 
14
- __all__ = ("ZoneTable",)
15
+ __all__ = (
16
+ "ZoneTable",
17
+ "ZoneDisplayTable",
18
+ )
15
19
 
16
20
 
17
21
  class ZoneTable(TenancyColumnsMixin, NetBoxTable):
@@ -36,6 +40,10 @@ class ZoneTable(TenancyColumnsMixin, NetBoxTable):
36
40
  default_ttl = tables.Column(
37
41
  verbose_name="Default TTL",
38
42
  )
43
+ dnssec_policy = tables.Column(
44
+ verbose_name=_("DNSSEC Policy"),
45
+ linkify=True,
46
+ )
39
47
  rfc2317_prefix = tables.Column(
40
48
  verbose_name=_("RFC2317 Prefix"),
41
49
  )
@@ -73,6 +81,7 @@ class ZoneTable(TenancyColumnsMixin, NetBoxTable):
73
81
  "description",
74
82
  "soa_rname",
75
83
  "soa_serial",
84
+ "inline_signing",
76
85
  "rfc2317_parent_managed",
77
86
  "registry_domain_id",
78
87
  )
@@ -82,3 +91,10 @@ class ZoneTable(TenancyColumnsMixin, NetBoxTable):
82
91
  "status",
83
92
  "tags",
84
93
  )
94
+
95
+
96
+ class ZoneDisplayTable(ZoneTable):
97
+ actions = ActionsColumn(actions=("changelog",))
98
+
99
+ class Meta(ZoneTable.Meta):
100
+ pass
@@ -25,6 +25,10 @@ class ZoneTemplateTable(TenancyColumnsMixin, NetBoxTable):
25
25
  tags = TagColumn(
26
26
  url_name="plugins:netbox_dns:zonetemplate_list",
27
27
  )
28
+ dnssec_policy = tables.Column(
29
+ verbose_name=_("DNSSEC Policy"),
30
+ linkify=True,
31
+ )
28
32
  registrar = tables.Column(
29
33
  verbose_name=_("Registrar"),
30
34
  linkify=True,
@@ -0,0 +1,70 @@
1
+ {% extends 'generic/object.html' %}
2
+ {% load render_table from django_tables2 %}
3
+ {% load i18n %}
4
+
5
+ {% block content %}
6
+ <div class="row">
7
+ <div class="col col-md-6">
8
+ <div class="card">
9
+ <h5 class="card-header">{% trans "DNSSEC Key" %}</h5>
10
+ <table class="table table-hover attr-table">
11
+ <tr>
12
+ <th scope="row">{% trans "Name" %}</th>
13
+ <td>{{ object.name }}</td>
14
+ </tr>
15
+ {% if object.description %}
16
+ <tr>
17
+ <th scope="row">{% trans "Description" %}</th>
18
+ <td style="word-break:break-all;">{{ object.description }}</td>
19
+ </tr>
20
+ {% endif %}
21
+ <tr>
22
+ <th scope="row">{% trans "Type" %}</th>
23
+ <td>{% badge object.get_type_display bg_color=object.get_type_color %}</td>
24
+ </tr>
25
+ <tr>
26
+ <th scope="row">{% trans "Lifetime" %}</th>
27
+ <td>{{ object.lifetime|placeholder }}</td>
28
+ </tr>
29
+ <tr>
30
+ <th scope="row">{% trans "Algorithm" %}</th>
31
+ <td>{% badge object.get_algorithm_display %}</td>
32
+ </tr>
33
+ <tr>
34
+ <th scope="row">{% trans "Key Size" %}</th>
35
+ <td>{% badge object.get_key_size_display %}</td>
36
+ </tr>
37
+ {% if object.tenant %}
38
+ <tr>
39
+ <th scope="row">{% trans "Tenant" %}</th>
40
+ <td>
41
+ {% if object.tenant.group %}
42
+ {{ object.tenant.group|linkify }} /
43
+ {% endif %}
44
+ {{ object.tenant|linkify|placeholder }}
45
+ </td>
46
+ </tr>
47
+ {% endif %}
48
+ </table>
49
+ </div>
50
+ {% include 'inc/panels/custom_fields.html' %}
51
+ </div>
52
+ <div class="col col-md-6">
53
+ {% include 'inc/panels/tags.html' %}
54
+ </div>
55
+ </div>
56
+ {% if policy_table %}
57
+ <div class="col col-md-12">
58
+ <div class="card">
59
+ {% if policy_table.rows|length == 1 %}
60
+ <h2 class="card-header">{% trans "Policy" %}</h2>
61
+ {% else %}
62
+ <h2 class="card-header">{% trans "Policies" %}</h2>
63
+ {% endif %}
64
+ <div class="table-responsive">
65
+ {% render_table policy_table 'inc/table.html' %}
66
+ </div>
67
+ </div>
68
+ </div>
69
+ {% endif %}
70
+ {% endblock %}
@@ -0,0 +1,155 @@
1
+ {% extends 'generic/object.html' %}
2
+ {% load i18n %}
3
+
4
+ {% block content %}
5
+ <div class="row">
6
+ <div class="col col-md-6">
7
+ <div class="card">
8
+ <h5 class="card-header">{% trans "DNSSEC Policy" %}</h5>
9
+ <table class="table table-hover attr-table">
10
+ {% if object.description %}
11
+ <tr>
12
+ <th scope="row">{% trans "Description" %}</th>
13
+ <td style="word-break:break-all;">{{ object.description }}</td>
14
+ </tr>
15
+ {% endif %}
16
+ <tr>
17
+ <th scope="row">{% trans "Status" %}</th>
18
+ <td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
19
+ </tr>
20
+ <tr>
21
+ <th scope="row">{% trans "Key Templates" %}</th>
22
+ <td>
23
+ <table>
24
+ {% for key_template in object.key_templates.all %}
25
+ <tr><td>{{ key_template|linkify }}</td></tr>
26
+ {% for template_id, errors in key_template_errors.items %}
27
+ {% if template_id == key_template.pk %}
28
+ {% for error in errors %}
29
+ <tr><td class="text-danger">{{ error }}</td></tr>
30
+ {% endfor %}
31
+ {% endif %}
32
+ {% endfor %}
33
+ {% endfor %}
34
+ </table>
35
+ </td>
36
+ </tr>
37
+ {% if policy_warning %}
38
+ <tr><td class="text-danger">{{ policy_warning }}</td></tr>
39
+ {% endif %}
40
+ {% if object.tenant %}
41
+ <tr>
42
+ <th scope="row">{% trans "Tenant" %}</th>
43
+ <td>
44
+ {% if object.tenant.group %}
45
+ {{ object.tenant.group|linkify }} /
46
+ {% endif %}
47
+ {{ object.tenant|linkify|placeholder }}
48
+ </td>
49
+ </tr>
50
+ {% endif %}
51
+ </table>
52
+ </div>
53
+ <div class="card">
54
+ <h5 class="card-header">{% trans "Timing" %}</h5>
55
+ <table class="table table-hover attr-table">
56
+ <tr>
57
+ <th scope="row">{% trans "DNSKEY TTL" %}</th>
58
+ <td>{{ object.dnskey_ttl|placeholder }}</td>
59
+ </tr>
60
+ <tr>
61
+ <th scope="row">{% trans "Publish Safety" %}</th>
62
+ <td>{{ object.publish_safety|placeholder }}</td>
63
+ </tr>
64
+ <tr>
65
+ <th scope="row">{% trans "Purge Keys" %}</th>
66
+ <td>{{ object.purge_keys|placeholder }}</td>
67
+ </tr>
68
+ <tr>
69
+ <th scope="row">{% trans "Retire Safety" %}</th>
70
+ <td>{{ object.retire_safety|placeholder }}</td>
71
+ </tr>
72
+ <tr>
73
+ <th scope="row">{% trans "Signatures Jitter" %}</th>
74
+ <td>{{ object.signatures_jitter|placeholder }}</td>
75
+ </tr>
76
+ <tr>
77
+ <th scope="row">{% trans "Signatures Refresh" %}</th>
78
+ <td>{{ object.signatures_refresh|placeholder }}</td>
79
+ </tr>
80
+ <tr>
81
+ <th scope="row">{% trans "Signatures Validity" %}</th>
82
+ <td>{{ object.signatures_validity|placeholder }}</td>
83
+ </tr>
84
+ <tr>
85
+ <th scope="row">{% trans "Signatures Validity (DNSKEY)" %}</th>
86
+ <td>{{ object.signatures_validity_dnskey|placeholder }}</td>
87
+ </tr>
88
+ <tr>
89
+ <th scope="row">{% trans "Max Zone TTL" %}</th>
90
+ <td>{{ object.max_zone_ttl|placeholder }}</td>
91
+ </tr>
92
+ <tr>
93
+ <th scope="row">{% trans "Zone Propagation Delay" %}</th>
94
+ <td>{{ object.zone_propagation_delay|placeholder }}</td>
95
+ </tr>
96
+ </table>
97
+ </div>
98
+ {% include 'inc/panels/custom_fields.html' %}
99
+ </div>
100
+ <div class="col col-md-6">
101
+ {% include 'inc/panels/tags.html' %}
102
+ <div class="card">
103
+ <h5 class="card-header">{% trans "Parent Delegation" %}</h5>
104
+ <table class="table table-hover attr-table">
105
+ <tr>
106
+ <th scope="row">{% trans "Create CDNSKEY" %}</th>
107
+ <td>{% checkmark object.create_cdnskey %}</td>
108
+ </tr>
109
+ <tr>
110
+ <th scope="row">{% trans "CDS Digest Types" %}</th>
111
+ <td>{% if object.cds_digest_types %}{% for digest_type in object.cds_digest_types %}{% badge digest_type %}{% endfor %}{% else %}{{ object_cds_digest_types|placeholder }}{% endif %}</td>
112
+ </tr>
113
+ <tr>
114
+ <th scope="row">{% trans "Parent DS TTL" %}</th>
115
+ <td>{{ object.parent_ds_ttl|placeholder }}</td>
116
+ </tr>
117
+ <tr>
118
+ <th scope="row">{% trans "Parent Propagation Delay" %}</th>
119
+ <td>{{ object.parent_propagation_delay|placeholder }}</td>
120
+ </tr>
121
+ </table>
122
+ </div>
123
+ <div class="card">
124
+ <h5 class="card-header">{% trans "Proof of Non-Existence" %}</h5>
125
+ <table class="table table-hover attr-table">
126
+ <tr>
127
+ <th scope="row">{% trans "Use NSEC3" %}</th>
128
+ <td>{% checkmark object.use_nsec3 %}</td>
129
+ </tr>
130
+ {% if object.use_nsec3 %}
131
+ <tr>
132
+ <th scope="row">{% trans "NSEC3 Iterations" %}</th>
133
+ <td>{{ object.nsec3_iterations|placeholder }}</td>
134
+ </tr>
135
+ <tr>
136
+ <th scope="row">{% trans "NSEC3 Opt Out" %}</th>
137
+ <td>{% checkmark object.nsec3_opt_out %}</td>
138
+ </tr>
139
+ <tr>
140
+ <th scope="row">{% trans "NSEC3 Salt Size" %}</th>
141
+ <td>{{ object.nsec3_salt_size|placeholder }}</td>
142
+ </tr>
143
+ {% if object.nsec3_iterations or object.nsec3_opt_out or object.nsec3_salt_size %}
144
+ <tr>
145
+ <th class="text-warning">
146
+ {% blocktrans with link='<a href="https://datatracker.ietf.org/doc/html/rfc9276.html#section-3.1">RFC 9276, Section 3.1</a>' %}Using NSEC3 options is not recommended (see {{ link }}){% endblocktrans %}
147
+ </th>
148
+ </tr>
149
+ {% endif %}
150
+ {% endif %}
151
+ </table>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ {% endblock %}
@@ -96,6 +96,22 @@
96
96
  </table>
97
97
  </div>
98
98
 
99
+ {% if object.dnssec_policy %}
100
+ <div class="card">
101
+ <h5 class="card-header">{% trans "DNSSEC" %}</h5>
102
+ <table class="table table-hover attr-table">
103
+ <tr>
104
+ <th scope="row">{% trans "Policy" %}</th>
105
+ <td>{{ object.dnssec_policy|linkify }}</td>
106
+ </tr>
107
+ <tr>
108
+ <th scope="row">{% trans "Use Inline Signing" %}</th>
109
+ <td>{% checkmark object.inline_signing %}</td>
110
+ </tr>
111
+ </table>
112
+ </div>
113
+ {% endif %}
114
+
99
115
  {% include 'inc/panels/tags.html' %}
100
116
  {% include 'inc/panels/custom_fields.html' %}
101
117
  </div>
@@ -0,0 +1,46 @@
1
+ {% extends 'generic/object.html' %}
2
+ {% load helpers %}
3
+ {% load render_table from django_tables2 %}
4
+ {% load perms %}
5
+ {% load i18n %}
6
+
7
+ {% block content %}
8
+ {% include 'inc/table_controls_htmx.html' with table_modal="ZoneTemplateTable_config" %}
9
+
10
+ <form method="post">
11
+ {% csrf_token %}
12
+ <input type="hidden" name="return_url" value="{% if return_url %}{{ return_url }}{% else %}{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" />
13
+
14
+ <div class="card">
15
+ <div class="htmx-container table-responsive" id="object_list">
16
+ {% include 'htmx/table.html' %}
17
+ </div>
18
+ </div>
19
+
20
+ {% if perms.netbox_dns.change_zonetemplate or perms.netbox_dns.delete_zonetemplate %}
21
+ {% with bulk_edit_url="plugins:netbox_dns:zonetemplate_bulk_edit" bulk_delete_url="plugins:netbox_dns:zonetemplate_bulk_delete" %}
22
+ <div class="noprint bulk-buttons">
23
+ <div class="bulk-button-group">
24
+ {% block bulk_buttons %}{% endblock %}
25
+ {% if bulk_edit_url and perms.netbox_dns.change_zonetemplate %}
26
+ <button type="submit" name="_edit" formaction="{% url bulk_edit_url %}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}" class="btn btn-warning">
27
+ <i class="mdi mdi-pencil" aria-hidden="true"></i> {% trans "Edit Selected" %}
28
+ </button>
29
+ {% endif %}
30
+ {% if bulk_delete_url and perms.netbox_dns.delete_zonetemplate %}
31
+ <button type="submit" name="_delete" formaction="{% url bulk_delete_url %}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}" class="btn btn-danger">
32
+ <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> {% trans "Delete Selected" %}
33
+ </button>
34
+ {% endif %}
35
+ </div>
36
+ </div>
37
+ {% endwith %}
38
+ {% endif %}
39
+ </form>
40
+
41
+ {% endblock %}
42
+
43
+ {% block modals %}
44
+ {{ block.super }}
45
+ {% table_config_form table %}
46
+ {% endblock modals %}
@@ -53,6 +53,18 @@
53
53
  </table>
54
54
  </div>
55
55
 
56
+ {% if object.dnssec_policy %}
57
+ <div class="card">
58
+ <h5 class="card-header">{% trans "DNSSEC" %}</h5>
59
+ <table class="table table-hover attr-table">
60
+ <tr>
61
+ <th scope="row">{% trans "Policy" %}</th>
62
+ <td>{{ object.dnssec_policy|linkify }}</td>
63
+ </tr>
64
+ </table>
65
+ </div>
66
+ {% endif %}
67
+
56
68
  {% include 'inc/panels/tags.html' %}
57
69
  {% include 'inc/panels/custom_fields.html' %}
58
70
  </div>