mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-12 02:28:17 -06:00
Merge branch 'develop' into patch-4
This commit is contained in:
commit
be5d6cb2a0
@ -1 +0,0 @@
|
|||||||
{!models/extras/customlink.md!}
|
|
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
## v3.0.8 (FUTURE)
|
## v3.0.8 (FUTURE)
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
* [#7551](https://github.com/netbox-community/netbox/issues/7551) - Add UI field to filter interfaces by kind
|
||||||
|
* [#7561](https://github.com/netbox-community/netbox/issues/7561) - Add a utilization column to the IP ranges table
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* [#7300](https://github.com/netbox-community/netbox/issues/7300) - Fix incorrect Device LLDP interface row coloring
|
* [#7300](https://github.com/netbox-community/netbox/issues/7300) - Fix incorrect Device LLDP interface row coloring
|
||||||
@ -10,7 +15,10 @@
|
|||||||
* [#7534](https://github.com/netbox-community/netbox/issues/7534) - Avoid exception when utilizing "create and add another" twice in succession
|
* [#7534](https://github.com/netbox-community/netbox/issues/7534) - Avoid exception when utilizing "create and add another" twice in succession
|
||||||
* [#7544](https://github.com/netbox-community/netbox/issues/7544) - Fix multi-value filtering of custom field objects
|
* [#7544](https://github.com/netbox-community/netbox/issues/7544) - Fix multi-value filtering of custom field objects
|
||||||
* [#7545](https://github.com/netbox-community/netbox/issues/7545) - Fix incorrect display of update/delete events for webhooks
|
* [#7545](https://github.com/netbox-community/netbox/issues/7545) - Fix incorrect display of update/delete events for webhooks
|
||||||
|
* [#7550](https://github.com/netbox-community/netbox/issues/7550) - Fix rendering of UTF8-encoded data in change records
|
||||||
|
* [#7556](https://github.com/netbox-community/netbox/issues/7556) - Fix display of version when new release is available
|
||||||
* [#7564](https://github.com/netbox-community/netbox/issues/7564) - Fix VC position zero at VC creation and VC position zero not being displayed
|
* [#7564](https://github.com/netbox-community/netbox/issues/7564) - Fix VC position zero at VC creation and VC position zero not being displayed
|
||||||
|
* [#7584](https://github.com/netbox-community/netbox/issues/7584) - Fix alignment of object identifier under object view
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ nav:
|
|||||||
- Customization:
|
- Customization:
|
||||||
- Custom Fields: 'customization/custom-fields.md'
|
- Custom Fields: 'customization/custom-fields.md'
|
||||||
- Custom Validation: 'customization/custom-validation.md'
|
- Custom Validation: 'customization/custom-validation.md'
|
||||||
- Custom Links: 'customization/custom-links.md'
|
- Custom Links: 'models/extras/customlink.md'
|
||||||
- Export Templates: 'customization/export-templates.md'
|
- Export Templates: 'customization/export-templates.md'
|
||||||
- Custom Scripts: 'customization/custom-scripts.md'
|
- Custom Scripts: 'customization/custom-scripts.md'
|
||||||
- Reports: 'customization/reports.md'
|
- Reports: 'customization/reports.md'
|
||||||
|
@ -685,6 +685,18 @@ class PowerOutletFeedLegChoices(ChoiceSet):
|
|||||||
# Interfaces
|
# Interfaces
|
||||||
#
|
#
|
||||||
|
|
||||||
|
class InterfaceKindChoices(ChoiceSet):
|
||||||
|
KIND_PHYSICAL = 'physical'
|
||||||
|
KIND_VIRTUAL = 'virtual'
|
||||||
|
KIND_WIRELESS = 'wireless'
|
||||||
|
|
||||||
|
CHOICES = (
|
||||||
|
(KIND_PHYSICAL, 'Physical'),
|
||||||
|
(KIND_VIRTUAL, 'Virtual'),
|
||||||
|
(KIND_WIRELESS, 'Wireless'),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class InterfaceTypeChoices(ChoiceSet):
|
class InterfaceTypeChoices(ChoiceSet):
|
||||||
|
|
||||||
# Virtual
|
# Virtual
|
||||||
|
@ -957,9 +957,14 @@ class InterfaceFilterForm(DeviceComponentFilterForm):
|
|||||||
model = Interface
|
model = Interface
|
||||||
field_groups = [
|
field_groups = [
|
||||||
['q', 'tag'],
|
['q', 'tag'],
|
||||||
['name', 'label', 'type', 'enabled', 'mgmt_only', 'mac_address'],
|
['name', 'label', 'kind', 'type', 'enabled', 'mgmt_only', 'mac_address'],
|
||||||
['region_id', 'site_group_id', 'site_id', 'location_id', 'device_id'],
|
['region_id', 'site_group_id', 'site_id', 'location_id', 'device_id'],
|
||||||
]
|
]
|
||||||
|
kind = forms.MultipleChoiceField(
|
||||||
|
choices=InterfaceKindChoices,
|
||||||
|
required=False,
|
||||||
|
widget=StaticSelectMultiple()
|
||||||
|
)
|
||||||
type = forms.MultipleChoiceField(
|
type = forms.MultipleChoiceField(
|
||||||
choices=InterfaceTypeChoices,
|
choices=InterfaceTypeChoices,
|
||||||
required=False,
|
required=False,
|
||||||
|
@ -260,11 +260,16 @@ class IPRangeTable(BaseTable):
|
|||||||
linkify=True
|
linkify=True
|
||||||
)
|
)
|
||||||
tenant = TenantColumn()
|
tenant = TenantColumn()
|
||||||
|
utilization = UtilizationColumn(
|
||||||
|
accessor='utilization',
|
||||||
|
orderable=False
|
||||||
|
)
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = IPRange
|
model = IPRange
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description',
|
'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description',
|
||||||
|
'utilization',
|
||||||
)
|
)
|
||||||
default_columns = (
|
default_columns = (
|
||||||
'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description',
|
'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description',
|
||||||
|
@ -137,7 +137,7 @@ class HomeView(View):
|
|||||||
release_version, release_url = latest_release
|
release_version, release_url = latest_release
|
||||||
if release_version > version.parse(settings.VERSION):
|
if release_version > version.parse(settings.VERSION):
|
||||||
new_release = {
|
new_release = {
|
||||||
'version': str(latest_release),
|
'version': str(release_version),
|
||||||
'url': release_url,
|
'url': release_url,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,12 +130,12 @@
|
|||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% if object.postchange_data %}
|
{% if object.postchange_data %}
|
||||||
<pre class="change-data">{% for k, v in object.postchange_data.items %}{% spaceless %}
|
<pre class="change-data">{% for k, v in object.postchange_data.items %}{% spaceless %}
|
||||||
<span{% if k in diff_added %} class="added"{% endif %}>{{ k }}: {{ v|render_json }}</span>
|
<span{% if k in diff_added %} class="added"{% endif %}>{{ k }}: {{ v|render_json }}</span>
|
||||||
{% endspaceless %}{% endfor %}
|
{% endspaceless %}{% endfor %}
|
||||||
</pre>
|
</pre>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,9 +6,17 @@
|
|||||||
{% load plugins %}
|
{% load plugins %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{# Breadcrumbs #}
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<nav class="breadcrumb-container px-3" aria-label="breadcrumb">
|
{# Breadcrumbs #}
|
||||||
<div class="float-end">
|
<nav class="breadcrumb-container px-3" aria-label="breadcrumb">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<li class="breadcrumb-item"><a href="{% url object|viewname:'list' %}">{{ object|meta:'verbose_name_plural'|bettertitle }}</a></li>
|
||||||
|
{% endblock breadcrumbs %}
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
{# Object identifier #}
|
||||||
|
<div class="float-end px-3">
|
||||||
<code class="text-muted">
|
<code class="text-muted">
|
||||||
{% block object_identifier %}
|
{% block object_identifier %}
|
||||||
{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}
|
{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}
|
||||||
@ -16,12 +24,7 @@
|
|||||||
{% endblock object_identifier %}
|
{% endblock object_identifier %}
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
<ol class="breadcrumb">
|
</div>
|
||||||
{% block breadcrumbs %}
|
|
||||||
<li class="breadcrumb-item"><a href="{% url object|viewname:'list' %}">{{ object|meta:'verbose_name_plural'|bettertitle }}</a></li>
|
|
||||||
{% endblock breadcrumbs %}
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ def render_json(value):
|
|||||||
"""
|
"""
|
||||||
Render a dictionary as formatted JSON.
|
Render a dictionary as formatted JSON.
|
||||||
"""
|
"""
|
||||||
return json.dumps(value, indent=4, sort_keys=True)
|
return json.dumps(value, ensure_ascii=False, indent=4, sort_keys=True)
|
||||||
|
|
||||||
|
|
||||||
@register.filter()
|
@register.filter()
|
||||||
|
Loading…
Reference in New Issue
Block a user