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

149 Commits

Author SHA1 Message Date
1eca1c3d17 15803 localize help_text (#15804) 2024-04-22 11:42:20 -04:00
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
d5c1cb0ef6 Merge branch 'develop' into feature 2023-12-28 14:20:04 -05:00
3ef2db81e8 Closes #14629: Add filter tests for all q and description filters 2023-12-28 13:53:16 -05:00
3d20276f55 Closes #14134: Display additional object attributes in global search results (#14154)
* WIP

* Add display_attrs for all indexers

* Linkify object attributes

* Clean up prefetch logic

* Use tooltips for display attributes

* Simplify template code

* Introduce get_indexer() utility function

* Add  to examples in docs

* Use tooltips to display long strings
2023-11-09 16:21:09 -05:00
c4e765c4a8 Closes #14141: translation cleanup (#14143)
* Translations cleanup

* Tweak variable names; misc string cleanup

* Misc cleanup
2023-10-30 13:38:03 -04:00
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
caedc8dbe3 Closes #13352: Translation support for model verbose names (#13354)
* Update verbose_name & verbose_name_plural Meta attributes on all models

* Alter makemigrations to ignore verbose_name & verbose_name_plural changes
2023-08-03 10:41:10 -04:00
e625a5667c Closes #13279: Wrap choice labels with gettext()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 17:31:07 -04:00
e284cd7e54 Closes #13150: Wrap table column headers with gettext()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 14:35:28 -04:00
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
83bebc1bd2 Closes #13132: Wrap verbose_name and other model text with gettext_lazy() (i18n)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 11:28:07 -04:00
f49e4ee512 Merge branch 'develop' into feature 2023-04-26 15:09:51 -04:00
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
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
ecd0c56554 Closes #9608: Move from drf-yasg to spectacular
Co-authored-by: arthanson <worldnomad@gmail.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-30 14:32:59 -04:00
de57446f36 Use ssid for the string representation of WirelessLinks if available 2023-03-28 14:08:04 -04:00
c57d71a9db 11291 optimize GraphQL queries (#11943)
* 11291 initial optimize graphql queries

* 11291 add optimizer to schemas

* 11291 cleanup fields.py

* 11291 fix fragment query
2023-03-23 08:42:18 -04:00
3b9fda0169 Merge branch 'develop' into feature 2023-03-20 08:54:22 -04:00
206d578bc3 Closes #10242: Redirect to filtered objects list after bulk import (#12001)
* Redirect user to filtered objects list after bulk import

* Remove obsolete table attribute from bulk import views
2023-03-17 09:23:40 -04:00
fc482ed096 Use ssid for the string representation of WirelessLinks if available 2023-03-17 09:19:07 -04:00
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
2a9178af12 Merge branch 'develop' into feature 2023-03-13 11:58:37 -04:00
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
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
8d68b6a2e6 Fixes #11694 - Remove obsolete SmallTextarea widget 2023-02-19 20:09:51 -05:00
91b81d51da Standardize related model display for nested models 2023-02-19 20:09:51 -05:00
1a2dae3471 Closes #8184: Enable HTMX for embedded tables (#11518)
* Enable HTMX rendering for embedded tables

* Start converting embedded tables to use HTMX (WIP)

* Additional table conversions (WIP)

* Standardize HTMX usage for nested group models

* Enable HTMX for additional emebedded tables

* Fix HTMX table rendering for ObjectChildrenView

* Standardize usage of inc/panel_table.html

* Hide selection boxes in embedded tables
2023-02-19 20:09:51 -05:00
2b12138c41 Fix configuration key for WirelessLANStatusChoices 2022-12-09 10:45:02 -05:00
ebf555e1fb Use strings to specify prerequisite models 2022-11-16 17:22:09 -05:00
23c0ca456f #4347: Rename NetBoxModelCSVForm to NetBoxModelImportForm 2022-11-15 12:24:57 -05:00
355678274d #9623: Add slug field to SavedFilter 2022-11-15 10:44:12 -05:00
ecf5304a14 #10560: Add new fields to indexers 2022-11-15 10:37:35 -05:00
6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
ad40d42dc4 Closes #10710: Add status field to WirelessLAN 2022-11-04 13:40:39 -04:00
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
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
e2f5ee661a Clean up redundant NestedGroupModel, OrganizationalModel fields 2022-11-03 13:59:44 -04:00
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
cb815ede60 7961 CSV bulk update (#10715)
* 7961 add csv bulk update

* temp checkin - blocked

* 7961 bugfix and cleanup

* 7961 change to id, add docs

* 7961 add tests cases

* 7961 fix does not exist validation error

* 7961 fix does not exist validation error

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 optimize loading csv test data

* 7961 update tests remove redundant code

* 7961 avoid MPTT issue in test cases
2022-10-27 13:10:18 -04:00
91c6bbcd78 Closes #10695: Rename forms/models.py to forms/model_forms.py 2022-10-25 16:26:05 -04:00
9628dead07 Closes #10560: New global search (#10676)
* Initial work on new search backend

* Clean up search backends

* Return only the most relevant result per object

* Clear any pre-existing cached entries on cache()

* #6003: Implement global search functionality for custom field values

* Tweak field weights & document guidance

* Extend search() to accept a lookup type

* Move get_registry() out of SearchBackend

* Enforce object permissions when returning search results

* Add indexers for remaining models

* Avoid calling remove() on non-cacheable objects

* Use new search backend by default

* Extend search backend to filter by object type

* Clean up search view form

* Enable specifying lookup logic

* Add indexes for value field

* Remove object type selector from search bar

* Introduce SearchTable and enable HTMX for results

* Enable pagination

* Remove legacy search backend

* Cleanup

* Use a UUID for CachedValue primary key

* Refactoring search methods

* Define max search results limit

* Extend reindex command to support specifying particular models

* Add clear() and size to SearchBackend

* Optimize bulk caching performance

* Highlight matched portion of field value

* Performance improvements for reindexing

* Started on search tests

* Cleanup & docs

* Documentation updates

* Clean up SearchIndex

* Flatten search registry to register by app_label.model_name

* Clean up search backend classes

* Clean up RestrictedGenericForeignKey and RestrictedPrefetch

* Resolve migrations conflict
2022-10-21 13:16:16 -04:00
bd79a27e4d Merge branch 'develop' into feature 2022-10-20 16:07:03 -04:00
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
ffce5d968d 8927 plugin search (#10489)
* #7016 base search classes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 8927 refactor search

* 8927 refactor search

* 8927 refactor search

* 8927 refactor search

* 8927 get search choices working

* 8927 cleanup - optimize

* 8927 use backend search function

* 8927 fix for plugin search

* 8927 add docs

* Move search app to a module under netbox/

* Utilize global registry to register model search classes

* Build search form options from registry

* Determine search categories from model app by default

* Enable dynamic search registration for plugins

* Update docs & improve plugin support

* Clean up search backend class

* Docs for #8927

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-10-10 14:00:59 -04:00
b0ba9bd83d Closes #10608: Register all core model views using register_model_view() 2022-10-07 17:17:58 -04:00
a0bae06ff7 Replace static journaling, changelog URL paths with dynamic resolution 2022-10-06 16:21:23 -04:00
af8bb0c4b9 10348 add decimal custom field (#10422)
* 10348 add decimal custom field

* 10348 fix tests

* 10348 add documentation

* Rearrange custom fields to be ordered consistently

* Rename number_field to integer_field for clarity

* Clean up validation logic

* Apply suggested changes from PR

* Store decimal custom field values natively

* Fix filter test

* Update custom field model migrations to use new encoder

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-30 16:03:24 -04:00
f51415cf2c Replace unique_together with UniqueConstraints 2022-09-27 15:35:24 -04:00
f70ef7a585 Changelog and cleanup for #9935 2022-08-24 16:44:24 -04:00