Commit Graph

65 Commits

Author SHA1 Message Date
Martin Hauser e6c1cebd34
Closes #19499 - Add WirelessLink Bulk Import Support by Device and Interface Names (#19679) 2025-06-16 11:19:56 -07:00
Jason Novinger a2a8779ebc
Fixes #19415: Increased Circuit/WirelessLink distance upper limit (#19495)
* Fixes #19415: Increased Circuit/WirelessLink absolute distance upper limit

Also adds form validation that provides a useful message to the user
rather than a 500 error with potentially little information.

* Include forgotten migration files

* Remove unnecessary comments

* Remove more unnecessary comments

* Addresses PR feedback

* Gah, remove django migration header comment

* Clean up new has_field_errors mechanism, fix issue with ObjectAttribute

* Address PR feedback, revert changes to render_fieldset template tag
2025-05-19 08:38:30 -04:00
Jason Novinger c0b019b735 Adds WirelessLANGroup.comments to all the required places
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] wireless.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] wireless.forms.bulk_edit, bulk edit
    - [x] wireless.forms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [NA] 8. Add column to object table (Note: was already present)
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jeremy Stretch 343a4af591
Closes #18022: Extend linter (ruff) to enforce line length limit (120 chars) (#18067)
* Enable E501 rule
* Configure ruff formatter
* Reformat migration files to fix line length violations
* Fix various E501 errors
* Move table template code to template_code.py & ignore E501 errors
* Reformat raw SQL
2024-11-21 15:58:11 -05:00
Jeremy Stretch b4f15092db
Closes #5858: Implement a quick-add UI widget for related objects (#18016)
* WIP

* Misc cleanup

* Add warning re: nested quick-adds
2024-11-18 14:44:57 -05:00
Jeremy Stretch 03d413565f Fix linter error 2024-11-07 14:10:15 -05:00
Arthur Hanson 812ce8471a
10711 Add Scope to WirelessLAN (#17877)
* 7699 Add Scope to Cluster

* 7699 Serializer

* 7699 filterset

* 7699 bulk_edit

* 7699 bulk_import

* 7699 model_form

* 7699 graphql, tables

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fix tests

* 7699 fix graphql tests for clusters reference

* 7699 fix dcim tests

* 7699 fix ipam tests

* 7699 fix tests

* 7699 use mixin for model

* 7699 change mixin name

* 7699 scope form

* 7699 scope form

* 7699 scoped form, fitlerset

* 7699 review changes

* 7699 move ScopedFilterset

* 7699 move CachedScopeMixin

* 7699 review changes

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 7699 review changes

* 7699 refactor mixins

* 7699 _sitegroup -> _site_group

* 7699 update docstring

* fix model

* remove old constants, update filtersets

* 10711 fix GraphQL

* 10711 fix API

* 10711 add tests

* 10711 review changes

* 10711 add tests

* 10711 add scope to detail template

* 10711 add api test

* Extend CSV test data

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-07 10:28:02 -05:00
Arthur Hanson 65687851fe
16547 Add distance to Circuit (#17629)
* 16547 Add distance to Circuit

* 16547 fix test cases

* 16547 fix test cases

* 16547 add distance to API, forms, tables

* 16547 fixes

* 16547 fixes

* 16547 review changes

* 16547 review changes

* Clean up DistanceColumn

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-10 14:37:33 -04:00
Jeremy Stretch a09c1667ff #15106: Put distance & distance_unit on same line in model form 2024-08-30 08:40:16 -04:00
Arthur Hanson 91dcecbd07
15106 Add Length Field to Wireless Link (#16528)
* 15106 add wireles link length

* 15106 add wireles link length

* 15106 add wireless link length

* 15106 add tests

* 15106 rename length -> distance

* 15106 rename length -> distance

* 15106 review comments

* 15106 review comments

* 15106 fix form

* 15106 length -> distance
2024-06-17 09:19:49 -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
Jeremy Stretch 72d3c17b48 Use FieldSet instances for all forms 2024-03-19 13:34:13 -04: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
Arthur Hanson b7a9649269
Closes #13149: Wrap form field labels with gettext_lazy()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 12:52:38 -04:00
jeremystretch f49e4ee512 Merge branch 'develop' into feature 2023-04-26 15:09:51 -04:00
Austin de Coup-Crank adb9673f09
Fixes #11623: obfuscate Wi-Fi PSKs (#12244)
* Fixes #11623: obfuscate Wi-Fi PSKs

* yarn linting fixes

* include static files
2023-04-24 12:13:28 -04:00
Jeremy Stretch d470848b29
Closes #12246: General cleanup of utilities modules
* Clean up base modules

* Clean up forms modules

* Clean up templatetags modules

* Replace custom simplify_decimal filter with floatformat

* Misc cleanup

* Merge ReturnURLForm into ConfirmationForm

* Clean up import statements for utilities.forms

* Fix field class references in docs
2023-04-14 10:33:53 -04:00
Jeremy Stretch d1f76bec37
Closes #10054: Implement advanced UI controls for object selection (#11952)
* WIP

* WIP

* WIP

* Make object selector functional

* Replace extraneous form fields with selector widgets

* Avoid overlap with filterset field names

* Show checkmarks next to visibile filters

* Update results automatically when searching

* Include selector for device/VM component parent fields

* Use selector for filtering VLAN group/site

* Limit selector to 100 results
2023-03-13 12:44:26 -04:00
jeremystretch 2a9178af12 Merge branch 'develop' into feature 2023-03-13 11:58:37 -04:00
Aron Bergur Jóhannsson fa60f9d2a8
Closes #11294: Markdown Preview (#11894)
* MarkdownWidget

* Change border and color of active markdown tab

* Fix template name typo

* Add render markdown endpoint

* Static assets for markdown widget

* widget style fix and unique ids based on name

* Replace SmallTextArea with SmallMarkdownWidget

* Clear innerHTML before swapping

* render markdown directly in template

* change render markdown view path

* remove small markdown widget

* Simplify rendering logic

* Use a form to clean input Markdown data

---------

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-03-09 08:21:13 -05:00
Jeremy Stretch b9bd96f0c7 Closes #11765: Remove StaticSelect & StaticSelectMultiple (#11767)
* Remove StaticSelect, StaticSelectMultiple form widgets

* Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
2023-02-19 20:09:51 -05:00
kkthxbye-code 8d68b6a2e6 Fixes #11694 - Remove obsolete SmallTextarea widget 2023-02-19 20:09:51 -05:00
jeremystretch 23c0ca456f #4347: Rename NetBoxModelCSVForm to NetBoxModelImportForm 2022-11-15 12:24:57 -05:00
jeremystretch 355678274d #9623: Add slug field to SavedFilter 2022-11-15 10:44:12 -05:00
Arthur 6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
jeremystretch ad40d42dc4 Closes #10710: Add status field to WirelessLAN 2022-11-04 13:40:39 -04:00
Arthur Hanson cdeb65e2fb
7376 csv tags (#10802)
* 7376 add tags to CSV import

* 7376 change help text

* 7376 validate tags

* 7376 fix tests

* 7376 add tag validation tests

* Introduce CSVModelMultipleChoiceField for CSV import tag assignment

* Clean up CSVImportTestCase

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-04 10:50:43 -04:00
Jeremy Stretch bc6b5bc4be
Closes #10545: Standardize description & comment fields on primary models (#10834)
* Standardize description & comments fields on primary models

* Update REST API serializers

* Update forms

* Update tables

* Update templates
2022-11-04 08:28:09 -04:00
Jeremy Stretch 484efdaf75
Closes #9623: Implement saved filters (#10801)
* Initial work on saved filters

* Return only enabled/shared filters

* Add tests

* Clean up filtering of usable SavedFilters
2022-11-02 12:27:53 -04:00
jeremystretch 91c6bbcd78 Closes #10695: Rename forms/models.py to forms/model_forms.py 2022-10-25 16:26:05 -04:00
Arthur Hanson 028b4b7ea7
10643 add fieldset to device role for improved add/edit form display (#10680)
* 10643 add fieldset to device role for improved add/edit form display

* 10643 update other forms

* 10643 update other forms

* Specify fieldsets for additional models

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-10-19 08:35:23 -04:00
jeremystretch 7dd5f9e720 Closes #9177: Add tenant assignment for wireless LANs & links 2022-06-27 11:30:52 -04:00
jeremystretch 118bf5152c Fixes #9132: Limit location options by selected site when creating a wireless link 2022-04-18 09:02:03 -04:00
jeremystretch 78836389f0 Changelog for #8543 & cleanup 2022-04-14 08:37:58 -04:00
Tyler Bigler 1a374a1669 Add filters to VLAN selection group 2022-04-14 00:58:17 -04:00
jeremystretch ffc29d14a8 Add tags field to NetBoxModelForm 2022-03-10 15:08:23 -05:00
jeremystretch 60e87cd496 Enable the use of fieldsets on bulk edit forms 2022-02-04 09:59:53 -05:00
jeremystretch 5af18c2d8a Move pk field declaration under NetBoxModelBulkEditForm 2022-02-01 11:40:23 -05:00
jeremystretch 3621b1a0d0 Set model as attribute on bulk edit forms 2022-02-01 11:00:18 -05:00
jeremystretch d1672f8818 Move nullable_fields out of Meta for bulk edit forms 2022-01-31 16:15:40 -05:00
jeremystretch 353e132cf9 Replace filter_groups with fieldsets on filter forms 2022-01-31 16:03:26 -05:00
jeremystretch ccb3a75281 Move fieldsets out of Meta for model forms 2022-01-31 15:52:36 -05:00
jeremystretch e4eee1cdfc Clean up nullable fields declaration for bulk edit forms 2022-01-28 16:47:54 -05:00
jeremystretch f4776731ec Establish 4 core forms in netbox.forms.base 2022-01-28 15:48:15 -05:00
jeremystretch 4c1199e009 Fixes #8255: Fix bulk editing of authentication parameters for wireless LANs and links 2022-01-06 08:54:05 -05:00
jeremystretch 9c9fcaf42f Fixes #7290: Defer loading API-backed form fields 2021-12-29 09:30:43 -05:00
jeremystretch b7c9ca720a Closes #7886: Introduce a base FilterForm class 2021-11-19 15:12:45 -05:00
jeremystretch beca978af5 Clean up imports 2021-11-18 16:48:29 -05:00
jeremystretch ed2231e34b Apply BootstrapMixin to CustomFieldModelFilterForm 2021-11-18 16:27:06 -05:00