Commit Graph

1599 Commits

Author SHA1 Message Date
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
Jeremy Stretch
2c950b4bef Closes #11732: Protect against errant overwriting of data via web UI forms 2023-08-01 09:06:51 -04:00
Arthur Hanson
b951bbbff2 Closes #13279: Wrap choice labels with gettext()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 17:31:07 -04:00
Arthur Hanson
c68cc5cd5c 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
Jeremy Stretch
2508db718d Closes #13311: Always use get_permission_for_model() to resolve permission names 2023-07-30 14:32:02 -04:00
Jeremy Stretch
639b495db1 Merge branch 'develop' into feature 2023-07-30 13:36:51 -04:00
Jeremy Stretch
5e6dcfd506 Satisfy PEP8 E721 linter complaints 2023-07-30 13:34:08 -04:00
Arthur Hanson
9a79b7e3fb Closes #13102: Establish initial translation support in templates
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-28 16:30:25 -04:00
Jeremy Stretch
d809644c4d Closes #12194: Add pre-defined custom field choices (#13219)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup

* Initial work on predefined choices for custom fields

* Misc cleanup

* Add IATA airport codes

* #13241: Add support for custom field choice labels

* Restore ArrayColumn

* Misc cleanup

* Change extra_choices back to a nested ArrayField to preserve choice ordering

* Hack to bypass GraphQL API test utility absent support for nested ArrayFields
2023-07-28 11:24:21 -04:00
Jeremy Stretch
3c3063fd04 Merge branch 'develop' into feature 2023-07-28 10:36:09 -04:00
kkthxbye-code
7249637359 Allow the align property on th and td and add CSS rules for overriding text-alignment 2023-07-27 16:38:46 -04:00
Arthur
c0459e3f92 13272 fix graphql tests 2023-07-27 14:25:49 +07:00
Arthur Hanson
a77917b614 6347 Cache the number of each component type assigned to devices/VMs (#12632)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-25 09:39:05 -04:00
Arthur Hanson
de3022f362 12589 move user and group admin from admin (#12877)
Move admin views for users, groups, and object permissions from the admin site to the NetBox frontend

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-20 16:22:08 -04:00
Jeremy Stretch
1ab8477642 Closes #12988: Introduce custom field choice sets (#13195)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup
2023-07-19 10:26:24 -04:00
Jeremy Stretch
09795ead78 Merge branch 'develop' into feature 2023-07-11 10:09:26 -04:00
Abhimanyu Saharan
404714f618 Adds copy content button (#12584)
* adds copy content button #12499

* adds newline

* Omit hash mark from target string

* Clean up HTML element IDs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-06 14:19:55 -04:00
Jeremy Stretch
bcbff57394 Closes #8248: User bookmarks (#13035)
* Initial work on #8248

* Add tests

* Fix tests

* Add feature query for bookmarks

* Add BookmarksWidget

* Correct generic relation name

* Add docs for bookmarks

* Remove inheritance from ChangeLoggedModel
2023-06-29 14:36:11 -04:00
Jeremy Stretch
b1c1b1bbbd Fixes #12977: Fix URL parameters for object count dashboard widgets (#12991)
* Fixes #12977: Introduce dict_to_querydict() to ensure proper handling of QueryDicts

* Remove unused import
2023-06-26 14:21:26 -04:00
Arthur Hanson
44e0d0af07 12794 change User ref to get_user_model (#12905)
* 12794 change User ref to get_user_model

* 12794 call get_user_model once in tests

* 12794 call get_user_model once in tests

* 12794 use settings.AUTH_USER_MODEL for FK reference
2023-06-22 08:26:50 -04:00
Arthur
b7d5af3930 Merge branch 'develop' into feature 2023-06-14 16:32:56 -07:00
Abhimanyu Saharan
b23d80c9bc fixes typo in register_model_view docstring #12824 2023-06-14 14:06:23 +05:30
jeremystretch
2ee8e6c2bb Merge branch 'develop' into feature 2023-06-02 15:43:06 -04:00
jeremystretch
5f29ac1d88 Fixes #12779: Correct arithmetic for converting inches to meters 2023-06-01 13:21:15 -04:00
Abhimanyu Saharan
6de379def2 Fixes return_url for image attachment (#12721)
* fixes return_url for image attachment #12538

* simplified conditions

* handle nonetype error

* fixed request check

* Introduce htmx_table template tag for embedding HTMX-backed object tables

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-31 15:22:37 -04:00
Abhimanyu Saharan
653642bc82 Adds rq retry options (#12588)
* adds rq retry options #12327

* Clean up docs; disable retries of failed jobs by default

* Pass a Retry object only if RQ_RETRY_MAX is non-zero

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-16 14:10:44 -04:00
jeremystretch
43e7bfeb57 Closes #11766: Remove obsolete custom ChoiceField and MultipleChoiceField classes 2023-05-12 16:27:50 -04:00
jeremystretch
92518c90f4 Fixes #12550: Fix rear port selection widget under front port creation form 2023-05-10 10:44:01 -04:00
jeremystretch
0007fc6a53 Remove pinned version dependencies 2023-04-27 14:09:16 -04:00
jeremystretch
d669251679 Merge branch 'develop' into feature 2023-04-26 15:09:51 -04:00
jeremystretch
764389dffa Fixes #12270: Fix pre-population of list values when creating a saved filter 2023-04-19 17:41:38 -04:00