1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

3373 Commits

Author SHA1 Message Date
Jeremy Stretch
ac91d4e5e5 Merge branch 'develop' into feature 2023-11-09 16:06:26 -05:00
Abhimanyu Saharan
5c27d29b08 Adds unit to the power port draw (#14208)
* adds unit to the power port draw #13587

* review changes #13587

* moved units to header #13587

* Abbreviate unit for consistency with e.g. PowerFeedTable available_power column

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 15:09:16 -05:00
Artem Kotik
6b89da2233 Closes #13936: Add primary_ip4 and primary_ip6 filters to VirtualMachine and VirtualDeviceContext filtersets (#14203)
* Add primary_ip4 and primary_ip6 filters for VirtualMachine and VirtualDeviceContext filtersets (#13936)

* Add PrimaryIPFilterSet to __all__

---------

Co-authored-by: Artem I. Kotik <artem.i.kotik@ringcentral.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 09:56:43 -05:00
Prince Kumar
092f2b06ab Enhance Virtual Machine and Device Platform Filter with Manufacturer Information (#14047)
* Add manufacturer for filters in the virtual machine and device #12741

* reverse the filtersets of device and vm

* revert the filtersets of vm

* add advance selector in platform

* remove manufacture from imports
2023-11-09 09:55:44 -05:00
Jeremy Stretch
6900097e2d Fixes #14117: Validate the number of front ports to be created 2023-11-09 09:50:54 -05:00
Abhimanyu Saharan
0603dd1be4 Adds inventory item children view (#14217)
* adds inventory item children view #14112

* Use existing child_items relation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 08:47:24 -05:00
Abhimanyu Saharan
d2c727c0a2 review changes #13743 2023-11-09 08:36:39 -05:00
Abhimanyu Saharan
ac4b46b502 adds site column to power feeds #13743 2023-11-09 08:36:39 -05:00
Abhimanyu Saharan
6e8ee9db89 review changes #14113 2023-11-09 08:34:41 -05:00
Abhimanyu Saharan
94858ac13f adds parent to inventory item table #14113 2023-11-09 08:34:41 -05:00
Abhimanyu Saharan
60e98324c3 adds inventory items to interface #13723 2023-11-08 12:57:22 -05:00
Jeremy Stretch
8dcbd66de6 Closes #13427: Public model registration (#14152)
* Initial work on #13427

* Clarify documentation

* Reference public models registry when populating models for ConfigTemplate context
2023-11-03 10:32:59 -04:00
Arthur Hanson
b3fb393490 14033 raise validation error if A and B term go to same object (#14050)
* 14033 raise validation error if A and B term go to same object

* 14033 move check to cable model clean

* 14033 fix tests
2023-11-01 16:30:10 -04:00
Jeremy Stretch
944008d475 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
c4e765c4a8 Closes #14141: translation cleanup (#14143)
* Translations cleanup

* Tweak variable names; misc string cleanup

* Misc cleanup
2023-10-30 13:38:03 -04:00
Arthur Hanson
7274e75b26 13230 Allow Devices to be excluded from Rack utilization (#14099)
* 13230 add exclusion flag to device type

* 13230 forms, detail views

* 13230 add tests

* 13230 extraneous model field

* 13230 extraneous form field

* Update netbox/dcim/forms/bulk_edit.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 13230 review feedback

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-24 11:29:24 -04:00
Arthur Hanson
ae447bd187 12216 Add color to circuit-type and add to SVG rendering (#14098)
* 12216 add color to model

* 12216 add forms, serializers for color

* 12216 color to detail view, add type to svg

* 12216 add color to svg

* 12216 review changes
2023-10-24 08:19:04 -04:00
Jeremy Stretch
450790ab4a Closes #13550: Refactor view action mappings (#14062)
* Merge actions and action_perms into a single mapping

* Update obsolete permission maps

* Update obsolete action lists

* Normalize empty permission mappings

* Cleanup

* Add deprecation warnings

* Introduce DEFAULT_ACTION_PERMISSIONS constant
2023-10-20 15:08:09 -04:00
Arthur Hanson
d77d45e795 12336 make region API calls atomic (#13942)
* 12336 make region API calls atomic

* 12336 switch to pg locks

* 12336 add locks to all views using mptt models

* 12336 fix ADVISORY_LOCK_KEYS reference

* 12336 review changes

* Tweak advisory lock numbering

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-17 10:35:01 -04:00
Arthur Hanson
18a813aa39 13972 allow filtering of cables if have terminations (#13949)
* 10769 allow filtering of cables if have terminations

* 10769 change to termianted

* 10769 add test case

* 10769 review cleanup
2023-10-17 09:32:42 -04:00
Daniel Sheppard
06ed7ac8a5 Fixes: #14023 - Fixes bulk disconnecting with multiple components attached to the same cable (#14029)
* Fixes: #14023 - Fixes bulk disconnecting with multiple components attached to the same cable

* Update netbox/dcim/views.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/views.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/views.py

Co-authored-by: Daniel Sheppard <dans@dansheps.com>

* Code cleanup & i18n fix

* Restore original termination count logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-13 13:57:58 -04:00
Arthur
01c894e625 14013 fix device role filter 2023-10-13 08:51:22 -04:00
Jeremy Stretch
4286c1cde2 Closes #12831: Include circuit description in cable trace SVG image 2023-10-06 15:14:33 -04:00
Arthur
a543bd469a 11987 change cable bulk import to check if same cable 2023-10-05 16:48:48 -04:00
Daniel Sheppard
f65744faee Fixes: #11079 - Handle cables across multiple rear-port positions (#13337)
* Catch AssertionError's in signals.  Handle accordingly

* Alter cable logic to handle certain additional path types.

* Fix failures and add test

* More tests

* Remove not needed tests, add additional tests

* Finish tests, correct some behaviour

* Add check for mid-span device not allowed condition

* Remove excess import

* Remove logging import

* Remove logging import

* Minor tweaks based on Arthur's feedback

* Update netbox/dcim/tests/test_cablepaths.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/models/cables.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Changes to account for required SVG rendering changes and based on feedback

* More tweaks for cable path checking

* Improve handling of links with multi-terminations

* Improved SVG rendering of multiple rear ports (with positions) per path trace.  Include asymmetric path detection

* Include missing assert to ensure links are same type.

* Clean up tests

* Remove unused objects from tests

* Changes requested to tests and update comments/doctstrings

* Fix parent reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-26 13:16:50 -04:00
Luke Anderson
27297c7556 Add Hide Disconnected Button to Interface Summary, Remove Unused Table Caption Descriptor - Close #12732 2023-09-26 09:56:33 -04:00
Arthur Hanson
0ce2b1b779 13845 fix device type image save (#13851)
* 13845 check original image is null in save

* 13845 update delete image code
2023-09-25 13:41:21 -04:00
Jeremy Stretch
b670a1e22c Fixes #13871: Fix rack filtering for empty location during device bulk import 2023-09-25 11:59:19 -04:00
bluikko
6fb980349f 13245 add QSFP112 and OSFP-RHS interface choices 2023-09-20 10:10:51 -04:00
Arthur Hanson
8e251ac33c 13757 Fix ConfigContext reference to DeviceType (#13804)
* 13757 do prefetch to work around Django issue with vars in init (DeviceType)

* 13757 use self.__dict to access vars in init

* 13757 change test
2023-09-20 09:56:52 -04:00
Jeremy Stretch
35bcc2ce9d Revert "Fixes #13741: Enforce unique names for inventory items with no parent item"
This reverts commit 68966db23d22edcd81423e717a4157428ebfb896.
2023-09-20 08:44:25 -04:00
Jeremy Stretch
68966db23d Fixes #13741: Enforce unique names for inventory items with no parent item 2023-09-18 11:10:00 -04:00
Arthur Hanson
b0541be107 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
Abhimanyu Saharan
3d1f668235 Disables module_status ordering (#13761)
* disables module_status ordering #13756

* Set accessor for module status value

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-18 09:09:29 -04:00
Jeremy Stretch
c7dd4206c8 Fixes #13727: Fix exception when viewing rendered config for VM without a role assigned 2023-09-18 08:44:42 -04:00
Abhimanyu Saharan
b7cfb2f7d9 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
75b71890a4 Misc i18n cleanup 2023-09-11 15:59:50 -04:00
Abhimanyu Saharan
004daca862 Adds rename button on the list page for device components (#13564)
* adds interface rename button on the list page #13444

* adds rename view on all device components #13564

* Condense component views to a single template

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-01 16:58:31 -04:00
Jeremy Stretch
679cc8fdda Fixes #13596: Always display "render config" tab for devices & VMs 2023-08-31 14:36:03 -04:00
Abhimanyu Saharan
272d2c54d4 removes napalm references #13628 2023-08-31 09:54:35 -04:00
Daniel Sheppard
1854a6b76b Fix #11478 - Add vc_interfaces flag to control selection of VC interfaces (#13296)
* Add `vc_interfaces` flag to control interface queryset

* Fix test failure

* Add new filters instead of using undocumented query params

* Cleanup filterset, add test

* Rename filter and re-introduce virtual_chassis filtering method (required)

* Fix test

* Adjust tests to more accurately provide coverage

* Add breaking change note

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-30 09:33:02 -04:00
Jeremy Stretch
aebf3288d1 Fixes #13605: Specify batch size for cached counter migrations (#13610)
* Specify batch size for cached counter migrations

* Remove list() casting of querysets
2023-08-30 09:18:24 -04:00
Jeremy Stretch
4ab0eb570c #11305: Add latitude & longitude to DeviceWithConfigContextSerializer 2023-08-29 14:31:42 -04:00
Jeremy Stretch
2a4e3dd09f Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
Arthur Hanson
29877c9abe 12489 Use HTMX for Location and Non-Racked Devices in Site detail view (#12491)
* 12489 use htmx for site view locations and non-racked-devices

* 12489 remove now unused queries in context

* adds device type and role to device component filter #12015

* Revert "Fixes #12463: Fix the association of completed jobs with reports & scripts in the REST API"

This reverts commit a29a07ed26b2fe15ea21b000edbede1c20faef93.

* 12489 update nonracked_devices on rack and location templates

* 12489 fix whitespace issue

* Undo errant commits

* 12489 update site id in templates

* 12489 remove nonracked_devices include

* 12489 add has_position filter

* Use empty lookup for position field

* Remove non-racked devices list from rack view (was moved to a tab)

* Clean up location and device tables

* Restore plugins block on rack template

---------

Co-authored-by: Abhimanyu Saharan <desk.abhimanyu@gmail.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-08-28 16:03:35 -04:00
Abhimanyu Saharan
03b341dbfd adds missing status choicefield for vdc #13556 2023-08-25 09:40:04 -04:00
Abhimanyu Saharan
3090dd4934 Fixed permission for config context UI view (#13547)
* fixed permission for config context UI view #13543

* removed extras.view_configcontext permission #13543
2023-08-24 14:13:31 -04:00
Arthur
f743f2cfb8 11272 make position field work correctly when internationalizion enabled 2023-08-23 13:30:01 -04:00
Jeremy Stretch
44f8a777df Merge branch 'develop' into feature 2023-08-15 11:04:03 -04:00
Joel D. Tague
892c10b1f0 feat: add 200Gbps & 400Gbps interface speed options 2023-08-15 09:11:40 -04:00