Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v4.1.9 #18258

Merged
merged 10 commits into from
Dec 18, 2024
16 changes: 16 additions & 0 deletions docs/release-notes/version-4.1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# NetBox v4.1

## v4.1.9 (2024-12-17)

### Enhancements

* [#17215](https://github.com/netbox-community/netbox/issues/17215) - Change the highlighted color of disabled interfaces in interface lists
* [#18224](https://github.com/netbox-community/netbox/issues/18224) - Apply all registered request processors when running custom scripts

### Bug Fixes

* [#16757](https://github.com/netbox-community/netbox/issues/16757) - Fix rendering of IP addresses table when assigning an existing IP address to an interface with global HTMX navigation enabled
* [#17868](https://github.com/netbox-community/netbox/issues/17868) - Fix `ZeroDivisionError` exception under specific circumstances when generating a cable trace
* [#18124](https://github.com/netbox-community/netbox/issues/18124) - Enable referencing cable attributes when querying a `cabletermination_set` via the GraphQL API
* [#18230](https://github.com/netbox-community/netbox/issues/18230) - Fix `AttributeError` exception when attempting to edit an IP address assigned to a virtual machine interface

---

## v4.1.8 (2024-12-12)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/graphql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class ModularComponentTemplateType(ComponentTemplateType):
filters=CableTerminationFilter
)
class CableTerminationType(NetBoxObjectType):

cable: Annotated["CableType", strawberry.lazy('dcim.graphql.types')] | None
termination: Annotated[Union[
Annotated["CircuitTerminationType", strawberry.lazy('circuits.graphql.types')],
Annotated["ConsolePortType", strawberry.lazy('dcim.graphql.types')],
Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/svg/cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def render(self):
self.cursor += CABLE_HEIGHT

# Connector (a Cable or WirelessLink)
if links:
if links and far_ends:

obj_list = {end.parent_object for end in far_ends}
parent_object_nodes, far_terminations = self.draw_far_objects(obj_list, far_ends)
Expand Down
8 changes: 5 additions & 3 deletions netbox/extras/jobs.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import logging
import traceback
from contextlib import nullcontext
from contextlib import ExitStack

from django.db import transaction
from django.utils.translation import gettext as _

from core.signals import clear_events
from extras.models import Script as ScriptModel
from netbox.context_managers import event_tracking
from netbox.jobs import JobRunner
from netbox.registry import registry
from utilities.exceptions import AbortScript, AbortTransaction
from .utils import is_report

Expand Down Expand Up @@ -100,5 +100,7 @@ def run(self, data, request=None, commit=True, **kwargs):

# Execute the script. If commit is True, wrap it with the event_tracking context manager to ensure we process
# change logging, event rules, etc.
with event_tracking(request) if commit else nullcontext():
with ExitStack() as stack:
for request_processor in registry['request_processors']:
stack.enter_context(request_processor(request))
self.run_script(script, request, data, commit)
2 changes: 1 addition & 1 deletion netbox/ipam/forms/model_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def __init__(self, *args, **kwargs):
):
self.initial['primary_for_parent'] = True

if parent and (parent.oob_ip_id == self.instance.pk):
if parent and getattr(parent, 'oob_ip_id', None) == self.instance.pk:
self.initial['oob_for_parent'] = True

if type(instance.assigned_object) is Interface:
Expand Down
2 changes: 1 addition & 1 deletion netbox/project-static/dist/netbox.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion netbox/project-static/styles/custom/_interfaces.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tr[data-virtual=true] {
background-color: rgba(map.get($theme-colors, "primary"), 0.15);
}
tr[data-enabled=disabled] {
background-color: rgba(map.get($theme-colors, "danger"), 0.15);
background-color: rgba($gray-400, 0.15);
}

// Only show the correct button depending on the cable status
Expand Down
4 changes: 2 additions & 2 deletions netbox/release.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version: "4.1.8"
version: "4.1.9"
edition: "Community"
published: "2024-12-12"
published: "2024-12-17"
2 changes: 1 addition & 1 deletion netbox/templates/ipam/ipaddress_assign.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2 class="col-9 offset-3">{% trans "Select IP Address" %}</h2>
<div class="col col-md-12">
<h3>{% trans "Search Results" %}</h3>
<div class="table-responsive">
{% render_table table 'inc/table.html' %}
{% render_table table 'inc/table_htmx.html' %}
</div>
</div>
</div>
Expand Down
Loading
Loading