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.0.0 #15975

Merged
merged 371 commits into from
May 6, 2024
Merged

Release v4.0.0 #15975

merged 371 commits into from
May 6, 2024

Conversation

jeremystretch
Copy link
Member

Breaking Changes

  • Support for Python 3.8 and 3.9 has been removed.
  • The format for GraphQL query filters has changed. Please see the GraphQL documentation for details and examples.
  • The deprecated device_role & device_role_id filters for devices have been removed. (Use role and role_id instead.)
  • The obsolete device_role field has been removed from the REST API serializer for devices. (Use role instead.)
  • The legacy reports functionality has been dropped. Reports will be automatically converted to custom scripts on upgrade.
  • The parent and parent_id filters for locations now return only immediate children of the specified location. (Use ancestor and ancestor_id to return all descendants.)
  • The object_type field on the CustomField model has been renamed to related_object_type.
  • The utilities.utils module has been removed and its resources reorganized into separate modules organized by function.
  • The obsolete NullableCharField class has been removed. (Use Django's stock CharField class with null=True instead.)
  • The annotated_date template filter and annotated_now template tag have been removed.

New Features

Complete UI Refresh (#12128)

The NetBox user interface has been completely refreshed and updated. This massive effort entailed:

  • Refactoring the base HTML templates
  • Moving from Boostrap 5.0 to Bootstrap 5.3
  • Adopting the Tabler UI theme
  • Replacing slim-select with Tom-Select
  • Displaying additional object attributes in dropdown form fields
  • Enabling opt-in HTMX-powered navigation (see #14736)
  • Widespread cleanup & standardization of UI components

Dynamic REST API Fields (#15087)

The REST API now supports specifying which fields to include in the response data. For example, the response to a request for

GET /api/dcim/sites/?fields=name,status,region,tenant

will include only the four specified fields in the representation of each site. Additionally, the underlying database queries effected by such requests have been optimized to omit fields which are not included in the response, resulting in a substantial performance improvement.

Strawberry GraphQL Engine (#9856)

The GraphQL engine has been changed from using Graphene-Django to Strawberry-Django. Changes include:

  • Queryset Optimizer - reduces the number of database queries when querying related tables
  • Updated GraphiQL Browser
  • The format for GraphQL query filters and lookups has changed. Please see the GraphQL documentation for details and examples.

Advanced Form Rendering Functionality (#14739)

New resources have been introduced to enable advanced form rendering without a need for custom HTML templates. These include:

  • FieldSet - Represents a grouping of form fields (replaces the use of lists/tuples)
  • InlineFields - Multiple fields rendered on a single row
  • TabbedGroups - Fieldsets rendered under navigable tabs within a form
  • ObjectAttribute - Renders a read-only representation of a particular object attribute (for reference)

Legacy Admin UI Disabled (#12325)

The legacy admin user interface is now disabled by default, and the few remaining views it provided have been relocated to the primary UI. NetBox deployments which still depend on the legacy admin functionality for plugins can enable it by setting the DJANGO_ADMIN_ENABLED configuration parameter to true.

Enhancements

  • #12776 - Introduce the htmx_table template tag to simplify the rendering of embedded tables
  • #12851 - Replace the deprecated Bleach HTML sanitization library with nh3
  • #13283 - Display additional context on API-backed dropdown form fields (e.g. object descriptions)
  • #13918 - Add facility field to Location model
  • #14237 - Automatically clear dependent selection form fields when modifying a parent selection
  • #14279 - Make the current request available as context when running custom validators
  • #14454 - Include member devices in the REST API representation of virtual chassis
  • #14637 - Upgrade to Django 5.0
  • #14672 - Add support for Python 3.12
  • #14728 - The plugins list view has been moved from the legacy admin UI to the main NetBox UI
  • #14729 - All background task views have been moved from the legacy admin UI to the main NetBox UI
  • #14736 - Introduce a user preference to enable HTMX-powered navigation
  • #14438 - Track individual custom scripts as database objects
  • #15131 - Automatically annotate related object counts on REST API querysets
  • #15237 - Ensure consistent filtering ability for all model fields by testing for missing/incorrect filters
  • #15238 - Include the description field in "brief" REST API serializations
  • #15278 - BaseModelSerializer now takes a nested keyword argument allowing it to represent a related object
  • #15383 - Standardize filtering logic for the parents of recursively-nested models (parent & ancestor filters)
  • #15413 - The global search engine now supports caching of non-field object attributes
  • #15490 - Custom validators can now reference related object attributes via dotted paths
  • #15547 - Add comments field to CustomField model
  • #15712 - Enable image attachments for virtual machines
  • #15735 - Display all dates & times in ISO 8601 format consistently
  • #15754 - Remove is_staff restriction on admin menu items
  • #15764 - Increase maximum value of Device vc_position field
  • #15915 - Provide a comprehensive system status view with export functionality

Bug Fixes (from Beta2)

  • #15630 - Ensure consistent toggling between light & dark UI modes
  • #15802 - Improve hyperlink color contrast in dark mode
  • #15809 - Fix GraphQL union support for nullable fields
  • #15815 - Convert dashboard widgets referencing old user/group models
  • #15826 - Update EXEMPT_EXCLUDE_MODELS to reference new user & group models
  • #15831 - Fix LDAP group mirroring
  • #15838 - Fix AttributeError exception when rendering custom date fields
  • #15852 - Update total results count when filtering object lists
  • #15853 - Correct background color for cable trace SVG images in dark mode
  • #15855 - Fix AttributeError exception when creating an event rule tied to a custom script
  • #15944 - Fix styling of paginator when displayed above an object list

Other Changes

  • #10587 - Enable pagination and filtering for custom script logs
  • #12325 - The Django admin UI is now disabled by default (set DJANGO_ADMIN_ENABLED to True to enable it)
  • #12510 - Dropped support for legacy reports
  • #12795 - NetBox now uses custom User and Group models rather than the stock models provided by Django
  • #13647 - Squash all database migrations prior to v3.7
  • #14092 - Remove backward compatibility for importing plugin resources from extras.plugins (now netbox.plugins)
  • #14638 - Drop support for Python 3.8 and 3.9
  • #14657 - Remove backward compatibility for old permissions mapping under ActionsMixin
  • #14658 - Remove backward compatibility for importing process_webhook() from extras.webhooks_worker (now extras.webhooks.send_webhook())
  • #14740 - Remove the obsolete BootstrapMixin form mixin class
  • #15042 - The logic for registering models & model features now executes under the ready() method of individual app configs, rather than relying on the class_prepared signal
  • #15099 - Remove obsolete device_role and device_role_id filters for devices
  • #15100 - Remove obsolete NullableCharField class
  • #15154 - The installation documentation been extended to include instructions and an example configuration file for uWSGI as an alternative to gunicorn
  • #15193 - Switch to compiled distribution of the psycopg library
  • #15277 - Replace references to ContentType without ObjectType proxy model & standardize field names
  • #15292 - Remove obsolete device_role attribute from Device model (this field was renamed to role in v3.6)
  • #15357 - The object_type field on the CustomField model has been renamed to related_object_type to avoid confusion with its object_types field
  • #15401 - PostgreSQL indexes and sequence tables for the relocated L2VPN models (see #14311) have been renamed
  • #15462 - Relocate resources from the utilities.utils module
  • #15464 - The many-to-many relationships for ObjectPermission are now defined on the custom User and Group models
  • #15736 - Remove obsolete annotated_date template filter & annotated_now template tag
  • #15738 - Remove obsolete configuration parameters for date & time formatting
  • #15752 - Remove the obsolete ENABLE_LOCALIZATION configuration parameter
  • #15942 - Refactor settings_and_registry() context processor

jeremystretch and others added 28 commits May 2, 2024 15:31
* 15831 monkeypatch LDAP _mirror_group function for NB4

* 15831 monkeypatch LDAP _mirror_group function for NB4

* 15831 monkeypatch LDAP _mirror_group function for NB4

* Move the modified _mirror_groups() method to a separate module to retain license

* 15831 fix import

* 15831 fix import

---------

Co-authored-by: Jeremy Stretch <[email protected]>
* 15802 change table anchor color

* 15802 make link color lighter

* 15802 lighten table color

* 15802 add comment

---------

Co-authored-by: Jeremy Stretch <[email protected]>
…ated to slim select (#15918)

* slim-select-pagination-bug-fix : fixed several bugs related to slim
select search box gui element
1. If user enters a search text in the filter text box, the user will
   not be able to scroll to the next page. That is the user will only be
   able to see the first page of returned item with a none empty search
   string.
2. User will not be able to select an item returned from search query
   if user clicks reload after a dynami search. When the user is able
   to load a second page, the user will be able to select an item from
   the third+ page if previous bug is fixed.

* Recompile static assets

---------

Co-authored-by: Jeremy Stretch <[email protected]>
#15950)

* Replace plugins list with an overall system status view

* Enable export of system status data
* Preliminary fix for #15948

* Tweaking of line height
100% translated source file: 'django.po'
on 'ja'.
* 15934 update documentation screenshots

* 15934 update documentation screenshots

* 15934 update documentation screenshots

* Update cable trace screenshot

---------

Co-authored-by: Jeremy Stretch <[email protected]>
* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
@jeremystretch jeremystretch merged commit 91f156d into master May 6, 2024
6 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants