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

331 Commits

Author SHA1 Message Date
Arthur Hanson
a953ff20f9 15973 fix switch type on cable edit (#16049)
* 15973 fix switch type on cable edit

* 15973 fix cable add from device
2024-05-09 14:54:38 -04:00
Jeremy Stretch
51bd98bdfc Merge branch 'develop' into feature 2024-05-06 12:59:24 -04:00
Jeremy Stretch
408e0c5a9b Fixes #15877: Consider VC membership when assigning LAG interfaces via bulk edit 2024-05-03 10:55:41 -04:00
Jeremy Stretch
312291b010 Merge branch 'develop' into feature 2024-05-01 16:09:14 -04:00
Daniel Sheppard
c08784da46 Fixes #11460 - Fix unterminated cable exception when editing cable (#15813)
* Fix cable edit form with single unterminated cable

* Minor tweaks

* Instead of skipping HTMX, override the template & move form template to an "htmx" template

* Use HTMXSelect widget for A/B type selection

* Infer A/B termination types from POST data

* Fix saving cable which results in resetting of the termination type fields

* Condense view logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-01 14:24:50 -04:00
Arthur Hanson
4923025fec 15541 Add component selector to InventoryItemTemplate (#15691)
* 15541 update InventoryItemTemplateForm

* 15541 update InventoryItemTemplateForm

* Remove custom template

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-04-25 09:22:32 -04:00
Jeremy Stretch
46bd62fdc9 Merge branch 'develop' into feature 2024-04-22 13:23:42 -04:00
Arthur Hanson
1eca1c3d17 15803 localize help_text (#15804) 2024-04-22 11:42:20 -04:00
Arthur Hanson
90d0104359 15541 Add component selector to InventoryItemTemplate (#15759)
* 15541 make inventoryitemtemplateform match inventoryitemform

* 15541 set tab active
2024-04-22 08:22:53 -04:00
Arthur Hanson
f47b158863 15685 Allow decimal for cable length filter form (#15703)
* 15685 allow decimal for cable length filter

* 15685 allow decimal for cable length filter

* 15685 remove minlenth

* 15685 remove minlenth
2024-04-15 11:24:32 -04:00
Jeremy Stretch
72d3c17b48 Use FieldSet instances for all forms 2024-03-19 13:34:13 -04:00
Jeremy Stretch
3b28e8e615 Refactor form rendering components & add docstrings 2024-03-19 13:34:13 -04:00
Jeremy Stretch
4c7b6fcec0 Enable tabbed group fields in fieldsets 2024-03-19 13:34:13 -04:00
Jeremy Stretch
f585c36d86 Introduce InlineFields for rendering fields side-by-side 2024-03-19 13:34:13 -04:00
Daniel Sheppard
19f577ccaf Closes: #13918 - Add facility field (#15456)
* Fixes: #13918 - Add facilities field to Location model.

* Stupidly forgot to `git add`

* Fix errant reference to site.

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-03-18 10:09:50 -04:00
Jeremy Stretch
572efeb987 Ensure all filter labels are translated 2024-03-12 12:14:13 -04:00
Jeremy Stretch
3ddacf4b88 Merge branch 'develop' into feature 2024-02-21 16:24:23 -05:00
Abhimanyu Saharan
8571f428b1 fixed location import #14064 2024-02-21 14:10:10 -05:00
Arthur Hanson
af27bf5eff 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
Daniel Sheppard
29f029d480 Fixes: #14058 - Limits platform selection to manufacturer and platforms with no manufacturer (#15183)
* Fixes: #14058 - Limits platform selection to manufacturer and platforms with no manufacturer

* Apply suggestions from code review

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

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-20 09:28:15 -05:00
Jeremy Stretch
20824ceb25 Closes #13283: Add context to dropdown options (#15104)
* Initial work on #13283

* Enable passing TomSelect HTML template attibutes on DynamicModelChoiceField

* Merge disabled_indicator into option_attrs

* Add support for annotating a numeric count on dropdown options

* Annotate parent object on relevant fields

* Improve rendering of color options

* Improve rendering of color options

* Rename option_attrs to context

* Expose option context on ObjectVar for custom scripts

* Document dropdown context variables
2024-02-13 16:31:17 -05:00
Jeremy Stretch
01fa2710eb Fixes #15067: Fix uncaught exception when attempting invalid device bay import 2024-02-13 12:15:15 -05:00
Jeremy Stretch
d63e1dacbf Closes #14917: Replace slim-select with tom-select (#15080)
* Experimenting

* Remove testing resources

* Replace ApiSelect with TomSelect

* Add color support

* Add clear button

* Clear cached options when searching dynamic selects

* Add support for static parameters

* Refactor TomSelect implementation

* Add dynamic parameter support

* Limit number of options to 100

* Remove redundant api_url definitions for user model

* Add support for disabled indicator

* Remove obsolete value-field attr on dynamic select widgets

* Remove obsolete fetch_trigger kwarg from dynamic model choice widgets

* Remove obsolete empty_label kwarg from dynamic model choice widgets

* Add support for API path variables

* Add support for setting a 'null' option

* Annotate depth for recursive hierarchies

* Misc cleanup

* Remove obsolete APISelect code

* Remove slim-select & just-debounce-it

* Clean up type validation

* Closes #14237: Clear child selections on change to parent selection

* Use an MD icon for the clear button

* Use an MD icon for the clear button

* Explain why noUnusedParameters is disabled
2024-02-08 15:07:04 -05:00
Jeremy Stretch
74e67afa41 Merge branch 'develop' into feature 2024-02-05 14:38:26 -05:00
teapot
1b9e6bed55 Fixes #14960: Correct typo in label 2024-01-29 08:48:02 -05:00
Arthur
f26ac3e7cb 14920 add help to status field in virtual device context import 2024-01-25 08:31:40 -05:00
Jeremy Stretch
da085e60c2 Closes #14740: Remove BootstrapMixin (#14841)
* Introduce custom form widget templates to apply CSS classes

* Apply both mandatory and optional CSS classes to form widgets

* Omit required & placeholder attrs

* Move annotation of field validation failures to CSS

* Remove BootstrapMixin class

* Remove obsolete ComponentTemplateImportForm class

* Remove obsolete custom forms for login & password change

* Clean up obsolete accommodations for 'required' widget attr
2024-01-19 14:02:33 -05:00
Jeremy Stretch
d5c1cb0ef6 Merge branch 'develop' into feature 2023-12-28 14:20:04 -05:00
Jeremy Stretch
fedcbaf4c8 Fixes #14620: Permit setting device type U height to 0 during bulk edit 2023-12-28 10:06:25 -05:00
Jeremy Stretch
25e67eb555 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
kkthxbye
8d39181842 Fixes #12751 - Usability improvements for object selector (#14387)
* Usability improvements for object selector:
* Adds preselected filters
* Applies the filter on selection instead of requiring the search button to be pushed

* Declare selector_fields on base form class

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-15 16:07:15 -05:00
Jeremy Stretch
d2fea4edc4 Closes #14311: Move L2VPN models from ipam to vpn (#14358)
* Move L2VPN and L2VPNTermination models from ipam to vpn

* Move L2VPN resources from ipam to vpn

* Extend migration to update content types

* Misc cleanup
2023-11-28 13:45:00 -05:00
Jeremy Stretch
18422e1d26 Closes #14326: Move form mixins (#14327)
* Move form mixins from extras app to netbox app

* Remove obsolete extras/admin.py
2023-11-22 13:49:26 -05:00
Jeremy Stretch
ac91d4e5e5 Merge branch 'develop' into feature 2023-11-09 16:06:26 -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
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
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
Arthur
01c894e625 14013 fix device role filter 2023-10-13 08:51:22 -04:00
Arthur
a543bd469a 11987 change cable bulk import to check if same cable 2023-10-05 16:48:48 -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
Jeremy Stretch
75b71890a4 Misc i18n cleanup 2023-09-11 15:59:50 -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
2a4e3dd09f Merge branch 'develop' into feature 2023-08-29 10:45:55 -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
kkthxbye
5de9d3f15f 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
914588f55d Merge branch 'develop' into feature 2023-08-09 15:31:21 -04:00
Jeremy Stretch
2236b86c35 Closes #11922: Populate assigned VDCs when adding a child interface 2023-08-04 15:25:59 -04:00