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

514 Commits

Author SHA1 Message Date
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
9e09e46700 Fixes #11522: Correct tag links under contact & tenant list views 2023-01-17 10:32:22 -05:00
064e3ff605 Merge branch 'develop' into feature 2022-12-13 17:17:05 -05:00
96a796ebde Fixes #11173: Enable missing tags columns for contact, L2VPN lists 2022-12-13 14:04:50 -05:00
2f96fdd135 Merge branch 'develop' into feature 2022-11-16 11:42:32 -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
7401fd7050 10909 add l2vpn to tenant stats 2022-11-14 14:16:18 -05:00
6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
b374351154 Closes: #7854 - Add VDC/Instances/etc (#10787)
* Work on #7854

* Move to new URL scheme.

* Fix PEP8 errors

* Fix PEP8 errors

* Add GraphQL and fix primary_ip missing

* Fix PEP8 on GQL Type

* Fix missing NestedSerializer.

* Fix missing NestedSerializer & rename VDC to VDCs

* Fix migration

* Change Validation for identifier

* Fix missing migration

* Rebase to feature

* Post-review changes

* Remove VDC Type
* Remove M2M Enforcement logic

* Interface related changes

* Add filter fields to filterset for Interface filter
* Add form field to filterset form for Interface filter
* Add VDC display to interface detail template

* Remove VirtualDeviceContextTypeChoices

* Accommodate recent changes in feature branch

* Add tests
Add missing search()

* Update tests, and fix model form

* Update test_api

* Update test_api.InterfaceTest create_data

* Fix issue with tests

* Update interface serializer

* Update serializer and tests

* Update status to be required

* Remove error message for constraint

* Remove extraneous import

* Re-ordered devices menu to place VDC below virtual chassis

* Add helptext for `identifier` field

* Fix breadcrumb link

* Remove add interface link

* Add missing tenant and status fields

* Changes to tests as per Jeremy

* Change for #9623

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

* Update filterset form for status field

* Remove Rename View

* Change tabs to spaces

* Update netbox/dcim/tables/devices.py

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

* Update netbox/dcim/tables/devices.py

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

* Fix tenant in bulk_edit

* Apply suggestions from code review

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

* Add status field to table.

* Re-order table fields.

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-11-11 07:55:49 -05: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
0b24d3d892 Merge branch 'develop' into feature 2022-11-01 17:13:11 -04:00
7990cfb078 Fixes #10803: Fix exception when ordering contacts by number of assignments 2022-11-01 15:27:35 -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
2fe8df3cbb 10655 fix contacts display in list views (#10681)
* 10655 fix contacts display in list views

* 10655 review changes
2022-10-18 16:47:14 -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
c481a1b6a2 Merge branch 'develop' into feature 2022-10-05 10:28:48 -04:00
bdefd8ea8c Fixes #10562: Correct URL for contacts table tags column 2022-10-05 08:13:33 -04:00
10352ff5ad Merge branch 'develop' into feature 2022-09-30 17:17:18 -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
02ffc2ddee 10491 improve error message for ProtectedError on contact assignment 2022-09-30 09:09:21 -07:00
f51415cf2c Replace unique_together with UniqueConstraints 2022-09-27 15:35:24 -04:00
2d9852d6f1 Fixes #10408: Fix validation when attempting to add redundant contact assignments 2022-09-27 13:11:57 -04:00
0b5478ad2d Fixes #9895: Change DictField serializers to JSONField 2022-08-29 08:02:38 +02:00
8b1a462a60 #10094 changes from code review 2022-08-23 09:29:55 -07:00
9fddd193b9 #10094 fix Contact AddAnother 2022-08-22 16:31:41 -07:00
8cd5a24409 #9414: Clean up clone_fields on all models 2022-08-11 09:58:37 -04:00
6904666e2a Remove deprecated usage of prefetch_related
Fixes #9699
2022-07-30 01:18:30 +02:00
abf11fbcb8 Merge branch 'develop' into feature 2022-07-20 12:20:33 -04:00
e07dd3ddcb Define NESTED_SERIALIZER_PREFIX constant 2022-07-15 15:31:42 -04:00
3eb6b6c07f Clean up core API imports 2022-07-13 16:18:55 -04:00
c380fd00bf Merge branch 'develop' into feature 2022-07-11 12:58:24 -04:00
e2af716a81 #9686: Add default accessor to TenantGroupColumn 2022-07-11 10:03:45 -04:00
bd60d46b82 Table mixin for Tenancy columns
A mixin to add the Tenant and Tenant Group columns to a table.
2022-07-10 15:08:55 +02:00
3c2a55a521 Add TenantGroupColumn to display Tenant Group on tables
Works the same as the existing TenantColumn, but displats the Tenant Group of
the Tenant.

Views should prefetch the Tenants Group for this to be efficient in large
tables.
2022-07-10 11:58:45 +02:00
7dd5f9e720 Closes #9177: Add tenant assignment for wireless LANs & links 2022-06-27 11:30:52 -04:00
c81c3d11ed Fixes #9495: Correct link to contacts in contact groups table column 2022-06-09 10:20:44 -04:00
36c65b7b22 Closes #8893: Include count of IP ranges under tenant view 2022-06-07 11:12:40 -04:00
8ad203f97a Added contact_group to region, site, manufacturer, tenant filters 2022-05-14 17:53:40 +02:00
aba4e03d3b Add contact_group to ContactModelFilterSet 2022-05-14 17:48:37 +02:00