Commit Graph

1629 Commits

Author SHA1 Message Date
Daniel Sheppard
19c17568a4 Fixes: #13722 - Correct range expansion code when a numeric set is used (#15301)
* Fixes: #13722 - Correct range expansion code when a numeric set is used

* Correct to my own suggestion

* Clean up logic

* Simplify range detection

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-03-11 10:50:10 -04:00
Jeremy Stretch
2c60d78fb2 #15094: Fix missing format variable 2024-02-21 14:06:01 -05:00
Abhimanyu Saharan
a02572bb3b fixed json field save issue #14689 2024-02-21 14:00:34 -05:00
Arthur Hanson
16712ad8d9 15094 Add missing gettext to error strings for internationalization (#15155)
* 15049 add missing gettext to error strings

* 15049 add missing gettext to error strings

* 15094 review change

* 15094 review change

* Formatting cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-20 09:44:02 -05:00
Jeremy Stretch
3d54836528 Fixes #15084: Fix "add export template" link 2024-02-08 08:47:16 -05:00
Daniel Sheppard
f419ebbb6d Fixes: #14840 - Forces API to use django user model instead of proxy model (#14881)
* Fixes: #14840 - Forces API to use proxy model

* Update tests to use proxy model

* Revert "Update tests to use proxy model"

This reverts commit 1d784cfe5d.

* Revert "Fixes: #14840 - Forces API to use proxy model"

This reverts commit df85cc967c.

* More realistic change to resole issue with netboxusers-list

* Revert "More realistic change to resole issue with netboxusers-list"

This reverts commit 15df8082aa.

* Fixes: #14840 - Better fix for netboxusers-list

* Swap model for serializer from proxy model
2024-02-05 11:57:30 -05:00
Jeremy Stretch
9f3710f985 Fixes #15025: can_add() template filter should accept a model (not an instance) 2024-02-02 11:59:44 -05:00
Jeremy Stretch
756665119b Fixes #14838: JSONField should treat initial form data as JSON 2024-01-24 17:18:17 -05:00
Jeremy Stretch
284e68ed9d Merge branch 'develop' into feature 2023-12-27 16:34:38 -05:00
Jeremy Stretch
c6ad84c791 Fixes #13909: Ignore empty choices when populating dynamic choice fields from initial data 2023-12-27 14:32:40 -05:00
Jeremy Stretch
11afcb6af8 Fixes #13606: Fix filtering by null for multiselect custom fields 2023-12-27 12:49:31 -05:00
Jeremy Stretch
c49e4c3797 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
Arthur Hanson
d6a9f302ac 14147 Prevent logging to Change Log when no changes are made (#14477)
* 14147 Prevent logging to Change Log when no changes are made

* 14147 add test

* 14147 add exclude_fields to serialize_object

* 14147 make skip empty default to True

* 14147 remove override of to_objectchange

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-15 15:17:45 -05:00
Arthur Hanson
627cb7f812 Fixes #14081: Fix cached counters on delete for parent-child items (#14131)
* 14081 fixed cached counters on delete for parent-child items

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-12 16:53:04 -05:00
Arthur Hanson
e972308c8c 14467 change ChoiceField separator from comma to colon (#14469)
* 14467 change ChoiceField separator from comma to colon

* 14467 fix test

* 14467 fix test

* 14467 use regex for colon detection

* 14467 update tests
2023-12-12 14:31:39 -05:00
Abhimanyu Saharan
cbf020cdf9 Fixes IPv6 detection from headers (#14456)
* fixes client ip detection for v6

* adds test for get_client_ip

* Employ urlparse() to strip port numbers from IPs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-07 09:45:30 -05:00
Abhimanyu Saharan
fc2e4c70d5 adds optional classes parameter #14390 2023-12-05 13:51:28 -05:00
Jeremy Stretch
b61bfe202d Upgrade Markdown to v3.5.1 2023-12-04 13:39:04 -05:00
Jeremy Stretch
2eb0523fe6 #13794: Fix alphabetical ordering of related models 2023-12-01 11:23:38 -05:00
Arthur Hanson
8cfb44fd4b 14132 Add EventRule - change webhook and add in script processing to events (#14267)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-30 16:36:33 -05:00
Jeremy Stretch
bbccc1c743 Merge branch 'develop' into feature 2023-11-29 20:25:44 -05:00
Abhimanyu Saharan
b7422814d8 Adds region hierarchy in templates (#14213)
* initial work to render hierarchical region #13735

* adds site display #13735

* cleanup #13735

* adds display region tag #13735

* refactored region hierarchy #13735

* refactored region hierarchy #13735

* renamed display_region to nested_tree #13735

* Make render_tree suitable for generic use

* Remove errant item from __all__

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-29 16:20:59 -05:00
Jeremy Stretch
c7f79a44ad Fixes #14325: Ensure expanded numeric arrays are ordered (#14370)
* Fixes #14325: Ensure expanded numeric arrays are ordered

* Remove redundant casting to
2023-11-28 17:04:10 -05:00
Jeremy Stretch
859bd6dc53 Closes #14173: Enable plugins to register columns on core tables (#14265)
* Closes #14173: Enable plugins to register columns on core tables

* Support translation for column name

* Document new registry store
2023-11-16 12:16:35 -05:00
Jeremy Stretch
3651673e6a Closes #13794: Dynamically populate related objects list under tenant view (#14196)
* Closes #13794: Dynamically populate related objects list under tenant view

* get_related_models() should sort models alphabetically by default

* Reference Meta.related_objects instead of calling get_fields()
2023-11-16 12:02:32 -05:00
Jeremy Stretch
533ac7fe71 Merge branch 'develop' into feature 2023-11-09 16:06:26 -05:00
Abhimanyu Saharan
76edf80a35 handles the port in the ip #14085 2023-11-09 14:43:36 -05:00
Jeremy Stretch
1cdc511861 Closes #12135: Prevent the deletion of interfaces with children (#14091)
* Closes #12135: Prevent the deletion of interfaces with children

* Change PROTECT to RESTRICT

* Extend handle_protectederror() to also handle RestrictedError

* Fix string translation

* Update migrations

* Support bulk removal of parent interfaces via UI if all children are included

* Add support for the bulk deletion of restricted objects via REST API
2023-11-01 13:47:14 -04:00
Jeremy Stretch
64044df651 Closes #14036: Move extras.plugins to netbox.plugins (#14086)
* Move extras.plugins to netbox.plugins & add deprecation warnings

* Move plugin template tags from extras to utilities

* Move plugins tests from extras to netbox

* Add TODO reminders for v4.0
2023-10-20 11:24:08 -04:00
Jeremy Stretch
c191be971f Closes #13962: Add a copy-to-clipboard button to the key field of the API token creation form 2023-10-17 11:34:37 -04:00
Arthur Hanson
1f498dc8d4 14042 mptt cache count (#14048)
* 14042 fix cache count for mptt child delete

* 14042 add test

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-17 10:31:58 -04:00
sleepinggenius2
cfa03df84f Adds selection custom field labels to UI 2023-10-05 15:02:22 -04:00
Jeremy Stretch
ada83398ab Fixes #11617: Check for invalid CSV headers during bulk import (#13826)
* Fixes #11617: Check for invalid CSV headers during bulk import

* Add test for CSV import header validation
2023-09-20 14:40:27 -04:00
Arthur Hanson
6472b167c1 13813 fix virtual chassis member count (#13823)
* 13813 fix virtual chassis member count

* 13813 add test
2023-09-20 13:57:35 -04:00
Arthur Hanson
61d7fb0a12 13745 device type migration (#13747)
* 13745 update migrations to use batch_size

* 13745 update migrations to use subquery update

* 13745 refactor and update other counter migrations
2023-09-18 09:59:26 -04:00
Per von Zweigbergk
472455c4ce 13791 rename whitespace fix (#13793)
* Add test for bug #13791
https://github.com/netbox-community/netbox/issues/13791

* Fix #13791 by disabling striping on find and replace fields of BulkRenameForm
2023-09-18 08:33:29 -04:00
Daniel Sheppard
bd89aef7f0 Fixes #11209 - Fix PrefixIPAddress view with saved sort preferences (#12820)
* Fixes #11209 - Do not add available ips when IPAddressTable sort preferences are saved

* Refine check to account scenario right after clearing ordering string

* Introduce get_table_ordering() utility to determine intended ordering given a request

* Apply fix to VLAN ranges as well

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-13 10:51:24 -04:00
Abhimanyu Saharan
702c679c71 Adds csv dialect detection to bulk import view (#13563)
* adds csv dialect detection to bulk import view #13239

* adds sane delimiters for dialect detection #13239

* adds csv delimiter tests #13239

* adds csv delimiter on the form

* pass delimiter to clean_csv method #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* Improve auto-detection of import data format

* Misc cleanup

* Include tab as a supported delimiting character for auto-detection

* Move delimiting chars to a separate constant for easy reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-12 16:48:40 -04:00
Jeremy Stretch
3384aebce7 Closes #13638: Add optional staff_only attribute to MenuItem (#13639)
* Closes #13638: Add optional staff_only attribute to MenuItem

* Add missing file

* Add release note
2023-08-31 11:23:44 -04:00
Arthur Hanson
bccf89a9d7 13599 fix cached counter for edit object (#13600)
* 13599 fix cache counter

* 13599 update test

* Merge conditionals

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-29 15:31:13 -04:00
Jeremy Stretch
5a5f05508d Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
Jeremy Stretch
d23deb6500 Closes #13585: Introduce 'empty' lookup for numeric value filters 2023-08-28 15:25:37 -04:00
Abhimanyu Saharan
5e519e6dc7 adds additional safe HTTP headers to request #13542 2023-08-24 14:12:08 -04:00
Abhimanyu Saharan
169942959f fixes global search when the content type is not found #13507 2023-08-24 14:09:48 -04:00
Arthur
b022952d18 13503 fix rack space utilization graph for internationalization 2023-08-21 14:21:50 -04:00
Jeremy Stretch
ebe6ebf7f3 Merge branch 'develop' into feature 2023-08-15 11:04:03 -04:00
kkthxbye
23d085f488 Fixes #12639 - Make sure name expansions throws a validation error on decrementing ranges (#13326)
* Fixes #12639 - Make sure name expansions throws a validation error on decrementing ranges

* Fix pep8

* Also fail on equal start & end values

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-11 11:53:16 -04:00
Jeremy Stretch
eaa3212a56 Fixes #13410: Fix rendering of custom choice fields with large numner of choices 2023-08-08 09:32:56 -04:00
Jeremy Stretch
5f5c00e961 Remove redundant overrides of EXEMPT_VIEW_PERMISSIONS 2023-08-03 11:07:30 -04:00
Abhimanyu Saharan
2072edb19c Replaces device_role with role on device model (#13342)
* replaces device_role with role on device model #6391

* fixes lint issue #6391

* revert the database user

* revert test_runner comment

* changes as per review

* Update references to device_role column in UserConfigs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-02 09:55:52 -04:00