Skip to content

Commit e93e9ac

Browse files
Merge pull request #17297 from netbox-community/develop
Release v4.0.10
2 parents 09d6b9c + 97cd6b8 commit e93e9ac

File tree

85 files changed

+7181
-7257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+7181
-7257
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ body:
2626
attributes:
2727
label: NetBox Version
2828
description: What version of NetBox are you currently running?
29-
placeholder: v4.0.9
29+
placeholder: v4.0.10
3030
validations:
3131
required: true
3232
- type: dropdown

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v4.0.9
17+
placeholder: v4.0.10
1818
validations:
1919
required: true
2020
- type: dropdown

.github/workflows/auto-assign-issue.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/configuration/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Default: False
66

77
This setting enables debugging. Debugging should be enabled only during development or troubleshooting. Note that only
8-
clients which access NetBox from a recognized [internal IP address](#internal_ips) will see debugging tools in the user
8+
clients which access NetBox from a recognized [internal IP address](./system.md#internal_ips) will see debugging tools in the user
99
interface.
1010

1111
!!! warning

docs/configuration/system.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Default: `('127.0.0.1', '::1')`
8383

8484
A list of IP addresses recognized as internal to the system, used to control the display of debugging output. For
8585
example, the debugging toolbar will be viewable only when a client is accessing NetBox from one of the listed IP
86-
addresses (and [`DEBUG`](#debug) is true).
86+
addresses (and [`DEBUG`](./development.md#debug) is true).
8787

8888
---
8989

@@ -106,7 +106,7 @@ JINJA2_FILTERS = {
106106

107107
## LOGGING
108108

109-
By default, all messages of INFO severity or higher will be logged to the console. Additionally, if [`DEBUG`](#debug) is False and email access has been configured, ERROR and CRITICAL messages will be emailed to the users defined in [`ADMINS`](#admins).
109+
By default, all messages of INFO severity or higher will be logged to the console. Additionally, if [`DEBUG`](./development.md#debug) is False and email access has been configured, ERROR and CRITICAL messages will be emailed to the users defined in [`ADMINS`](./miscellaneous.md#admins).
110110

111111
The Django framework on which NetBox runs allows for the customization of logging format and destination. Please consult the [Django logging documentation](https://docs.djangoproject.com/en/stable/topics/logging/) for more information on configuring this setting. Below is an example which will write all INFO and higher messages to a local file:
112112

docs/development/release-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Sometimes it becomes necessary to constrain dependencies to a particular version
1919
djangorestframework==3.8.1
2020
```
2121

22-
These version constraints are added to `base_requirements.txt` to ensure that newer packages are not installed when updating the pinned dependencies in `requirements.txt` (see the [Update Requirements](#update-requirements) section below). Before each new minor version of NetBox is released, all such constraints on dependent packages should be addressed if feasible. This guards against the collection of stale constraints over time.
22+
These version constraints are added to `base_requirements.txt` to ensure that newer packages are not installed when updating the pinned dependencies in `requirements.txt` (see the [Update Requirements](#update-python-dependencies) section below). Before each new minor version of NetBox is released, all such constraints on dependent packages should be addressed if feasible. This guards against the collection of stale constraints over time.
2323

2424
### Close the Release Milestone
2525

docs/development/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Line breaks are permitted following binary operators.
4141

4242
### Enforcing Code Style
4343

44-
The [`pycodestyle`](https://pypi.org/project/pycodestyle/) utility (formerly `pep8`) is used by the CI process to enforce code style. A [pre-commit hook](./getting-started.md#2-enable-pre-commit-hooks) which runs this automatically is included with NetBox. To invoke `pycodestyle` manually, run:
44+
The [`pycodestyle`](https://pypi.org/project/pycodestyle/) utility (formerly `pep8`) is used by the CI process to enforce code style. A [pre-commit hook](./getting-started.md#3-enable-pre-commit-hooks) which runs this automatically is included with NetBox. To invoke `pycodestyle` manually, run:
4545

4646
```
4747
pycodestyle --ignore=W504,E501 netbox/

docs/release-notes/version-4.0.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# NetBox v4.0
22

3+
## v4.0.10 (2024-08-29)
4+
5+
### Enhancements
6+
7+
* [#16857](https://github.com/netbox-community/netbox/issues/16857) - Scroll long rendered Markdown content within tables
8+
* [#16905](https://github.com/netbox-community/netbox/issues/16905) - Enable filtering of device components by device status
9+
* [#16949](https://github.com/netbox-community/netbox/issues/16949) - Add device count column to sites table
10+
* [#17072](https://github.com/netbox-community/netbox/issues/17072) - Linkify email addresses & phone numbers in contact assignments list
11+
* [#17177](https://github.com/netbox-community/netbox/issues/17177) - Add facility field to locations filter form
12+
13+
### Bug Fixes
14+
15+
* [#16292](https://github.com/netbox-community/netbox/issues/16292) - Ensure consistent evaluation of queryset for both individual and list GraphQL API queries
16+
* [#16385](https://github.com/netbox-community/netbox/issues/16385) - Restore support for white, gray, and black background colors
17+
* [#16640](https://github.com/netbox-community/netbox/issues/16640) - Fix potential corruption of JSON values in custom fields that are not UI-editable
18+
* [#16670](https://github.com/netbox-community/netbox/issues/16670) - Fix conflicts within OpenAPI schema definition regarding nested serializers
19+
* [#16733](https://github.com/netbox-community/netbox/issues/16733) - Fix bulk edit/delete of objects when using "select all" widget
20+
* [#16756](https://github.com/netbox-community/netbox/issues/16756) - Fix dynamic pagination of custom script results table
21+
* [#16825](https://github.com/netbox-community/netbox/issues/16825) - Avoid `NoReverseMatch` exception when displaying count of related object type with no list view
22+
* [#16946](https://github.com/netbox-community/netbox/issues/16946) - GraphQL API requests with an invalid filter should return an empty set
23+
* [#16959](https://github.com/netbox-community/netbox/issues/16959) - Fix function of "reset" button on objects filter form
24+
* [#16973](https://github.com/netbox-community/netbox/issues/16973) - Fix support for evaluating user token (`$user`) against custom field values in permission constraints
25+
* [#17007](https://github.com/netbox-community/netbox/issues/17007) - Center SSO authentication icon when backend is unnamed
26+
* [#17070](https://github.com/netbox-community/netbox/issues/17070) - Image height & width values should not be required when creating an image attachment via the REST API
27+
* [#17108](https://github.com/netbox-community/netbox/issues/17108) - Ensure template date & time filters always return localtime-aware values
28+
* [#17117](https://github.com/netbox-community/netbox/issues/17117) - Work around Safari rendering bug
29+
* [#17186](https://github.com/netbox-community/netbox/issues/17186) - Fix display of custom links with default style under dark mode
30+
* [#17219](https://github.com/netbox-community/netbox/issues/17219) - Fix system config view exception when custom validator classes are employed
31+
* [#17230](https://github.com/netbox-community/netbox/issues/17230) - Ensure consistent rendering for all dashboard widget colors
32+
* [#17256](https://github.com/netbox-community/netbox/issues/17256) - Fix VLAN group scope selection for non-English languages
33+
* [#17278](https://github.com/netbox-community/netbox/issues/17278) - Ensure hierarchy is recalculated when bulk editing recursively nested object types (e.g. tenant groups)
34+
* [#17279](https://github.com/netbox-community/netbox/issues/17279) - Do not regenerate key when updating a token via REST API
35+
* [#17286](https://github.com/netbox-community/netbox/issues/17286) - Fix exception when adding member device to virtual chassis via web UI
36+
37+
---
38+
339
## v4.0.9 (2024-08-14)
440

541
### Enhancements

netbox/circuits/graphql/schema.py

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,25 @@
33
import strawberry
44
import strawberry_django
55

6-
from circuits import models
76
from .types import *
87

98

10-
@strawberry.type
9+
@strawberry.type(name="Query")
1110
class CircuitsQuery:
12-
@strawberry.field
13-
def circuit(self, id: int) -> CircuitType:
14-
return models.Circuit.objects.get(pk=id)
11+
circuit: CircuitType = strawberry_django.field()
1512
circuit_list: List[CircuitType] = strawberry_django.field()
1613

17-
@strawberry.field
18-
def circuit_termination(self, id: int) -> CircuitTerminationType:
19-
return models.CircuitTermination.objects.get(pk=id)
14+
circuit_termination: CircuitTerminationType = strawberry_django.field()
2015
circuit_termination_list: List[CircuitTerminationType] = strawberry_django.field()
2116

22-
@strawberry.field
23-
def circuit_type(self, id: int) -> CircuitTypeType:
24-
return models.CircuitType.objects.get(pk=id)
17+
circuit_type: CircuitTypeType = strawberry_django.field()
2518
circuit_type_list: List[CircuitTypeType] = strawberry_django.field()
2619

27-
@strawberry.field
28-
def provider(self, id: int) -> ProviderType:
29-
return models.Provider.objects.get(pk=id)
20+
provider: ProviderType = strawberry_django.field()
3021
provider_list: List[ProviderType] = strawberry_django.field()
3122

32-
@strawberry.field
33-
def provider_account(self, id: int) -> ProviderAccountType:
34-
return models.ProviderAccount.objects.get(pk=id)
23+
provider_account: ProviderAccountType = strawberry_django.field()
3524
provider_account_list: List[ProviderAccountType] = strawberry_django.field()
3625

37-
@strawberry.field
38-
def provider_network(self, id: int) -> ProviderNetworkType:
39-
return models.ProviderNetwork.objects.get(pk=id)
26+
provider_network: ProviderNetworkType = strawberry_django.field()
4027
provider_network_list: List[ProviderNetworkType] = strawberry_django.field()

netbox/core/api/schema.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,18 @@ def get_response_serializers(self) -> typing.Any:
126126

127127
return response_serializers
128128

129+
def _get_serializer_name(self, serializer, direction, bypass_extensions=False) -> str:
130+
name = super()._get_serializer_name(serializer, direction, bypass_extensions)
131+
132+
# If this serializer is nested, prepend its name with "Brief"
133+
if getattr(serializer, 'nested', False):
134+
name = f'Brief{name}'
135+
136+
return name
137+
129138
def get_serializer_ref_name(self, serializer):
130139
# from drf-yasg.utils
131-
"""Get serializer's ref_name (or None for ModelSerializer if it is named 'NestedSerializer')
140+
"""Get serializer's ref_name
132141
:param serializer: Serializer instance
133142
:return: Serializer's ``ref_name`` or ``None`` for inline serializer
134143
:rtype: str or None
@@ -137,8 +146,6 @@ def get_serializer_ref_name(self, serializer):
137146
serializer_name = type(serializer).__name__
138147
if hasattr(serializer_meta, 'ref_name'):
139148
ref_name = serializer_meta.ref_name
140-
elif serializer_name == 'NestedSerializer' and isinstance(serializer, serializers.ModelSerializer):
141-
ref_name = None
142149
else:
143150
ref_name = serializer_name
144151
if ref_name.endswith('Serializer'):

0 commit comments

Comments
 (0)