Merge branch 'develop' into issue_16009

This commit is contained in:
Jeremy Stretch 2024-09-19 13:09:44 -04:00
commit 7de5efda2a
8 changed files with 94 additions and 66 deletions

18
docs/_theme/partials/copyright.html vendored Normal file
View File

@ -0,0 +1,18 @@
<div class="md-copyright">
{% if config.copyright %}
<div class="md-copyright__highlight">
{{ config.copyright }}
</div>
{% endif %}
{% if not config.extra.generator == false %}
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
{% endif %}
</div>
{% if not config.extra.build_public %}
<div class="md-copyright">
Documentation is being served locally
</div>
{% endif %}

View File

@ -149,3 +149,7 @@ class ASN(PrimaryModel):
return f'{self.asn} ({self.asn // 65536}.{self.asn % 65536})' return f'{self.asn} ({self.asn // 65536}.{self.asn % 65536})'
else: else:
return self.asn return self.asn
@property
def prefixed_name(self):
return f'AS{self.asn_with_asdot}'

View File

@ -19,6 +19,7 @@ class ASNIndex(SearchIndex):
model = models.ASN model = models.ASN
fields = ( fields = (
('asn', 100), ('asn', 100),
('prefixed_name', 110),
('description', 500), ('description', 500),
) )
display_attrs = ('rir', 'tenant', 'description') display_attrs = ('rir', 'tenant', 'description')

View File

@ -1,5 +1,5 @@
from django.conf import settings from django.conf import settings
from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy as _
from netbox.registry import registry from netbox.registry import registry
from users.preferences import UserPreference from users.preferences import UserPreference

Binary file not shown.

View File

@ -128,6 +128,9 @@ body[data-bs-theme=dark] {
.footer .text-primary { .footer .text-primary {
color: white !important; color: white !important;
} }
.toast {
color: var(--#{$prefix}body-color);
}
} }
// Do not apply padding to <code> elements inside a <pre> // Do not apply padding to <code> elements inside a <pre>

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-12 05:02+0000\n" "POT-Creation-Date: 2024-09-18 05:02+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -82,8 +82,8 @@ msgstr ""
#: netbox/circuits/choices.py:21 netbox/dcim/choices.py:20 #: netbox/circuits/choices.py:21 netbox/dcim/choices.py:20
#: netbox/dcim/choices.py:102 netbox/dcim/choices.py:185 #: netbox/dcim/choices.py:102 netbox/dcim/choices.py:185
#: netbox/dcim/choices.py:231 netbox/dcim/choices.py:1518 #: netbox/dcim/choices.py:231 netbox/dcim/choices.py:1520
#: netbox/dcim/choices.py:1594 netbox/dcim/choices.py:1644 #: netbox/dcim/choices.py:1596 netbox/dcim/choices.py:1646
#: netbox/virtualization/choices.py:20 netbox/virtualization/choices.py:45 #: netbox/virtualization/choices.py:20 netbox/virtualization/choices.py:45
#: netbox/vpn/choices.py:18 #: netbox/vpn/choices.py:18
msgid "Planned" msgid "Planned"
@ -96,7 +96,7 @@ msgstr ""
#: netbox/circuits/choices.py:23 netbox/core/tables/tasks.py:22 #: netbox/circuits/choices.py:23 netbox/core/tables/tasks.py:22
#: netbox/dcim/choices.py:22 netbox/dcim/choices.py:103 #: netbox/dcim/choices.py:22 netbox/dcim/choices.py:103
#: netbox/dcim/choices.py:184 netbox/dcim/choices.py:230 #: netbox/dcim/choices.py:184 netbox/dcim/choices.py:230
#: netbox/dcim/choices.py:1593 netbox/dcim/choices.py:1643 #: netbox/dcim/choices.py:1595 netbox/dcim/choices.py:1645
#: netbox/extras/tables/tables.py:495 netbox/ipam/choices.py:31 #: netbox/extras/tables/tables.py:495 netbox/ipam/choices.py:31
#: netbox/ipam/choices.py:49 netbox/ipam/choices.py:69 #: netbox/ipam/choices.py:49 netbox/ipam/choices.py:69
#: netbox/ipam/choices.py:154 netbox/templates/extras/configcontext.html:25 #: netbox/ipam/choices.py:154 netbox/templates/extras/configcontext.html:25
@ -107,8 +107,8 @@ msgid "Active"
msgstr "" msgstr ""
#: netbox/circuits/choices.py:24 netbox/dcim/choices.py:183 #: netbox/circuits/choices.py:24 netbox/dcim/choices.py:183
#: netbox/dcim/choices.py:229 netbox/dcim/choices.py:1592 #: netbox/dcim/choices.py:229 netbox/dcim/choices.py:1594
#: netbox/dcim/choices.py:1645 netbox/virtualization/choices.py:24 #: netbox/dcim/choices.py:1647 netbox/virtualization/choices.py:24
#: netbox/virtualization/choices.py:43 #: netbox/virtualization/choices.py:43
msgid "Offline" msgid "Offline"
msgstr "" msgstr ""
@ -121,7 +121,7 @@ msgstr ""
msgid "Decommissioned" msgid "Decommissioned"
msgstr "" msgstr ""
#: netbox/circuits/choices.py:90 netbox/dcim/choices.py:1605 #: netbox/circuits/choices.py:90 netbox/dcim/choices.py:1607
#: netbox/tenancy/choices.py:17 #: netbox/tenancy/choices.py:17
msgid "Primary" msgid "Primary"
msgstr "" msgstr ""
@ -1587,7 +1587,7 @@ msgstr ""
#: netbox/core/choices.py:22 netbox/core/choices.py:59 #: netbox/core/choices.py:22 netbox/core/choices.py:59
#: netbox/core/constants.py:20 netbox/core/tables/tasks.py:34 #: netbox/core/constants.py:20 netbox/core/tables/tasks.py:34
#: netbox/dcim/choices.py:187 netbox/dcim/choices.py:233 #: netbox/dcim/choices.py:187 netbox/dcim/choices.py:233
#: netbox/dcim/choices.py:1595 netbox/virtualization/choices.py:47 #: netbox/dcim/choices.py:1597 netbox/virtualization/choices.py:47
msgid "Failed" msgid "Failed"
msgstr "" msgstr ""
@ -1911,7 +1911,7 @@ msgstr ""
msgid "Rack Elevations" msgid "Rack Elevations"
msgstr "" msgstr ""
#: netbox/core/forms/model_forms.py:157 netbox/dcim/choices.py:1506 #: netbox/core/forms/model_forms.py:157 netbox/dcim/choices.py:1508
#: netbox/dcim/forms/bulk_edit.py:969 netbox/dcim/forms/bulk_edit.py:1357 #: netbox/dcim/forms/bulk_edit.py:969 netbox/dcim/forms/bulk_edit.py:1357
#: netbox/dcim/forms/bulk_edit.py:1375 netbox/dcim/tables/racks.py:158 #: netbox/dcim/forms/bulk_edit.py:1375 netbox/dcim/tables/racks.py:158
#: netbox/netbox/navigation/menu.py:291 netbox/netbox/navigation/menu.py:295 #: netbox/netbox/navigation/menu.py:291 netbox/netbox/navigation/menu.py:295
@ -2477,7 +2477,7 @@ msgid "Staging"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:23 netbox/dcim/choices.py:189 #: netbox/dcim/choices.py:23 netbox/dcim/choices.py:189
#: netbox/dcim/choices.py:234 netbox/dcim/choices.py:1519 #: netbox/dcim/choices.py:234 netbox/dcim/choices.py:1521
#: netbox/virtualization/choices.py:23 netbox/virtualization/choices.py:48 #: netbox/virtualization/choices.py:23 netbox/virtualization/choices.py:48
msgid "Decommissioning" msgid "Decommissioning"
msgstr "" msgstr ""
@ -2541,7 +2541,7 @@ msgstr ""
msgid "Millimeters" msgid "Millimeters"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:115 netbox/dcim/choices.py:1541 #: netbox/dcim/choices.py:115 netbox/dcim/choices.py:1543
msgid "Inches" msgid "Inches"
msgstr "" msgstr ""
@ -2630,7 +2630,7 @@ msgid "Side to rear"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:209 netbox/dcim/choices.py:253 #: netbox/dcim/choices.py:209 netbox/dcim/choices.py:253
#: netbox/dcim/choices.py:1291 #: netbox/dcim/choices.py:1293
msgid "Passive" msgid "Passive"
msgstr "" msgstr ""
@ -2638,15 +2638,15 @@ msgstr ""
msgid "Mixed" msgid "Mixed"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:478 netbox/dcim/choices.py:726 #: netbox/dcim/choices.py:478 netbox/dcim/choices.py:727
msgid "NEMA (Non-locking)" msgid "NEMA (Non-locking)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:500 netbox/dcim/choices.py:748 #: netbox/dcim/choices.py:500 netbox/dcim/choices.py:749
msgid "NEMA (Locking)" msgid "NEMA (Locking)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:524 netbox/dcim/choices.py:772 #: netbox/dcim/choices.py:524 netbox/dcim/choices.py:773
msgid "California Style" msgid "California Style"
msgstr "" msgstr ""
@ -2654,30 +2654,30 @@ msgstr ""
msgid "International/ITA" msgid "International/ITA"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:567 netbox/dcim/choices.py:807 #: netbox/dcim/choices.py:567 netbox/dcim/choices.py:808
msgid "Proprietary" msgid "Proprietary"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:575 netbox/dcim/choices.py:816 #: netbox/dcim/choices.py:575 netbox/dcim/choices.py:818
#: netbox/dcim/choices.py:1207 netbox/dcim/choices.py:1209 #: netbox/dcim/choices.py:1209 netbox/dcim/choices.py:1211
#: netbox/dcim/choices.py:1435 netbox/dcim/choices.py:1437 #: netbox/dcim/choices.py:1437 netbox/dcim/choices.py:1439
#: netbox/netbox/navigation/menu.py:200 #: netbox/netbox/navigation/menu.py:200
msgid "Other" msgid "Other"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:780 #: netbox/dcim/choices.py:781
msgid "ITA/International" msgid "ITA/International"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:846 #: netbox/dcim/choices.py:848
msgid "Physical" msgid "Physical"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:847 netbox/dcim/choices.py:1013 #: netbox/dcim/choices.py:849 netbox/dcim/choices.py:1015
msgid "Virtual" msgid "Virtual"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:848 netbox/dcim/choices.py:1086 #: netbox/dcim/choices.py:850 netbox/dcim/choices.py:1088
#: netbox/dcim/forms/bulk_edit.py:1515 netbox/dcim/forms/filtersets.py:1330 #: netbox/dcim/forms/bulk_edit.py:1515 netbox/dcim/forms/filtersets.py:1330
#: netbox/dcim/forms/model_forms.py:988 netbox/dcim/forms/model_forms.py:1396 #: netbox/dcim/forms/model_forms.py:988 netbox/dcim/forms/model_forms.py:1396
#: netbox/netbox/navigation/menu.py:140 netbox/netbox/navigation/menu.py:144 #: netbox/netbox/navigation/menu.py:140 netbox/netbox/navigation/menu.py:144
@ -2685,11 +2685,11 @@ msgstr ""
msgid "Wireless" msgid "Wireless"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1011 #: netbox/dcim/choices.py:1013
msgid "Virtual interfaces" msgid "Virtual interfaces"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1014 netbox/dcim/forms/bulk_edit.py:1410 #: netbox/dcim/choices.py:1016 netbox/dcim/forms/bulk_edit.py:1410
#: netbox/dcim/forms/bulk_import.py:840 netbox/dcim/forms/model_forms.py:974 #: netbox/dcim/forms/bulk_import.py:840 netbox/dcim/forms/model_forms.py:974
#: netbox/dcim/tables/devices.py:657 netbox/templates/dcim/interface.html:106 #: netbox/dcim/tables/devices.py:657 netbox/templates/dcim/interface.html:106
#: netbox/templates/virtualization/vminterface.html:43 #: netbox/templates/virtualization/vminterface.html:43
@ -2699,27 +2699,27 @@ msgstr ""
msgid "Bridge" msgid "Bridge"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1015 #: netbox/dcim/choices.py:1017
msgid "Link Aggregation Group (LAG)" msgid "Link Aggregation Group (LAG)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1019 #: netbox/dcim/choices.py:1021
msgid "Ethernet (fixed)" msgid "Ethernet (fixed)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1034 #: netbox/dcim/choices.py:1036
msgid "Ethernet (modular)" msgid "Ethernet (modular)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1070 #: netbox/dcim/choices.py:1072
msgid "Ethernet (backplane)" msgid "Ethernet (backplane)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1101 #: netbox/dcim/choices.py:1103
msgid "Cellular" msgid "Cellular"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1153 netbox/dcim/forms/filtersets.py:383 #: netbox/dcim/choices.py:1155 netbox/dcim/forms/filtersets.py:383
#: netbox/dcim/forms/filtersets.py:809 netbox/dcim/forms/filtersets.py:963 #: netbox/dcim/forms/filtersets.py:809 netbox/dcim/forms/filtersets.py:963
#: netbox/dcim/forms/filtersets.py:1542 #: netbox/dcim/forms/filtersets.py:1542
#: netbox/templates/dcim/inventoryitem.html:52 #: netbox/templates/dcim/inventoryitem.html:52
@ -2727,129 +2727,129 @@ msgstr ""
msgid "Serial" msgid "Serial"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1168 #: netbox/dcim/choices.py:1170
msgid "Coaxial" msgid "Coaxial"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1188 #: netbox/dcim/choices.py:1190
msgid "Stacking" msgid "Stacking"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1238 #: netbox/dcim/choices.py:1240
msgid "Half" msgid "Half"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1239 #: netbox/dcim/choices.py:1241
msgid "Full" msgid "Full"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1240 netbox/netbox/preferences.py:31 #: netbox/dcim/choices.py:1242 netbox/netbox/preferences.py:31
#: netbox/wireless/choices.py:480 #: netbox/wireless/choices.py:480
msgid "Auto" msgid "Auto"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1251 #: netbox/dcim/choices.py:1253
msgid "Access" msgid "Access"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1252 netbox/ipam/tables/vlans.py:172 #: netbox/dcim/choices.py:1254 netbox/ipam/tables/vlans.py:172
#: netbox/ipam/tables/vlans.py:217 #: netbox/ipam/tables/vlans.py:217
#: netbox/templates/dcim/inc/interface_vlans_table.html:7 #: netbox/templates/dcim/inc/interface_vlans_table.html:7
msgid "Tagged" msgid "Tagged"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1253 #: netbox/dcim/choices.py:1255
msgid "Tagged (All)" msgid "Tagged (All)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1282 #: netbox/dcim/choices.py:1284
msgid "IEEE Standard" msgid "IEEE Standard"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1293 #: netbox/dcim/choices.py:1295
msgid "Passive 24V (2-pair)" msgid "Passive 24V (2-pair)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1294 #: netbox/dcim/choices.py:1296
msgid "Passive 24V (4-pair)" msgid "Passive 24V (4-pair)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1295 #: netbox/dcim/choices.py:1297
msgid "Passive 48V (2-pair)" msgid "Passive 48V (2-pair)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1296 #: netbox/dcim/choices.py:1298
msgid "Passive 48V (4-pair)" msgid "Passive 48V (4-pair)"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1366 netbox/dcim/choices.py:1476 #: netbox/dcim/choices.py:1368 netbox/dcim/choices.py:1478
msgid "Copper" msgid "Copper"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1389 #: netbox/dcim/choices.py:1391
msgid "Fiber Optic" msgid "Fiber Optic"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1422 netbox/dcim/choices.py:1505 #: netbox/dcim/choices.py:1424 netbox/dcim/choices.py:1507
msgid "USB" msgid "USB"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1492 #: netbox/dcim/choices.py:1494
msgid "Fiber" msgid "Fiber"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1517 netbox/dcim/forms/filtersets.py:1227 #: netbox/dcim/choices.py:1519 netbox/dcim/forms/filtersets.py:1227
msgid "Connected" msgid "Connected"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1536 netbox/wireless/choices.py:497 #: netbox/dcim/choices.py:1538 netbox/wireless/choices.py:497
msgid "Kilometers" msgid "Kilometers"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1537 netbox/templates/dcim/cable_trace.html:65 #: netbox/dcim/choices.py:1539 netbox/templates/dcim/cable_trace.html:65
#: netbox/wireless/choices.py:498 #: netbox/wireless/choices.py:498
msgid "Meters" msgid "Meters"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1538 #: netbox/dcim/choices.py:1540
msgid "Centimeters" msgid "Centimeters"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1539 netbox/wireless/choices.py:499 #: netbox/dcim/choices.py:1541 netbox/wireless/choices.py:499
msgid "Miles" msgid "Miles"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1540 netbox/templates/dcim/cable_trace.html:66 #: netbox/dcim/choices.py:1542 netbox/templates/dcim/cable_trace.html:66
#: netbox/wireless/choices.py:500 #: netbox/wireless/choices.py:500
msgid "Feet" msgid "Feet"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1556 netbox/templates/dcim/device.html:327 #: netbox/dcim/choices.py:1558 netbox/templates/dcim/device.html:327
#: netbox/templates/dcim/rack.html:106 #: netbox/templates/dcim/rack.html:106
msgid "Kilograms" msgid "Kilograms"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1557 #: netbox/dcim/choices.py:1559
msgid "Grams" msgid "Grams"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1558 netbox/templates/dcim/rack.html:107 #: netbox/dcim/choices.py:1560 netbox/templates/dcim/rack.html:107
msgid "Pounds" msgid "Pounds"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1559 #: netbox/dcim/choices.py:1561
msgid "Ounces" msgid "Ounces"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1606 #: netbox/dcim/choices.py:1608
msgid "Redundant" msgid "Redundant"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1627 #: netbox/dcim/choices.py:1629
msgid "Single phase" msgid "Single phase"
msgstr "" msgstr ""
#: netbox/dcim/choices.py:1628 #: netbox/dcim/choices.py:1630
msgid "Three-phase" msgid "Three-phase"
msgstr "" msgstr ""
@ -10097,7 +10097,7 @@ msgstr ""
msgid "Range boundaries must be defined as integers." msgid "Range boundaries must be defined as integers."
msgstr "" msgstr ""
#: netbox/netbox/api/serializers/fields.py:39 #: netbox/netbox/api/serializers/fields.py:40
#, python-brace-format #, python-brace-format
msgid "{class_name} must implement get_view_name()" msgid "{class_name} must implement get_view_name()"
msgstr "" msgstr ""

View File

@ -6,9 +6,11 @@
{# Render the field label (if any), except for checkboxes #} {# Render the field label (if any), except for checkboxes #}
{% if label and not field|widget_type == 'checkboxinput' %} {% if label and not field|widget_type == 'checkboxinput' %}
<label for="{{ field.id_for_label }}" class="col-sm-3 col-form-label text-lg-end{% if field.field.required %} required{% endif %}"> <div class="col-sm-3 text-lg-end">
{{ label }} <label for="{{ field.id_for_label }}" class="col-form-label d-inline-block{% if field.field.required %} required{% endif %}">
</label> {{ label }}
</label>
</div>
{% endif %} {% endif %}
{# Render the field itself #} {# Render the field itself #}