diff --git a/README.md b/README.md
index 42bf8b619..8429cd4b3 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,6 @@
-:loudspeaker: The **[2022 NetBox community survey](https://forms.gle/KR8YbR8GiJ9EYXM28)** is now open! We collect this feedback and demographic data from NetBox users around the world to help shape the project's long-term development goals. Please take a few minutes to share your responses!
-

NetBox is an infrastructure resource modeling (IRM) tool designed to empower
diff --git a/docs/index.md b/docs/index.md
index 5742c0ab6..943f1d7ab 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,7 +1,5 @@
{style="height: 100px; margin-bottom: 3em"}
-:loudspeaker: The **[2022 NetBox community survey](https://forms.gle/KR8YbR8GiJ9EYXM28)** is now open! We collect this feedback and demographic data from NetBox users around the world to help shape the project's long-term development goals. Please take a few minutes to share your responses!
-
# What is NetBox?
NetBox is an infrastructure resource modeling (IRM) application designed to empower network automation. Initially conceived by the network engineering team at [DigitalOcean](https://www.digitalocean.com/), NetBox was developed specifically to address the needs of network and infrastructure engineers. NetBox is made available as open source under the Apache 2 license. It encompasses the following aspects of network management:
diff --git a/docs/installation/upgrading.md b/docs/installation/upgrading.md
index d7f7156c8..c619cf241 100644
--- a/docs/installation/upgrading.md
+++ b/docs/installation/upgrading.md
@@ -6,7 +6,7 @@ Prior to upgrading your NetBox instance, be sure to carefully review all [releas
## Update Dependencies to Required Versions
-NetBox v3.0 and later requires the following:
+NetBox v3.0 and later require the following:
| Dependency | Minimum Version |
|------------|-----------------|
@@ -67,6 +67,11 @@ sudo git checkout master
sudo git pull origin master
```
+!!! info "Checking out an older release"
+ If you need to upgrade to an older version rather than the current stable release, you can check out any valid [git tag](https://github.com/netbox-community/netbox/tags), each of which represents a release. For example, to checkout the code for NetBox v2.11.11, do:
+
+ sudo git checkout v2.11.11
+
## Run the Upgrade Script
Once the new code is in place, verify that any optional Python packages required by your deployment (e.g. `napalm` or `django-auth-ldap`) are listed in `local_requirements.txt`. Then, run the upgrade script:
diff --git a/docs/models/extras/customlink.md b/docs/models/extras/customlink.md
index 7fd510841..b9b731751 100644
--- a/docs/models/extras/customlink.md
+++ b/docs/models/extras/customlink.md
@@ -2,7 +2,7 @@
Custom links allow users to display arbitrary hyperlinks to external content within NetBox object views. These are helpful for cross-referencing related records in systems outside NetBox. For example, you might create a custom link on the device view which links to the current device in a Network Monitoring System (NMS).
-Custom links are created by navigating to Customization > Custom Links. Each link is associated with a particular NetBox object type (site, device, prefix, etc.) and will be displayed on relevant views. Each link has display text and a URL, and data from the Netbox item being viewed can be included in the link using [Jinja2 template code](https://jinja2docs.readthedocs.io/en/stable/) through the variable `obj`, and custom fields through `obj.cf`.
+Custom links are created by navigating to Customization > Custom Links. Each link is associated with a particular NetBox object type (site, device, prefix, etc.) and will be displayed on relevant views. Each link has display text and a URL, and data from the NetBox item being viewed can be included in the link using [Jinja2 template code](https://jinja2docs.readthedocs.io/en/stable/) through the variable `obj`, and custom fields through `obj.cf`.
For example, you might define a link like this:
@@ -32,6 +32,10 @@ The following context data is available within the template when rendering a cus
| `user` | The current user (if authenticated) |
| `perms` | The [permissions](https://docs.djangoproject.com/en/stable/topics/auth/default/#permissions) assigned to the user |
+While most of the context variables listed above will have consistent attributes, the object will be an instance of the specific object being viewed when the link is rendered. Different models have different fields and properties, so you may need to some research to determine the attributes available for use within your template for a specific object type.
+
+Checking the REST API representation of an object is generally a convenient way to determine what attributes are available. You can also reference the NetBox source code directly for a comprehensive list.
+
## Conditional Rendering
Only links which render with non-empty text are included on the page. You can employ conditional Jinja2 logic to control the conditions under which a link gets rendered.
diff --git a/docs/models/users/token.md b/docs/models/users/token.md
index d0e0f8609..d98b51369 100644
--- a/docs/models/users/token.md
+++ b/docs/models/users/token.md
@@ -3,7 +3,7 @@
A token is a unique identifier mapped to a NetBox user account. Each user may have one or more tokens which he or she can use for authentication when making REST API requests. To create a token, navigate to the API tokens page under your user profile.
!!! note
- The creation and modification of API tokens can be restricted per user by an administrator. If you don't see an option to create an API token, ask an administrator to grant you access.
+ All users can create and manage REST API tokens under the user control panel in the UI. The ability to view, add, change, or delete tokens via the REST API itself is controlled by the relevant model permissions, assigned to users and/or groups in the admin UI. These permissions should be used with great care to avoid accidentally permitting a user to create tokens for other user accounts.
Each token contains a 160-bit key represented as 40 hexadecimal characters. When creating a token, you'll typically leave the key field blank so that a random key will be automatically generated. However, NetBox allows you to specify a key in case you need to restore a previously deleted token to operation.
diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md
index 303a05cae..bab66f2ad 100644
--- a/docs/release-notes/version-3.1.md
+++ b/docs/release-notes/version-3.1.md
@@ -4,9 +4,17 @@
### Enhancements
+* [#8163](https://github.com/netbox-community/netbox/issues/8163) - Show bridge interface members under interface view
* [#8785](https://github.com/netbox-community/netbox/issues/8785) - Permit wildcard values in IP address DNS names
+* [#8790](https://github.com/netbox-community/netbox/issues/8790) - Include site and prefixes columns in VLAN group VLANs table
* [#8830](https://github.com/netbox-community/netbox/issues/8830) - Add Checkpoint ClusterXL protocol for FHRP groups
* [#8974](https://github.com/netbox-community/netbox/issues/8974) - Use monospace font for text areas in config revision form
+* [#9012](https://github.com/netbox-community/netbox/issues/9012) - Linkify circuits count in providers list
+
+### Bug Fixes
+
+* [#8866](https://github.com/netbox-community/netbox/issues/8866) - Prevent exception when searching for a rack position with no rack specified under device edit view
+* [#9009](https://github.com/netbox-community/netbox/issues/9009) - Fix device count for racks in global search results
---
diff --git a/netbox/circuits/tables.py b/netbox/circuits/tables.py
index b4e0c7d2d..76fb96aaf 100644
--- a/netbox/circuits/tables.py
+++ b/netbox/circuits/tables.py
@@ -2,7 +2,9 @@ import django_tables2 as tables
from django_tables2.utils import Accessor
from tenancy.tables import TenantColumn
-from utilities.tables import BaseTable, ButtonsColumn, ChoiceFieldColumn, MarkdownColumn, TagColumn, ToggleColumn
+from utilities.tables import (
+ BaseTable, ButtonsColumn, ChoiceFieldColumn, LinkedCountColumn, MarkdownColumn, TagColumn, ToggleColumn,
+)
from .models import *
@@ -53,8 +55,10 @@ class ProviderTable(BaseTable):
name = tables.Column(
linkify=True
)
- circuit_count = tables.Column(
+ circuit_count = LinkedCountColumn(
accessor=Accessor('count_circuits'),
+ viewname='circuits:circuit_list',
+ url_params={'provider_id': 'pk'},
verbose_name='Circuits'
)
comments = MarkdownColumn()
diff --git a/netbox/dcim/models/device_components.py b/netbox/dcim/models/device_components.py
index e105bd804..b20df82b7 100644
--- a/netbox/dcim/models/device_components.py
+++ b/netbox/dcim/models/device_components.py
@@ -762,6 +762,10 @@ class Interface(ComponentModel, BaseInterface, LinkTermination, PathEndpoint):
def is_lag(self):
return self.type == InterfaceTypeChoices.TYPE_LAG
+ @property
+ def is_bridge(self):
+ return self.type == InterfaceTypeChoices.TYPE_BRIDGE
+
@property
def link(self):
return self.cable or self.wireless_link
diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py
index 6697a44cc..f5e71fd23 100644
--- a/netbox/dcim/views.py
+++ b/netbox/dcim/views.py
@@ -1776,6 +1776,14 @@ class InterfaceView(generic.ObjectView):
orderable=False
)
+ # Get bridge interfaces
+ bridge_interfaces = Interface.objects.restrict(request.user, 'view').filter(bridge=instance)
+ bridge_interfaces_tables = tables.InterfaceTable(
+ bridge_interfaces,
+ exclude=('device', 'parent'),
+ orderable=False
+ )
+
# Get child interfaces
child_interfaces = Interface.objects.restrict(request.user, 'view').filter(parent=instance)
child_interfaces_tables = tables.InterfaceTable(
@@ -1800,6 +1808,7 @@ class InterfaceView(generic.ObjectView):
return {
'ipaddress_table': ipaddress_table,
+ 'bridge_interfaces_table': bridge_interfaces_tables,
'child_interfaces_table': child_interfaces_tables,
'vlan_table': vlan_table,
}
diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py
index aab9a6249..e32cf4d96 100644
--- a/netbox/ipam/views.py
+++ b/netbox/ipam/views.py
@@ -795,7 +795,7 @@ class VLANGroupView(generic.ObjectView):
vlans_count = vlans.count()
vlans = add_available_vlans(vlans, vlan_group=instance)
- vlans_table = tables.VLANTable(vlans, exclude=('site', 'group', 'prefixes'))
+ vlans_table = tables.VLANTable(vlans, exclude=('group',))
if request.user.has_perm('ipam.change_vlan') or request.user.has_perm('ipam.delete_vlan'):
vlans_table.columns.show('pk')
paginate_table(vlans_table, request)
diff --git a/netbox/netbox/constants.py b/netbox/netbox/constants.py
index 45de4d5b2..bc58ee5e4 100644
--- a/netbox/netbox/constants.py
+++ b/netbox/netbox/constants.py
@@ -65,7 +65,9 @@ DCIM_TYPES = OrderedDict(
'url': 'dcim:site_list',
}),
('rack', {
- 'queryset': Rack.objects.prefetch_related('site', 'location', 'tenant', 'role'),
+ 'queryset': Rack.objects.prefetch_related('site', 'location', 'tenant', 'role').annotate(
+ device_count=count_related(Device, 'rack')
+ ),
'filterset': RackFilterSet,
'table': RackTable,
'url': 'dcim:rack_list',
diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js
index 45abd19e6..136135ce7 100644
Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ
diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map
index c7e20fe9a..707313007 100644
Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ
diff --git a/netbox/project-static/src/select/api/apiSelect.ts b/netbox/project-static/src/select/api/apiSelect.ts
index 5cd2c0055..be8a86631 100644
--- a/netbox/project-static/src/select/api/apiSelect.ts
+++ b/netbox/project-static/src/select/api/apiSelect.ts
@@ -557,9 +557,12 @@ export class APISelect {
private async handleSearch(event: Event) {
const { value: q } = event.target as HTMLInputElement;
const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } });
- await this.fetchOptions(url, 'merge');
- this.slim.data.search(q);
- this.slim.render();
+ if (!url.includes(`{{`)) {
+ await this.fetchOptions(url, 'merge');
+ this.slim.data.search(q);
+ this.slim.render();
+ }
+ return;
}
/**
diff --git a/netbox/templates/dcim/interface.html b/netbox/templates/dcim/interface.html
index 5eaa99c3f..bf1445a1c 100644
--- a/netbox/templates/dcim/interface.html
+++ b/netbox/templates/dcim/interface.html
@@ -467,6 +467,13 @@
{% include 'inc/panel_table.html' with table=vlan_table heading="VLANs" %}
+ {% if object.is_bridge %}
+
- A module import error occurred during this request. Common causes include the following: -
-
- Missing required packages - This installation of NetBox might be
- missing one or more required Python packages. These packages are listed in requirements.txt
and
- local_requirements.txt
, and are normally installed as part of the installation or upgrade process.
- To verify installed packages, run pip freeze
from the console and compare the output to the list of
- required packages.
-
- WSGI service not restarted after upgrade - If this installation - has recently been upgraded, check that the WSGI service (e.g. gunicorn or uWSGI) has been restarted. This - ensures that the new code is running. -
++ A module import error occurred during this request. Common causes include the following: +
+
+ Missing required packages - This installation of NetBox might be
+ missing one or more required Python packages. These packages are listed in requirements.txt
and
+ local_requirements.txt
, and are normally installed as part of the installation or upgrade process. To
+ verify installed packages, run pip freeze
from the console and compare the output to the list of
+ required packages.
+
+ WSGI service not restarted after upgrade - If this installation has + recently been upgraded, check that the WSGI service (e.g. gunicorn or uWSGI) has been restarted. This ensures that + the new code is running. +
{% endblock message %} diff --git a/netbox/templates/exceptions/permission_error.html b/netbox/templates/exceptions/permission_error.html index dcff62bf9..6108fde52 100644 --- a/netbox/templates/exceptions/permission_error.html +++ b/netbox/templates/exceptions/permission_error.html @@ -1,12 +1,12 @@ {% extends '500.html' %} {% block message %} -- A file permission error was detected while processing this request. Common causes include the following: -
-
- Insufficient write permission to the media root - The configured
- media root is {{ settings.MEDIA_ROOT }}
. Ensure that the user NetBox runs as has access to write
- files to all locations within this path.
-
+ A file permission error was detected while processing this request. Common causes include the following: +
+
+ Insufficient write permission to the media root - The configured
+ media root is {{ settings.MEDIA_ROOT }}
. Ensure that the user NetBox runs as has access to write files
+ to all locations within this path.
+
- A database programming error was detected while processing this request. Common causes include the following: -
-
- Database migrations missing - When upgrading to a new NetBox release, the upgrade script must
- be run to apply any new database migrations. You can run migrations manually by executing
- python3 manage.py migrate
from the command line.
-
- Unsupported PostgreSQL version - Ensure that PostgreSQL version 9.6 or higher is in use. You
- can check this by connecting to the database using NetBox's credentials and issuing a query for
- SELECT VERSION()
.
-
+ A database programming error was detected while processing this request. Common causes include the following: +
+
+ Database migrations missing - When upgrading to a new NetBox release,
+ the upgrade script must be run to apply any new database migrations. You can run migrations manually by executing
+ python3 manage.py migrate
from the command line.
+
+ Unsupported PostgreSQL version - Ensure that PostgreSQL version 10
+ or later is in use. You can check this by connecting to the database using NetBox's credentials and issuing a query
+ for SELECT VERSION()
.
+