Commit Graph

807 Commits

Author SHA1 Message Date
Jeremy Stretch
a0b4b0afe0
Closes #18023: Employ register_model_view() for list views (#18029)
* Extend register_model_view() to enable registering list views

* Register circuits list views with register_model_view()

* Register core list views with register_model_view()

* Fix bulk_edit & bulk_delete URL paths

* Register dcim list views with register_model_view() (WIP)

* Register dcim list views with register_model_view()

* Register extras list views with register_model_view()

* Register ipam list views with register_model_view()

* Register tenancy list views with register_model_view()

* Register users list views with register_model_view()

* Register virtualization list views with register_model_view()

* Register vpn list views with register_model_view()

* Register wireless list views with register_model_view()

* Add change note for register_model_view()
2024-11-20 15:54:37 -05:00
Jeremy Stretch
d2168b107f
Closes #13086: Virtual circuits (#17933)
* WIP

* Add API tests

* Add remaining tests

* Add model docs

* Show virtual circuit connections on interfaces

* Misc cleanup per PR feedback

* Renumber migration

* Support nested terminations for virtual circuit bulk import
2024-11-19 10:58:39 -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
Arthur Hanson
6ab0792f02
Closes #11279: Replace _name natural key sorting with collation (#18009)
* 11279 add collation

* 11279 add collation

* 11279 add collation

* 11279 add collation

* 11279 fix tables /tests

* 11279 fix tests

* 11279 refactor VirtualDisk

* Clean up migrations

* Misc cleanup

* Correct errant file inclusion

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-15 09:32:09 -05:00
Jeremy Stretch
a183048891 Closes #17951: Extend Ruff ruleset 2024-11-07 11:52:02 -05:00
Arthur Hanson
a8eb455f3e
9604 Add Termination to CircuitTermination (#17821)
* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 model_forms

* 9604 form filtersets

* 9604 form bulk_import

* 9604 form bulk_edit

* 9604 serializers

* 9604 graphql

* 9604 tests and detail template

* 9604 fix migration merge

* 9604 fix tests

* 9604 fix tests

* 9604 fix table

* 9604 updates

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* 9604 remove provider_network

* 9604 fix tests

* 9604 fix tests

* 9604 fix forms

* 9604 review changes

* 9604 scope->termination

* 9604 fix _circuit_terminations

* 9604 fix _circuit_terminations

* 9604 sitegroup -> site_group

* 9604 update docs

* 9604 fix form termination side reference

* Misc cleanup

* Fix terminations in circuits table

* Fix missing imports

* Clean up termination attrs display

* Add termination & type to CircuitTerminationTable

* Update cable tracing logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-31 09:55:08 -04:00
Jeremy Stretch
ef1fdf0a01 Closes #17761: Store empty CharField choices as null 2024-10-21 13:12:05 -04:00
Jeremy Stretch
a8ec06687a Reomove obsolete nested serializers 2024-10-18 08:16:30 -04:00
Jeremy Stretch
727de0fb59 Remove unused imports 2024-10-11 12:27:39 -04:00
Jeremy Stretch
256b5dc676 Merge branch 'develop' into feature 2024-10-11 11:29:36 -04:00
Jeremy Stretch
7ac6dff96d
Closes #17733: Replace pycodestyle with ruff (#17734)
* Resolve F541 errors

* Resolve F841 errors

* Resolve F811 errors

* Resolve F901 errors

* Resolve E714 errors

* Ignore F821 errors for GraphQL mixins

* Replace pycodestyle with ruff

* Move ignores to ruff.toml
2024-10-11 07:43:46 -04:00
Jeremy Stretch
e59f776e02
Closes #17725: Clean up import statements (#17728)
* #17725: Resolve all F401 errors

* Tweak noqa designation
2024-10-10 14:52:47 -04: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
Arthur Hanson
ed1327eeb7
16546 define get_absolute_url method in NetBoxModel (#17693)
* 16546 define get_absolute_url method in NetBoxModel

* 16546 define get_absolute_url method in NetBoxModel

* 16546 define get_absolute_url method in NetBoxModel

* 16546 move get_absolute_url to NetBoxFeatureSet

* 16546 fix CircuitTermination

* Fix linebreaks

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-10 09:59:19 -04:00
Jeremy Stretch
a777850702 Merge branch 'develop' into feature 2024-09-03 11:59:59 -04:00
Daniel Sheppard
4fead1c85f
Fixes: #17310 - Properly restrict GraphQL related object queries (#17312)
* Fixes: #17310 - Fix GraphQL restriction of related objects

* Fix some failing tests

* Fix test
2024-08-30 14:22:58 -04:00
Jeremy Stretch
b797fcc03d Closes #17318: Include provider in nested API representation of circuits 2024-08-30 13:13:33 -04:00
Jeremy Stretch
9a11191ac5 #7025: Cleanup 2024-08-29 15:38:16 -04:00
Jeremy Stretch
6f7bf5baf4 Merge branch 'develop' into feature 2024-08-29 10:51:38 -04:00
Daniel Sheppard
0464dacf7e
Fixes: #16292 - Properly restrict GraphQL queries for querys with pk set (#17244)
* Fixes: #16292 - Properly restrict GraphQL queries for querys with pk set

* Update netbox/netbox/settings.py

* Apply schema adaptations across all apps

* Extend GraphQL API tests

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-28 12:23:25 -04:00
Jeremy Stretch
e3d681be54 Closes #17143: Deprecate the use of dedicated nested API serializers 2024-08-15 08:00:33 -04:00
Jeremy Stretch
8b91fb8d2d Merge branch 'develop' into feature 2024-08-14 10:54:31 -04:00
Arthur Hanson
34d20fccd5
17036 international messages (#17041)
* 17036 international messages

* 17036 fix typo

* 17036 fix _

* Misc cleanup & fixes

* More cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-10 11:47:06 -04:00
Jeremy Stretch
dbd503bcc8 #7025: Misc cleanup 2024-07-30 13:50:42 -04:00
Jeremy Stretch
a12fdd6e2d Merge branch 'develop' into feature 2024-07-26 16:39:58 -04:00
Jonathan Senecal
f3d1924453 Use provider_id instead of account_id in url_params 2024-07-26 15:10:25 -04:00
Arthur Hanson
8237c6accc
7025 circuit redundancy (#16945)
* 7025 CircuitRedundancyGroups

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups tests

* 7025 CircuitRedundancyGroup -> CircuitGroup

* 7025 add tenancy

* 7025 linkify name

* 7025 missing file

* 7025 circuitgroupassignment

* 7025 base group assignment working

* 7025 assignments

* 7025 fix forms/tests for CircuitGroup

* 7025 fix api tests

* 7025 view tests

* 7025 CircuitGroupAssignment tests

* 7025 fix typo

* 7025 fix typo

* 7025 fix tests

* 7025 remove m2m

* 7025 add count to serializer

* 7025 fix test

* 7025 documentation

* 7025 review comments

* 7025 review comments

* 7025 add search index

* Make CircuitPriorityChoices extensible

* Add group assignment table to circuit view

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-24 12:24:44 -04:00
Jeremy Stretch
02ae91589d Merge branch 'develop' into feature 2024-07-09 15:16:05 -04:00
Adam Brutsaert
f4532dd4ab Closes #16817: Added 200 & 400 Gbps selections for circuit commit rate 2024-07-04 11:31:10 -04:00
Jeremy Stretch
94c2e7582e Closes #16791: Add 200 & 400 Gbps selections for circuit termination port speed 2024-07-03 08:28:12 -04:00
Julio Oliveira at Encora
b605dfcba0
16704 - Define a default help_text for ColorField (#16708)
* Added `help_text` to ColorField.

* Addressed PR comment to remove the redundant help_text from all the forms where ColorField was used.

* Add space before example value

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-26 09:14:08 -04:00
Arthur Hanson
52546608f6
15156 Add display_url to REST API (#16412)
* 15156 add display_url to REST API

* 15156 fix view name

* 15156 fix typo

* 15156 fix tests

* 15156 add url display_url to base class

* 15156 add url display_url to base class

* 15156 add url display_url to base class

* 15156 review changes

* 15156 review changes

* 15156 review changes

* 15156 review changes

* 15156 remove bogus code

* 15156 remove bogus code

* 15156 review changes

* 15156 review changes

* 15156 review changes

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-25 09:59:58 -04:00
Jeremy Stretch
d2a8e52585 Fixes #16444: Disable ordering circuits list by A/Z termination 2024-06-17 12:49:00 -04:00
Alexander Haase
5353f83710
15794 Make "related objects" dynamic (#15876)
* Closes #15794: Make "related objects" dynamic

Instead of hardcoding relationships between models for the detail view,
they are now dynamically generated.

* Fix related models call

* Remove extra related models hook

Instead of providing a rarely used hook method, additional related
models can now be passed directly to the lookup method.

* Fix relations view for ASNs

ASNs have ManyToMany relationships and therefore can't used automatic
resolving. Explicit relations have been restored as before.

* Add method call keywords for clarification

* Cleanup related models

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-12 09:46:41 -04:00
Arthur
8a91252d51 16286 fix provider account search 2024-05-28 09:06:34 -04:00
Arthur Hanson
b2d2a23c26
15496 Add circuit termination to menu and associated forms (#15980)
* 15496 base changes

* 15496 detail view template

* 15496 tweaks

* 15496 bulk views

* 15496 filterset

* 15496 optimize qs

* 15496 bulk edit

* 15496 bulk import

* 15496 update tests

* Update netbox/templates/circuits/circuittermination.html

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

* 15496 review changes

* 15496 template include

* 15496 expand filters

* 15496 split import form

* 15496 split import form

* 15496 add test for circuit bulk import with termiantions

* Add test for provider filters

* Rename provider column

* Fix test

* Misc cleanup

* Fix test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-17 15:30:10 -04:00
Jeremy Stretch
4d40699f2c Fixes #15995: Permit nullable fields referenced by unique constraints to be omitted from REST API requests 2024-05-07 15:33:14 -04:00
Jeremy Stretch
46bd62fdc9 Merge branch 'develop' into feature 2024-04-22 13:23:42 -04:00
Jeremy Stretch
d9a7b4ee0e Fixes #15609: Fix filtering providers list by assigned ASN 2024-04-04 10:45:57 -04:00
Arthur Hanson
8767577ecd
15553 change graphql sub-queries from functions to types (#15557)
* 15553 change graphql list to types

* 15553 review changes
2024-03-29 14:54:31 -04:00
Arthur Hanson
45c99e4477
9856 Replace graphene with Strawberry (#15141)
* 9856 base strawberry integration

* 9856 user and group

* 9856 user and circuits base

* 9856 extras and mixins

* 9856 fk

* 9856 update strawberry version

* 9856 update imports

* 9856 compatability fixes

* 9856 compatability fixes

* 9856 update strawberry types

* 9856 update strawberry types

* 9856 core schema

* 9856 dcim schema

* 9856 extras schema

* 9856 ipam and tenant schema

* 9856 virtualization, vpn, wireless schema

* 9856 fix old decorator

* 9856 cleanup

* 9856 cleanup

* 9856 fixes to circuits type specifiers

* 9856 fixes to circuits type specifiers

* 9856 update types

* 9856 GFK working

* 9856 GFK working

* 9856 _name

* 9856 misc fixes

* 9856 type updates

* 9856 _name to types

* 9856 update types

* 9856 update types

* 9856 update types

* 9856 update types

* 9856 update types

* 9856 update types

* 9856 update types

* 9856 update types

* 9856 update types

* 9856 GraphQLView

* 9856 GraphQLView

* 9856 fix OrganizationalObjectType

* 9856 single item query for schema

* 9856 circuits graphql tests working

* 9856 test fixes

* 9856 test fixes

* 9856 test fixes

* 9856 test fix vpn

* 9856 test fixes

* 9856 test fixes

* 9856 test fixes

* 9856 circuits test sans DjangoModelType

* 9856 core test sans DjangoModelType

* 9856 temp checkin

* 9856 fix extas FK

* 9856 fix tenancy FK

* 9856 fix virtualization FK

* 9856 fix vpn FK

* 9856 fix wireless FK

* 9856 fix ipam FK

* 9856 fix partial dcim FK

* 9856 fix dcim FK

* 9856 fix virtualization FK

* 9856 fix tests / remove debug code

* 9856 fix test imagefield

* 9856 cleanup graphene

* 9856 fix plugin schema

* 9856 fix requirements

* 9856 fix requirements

* 9856 fix docs

* 9856 fix docs

* 9856 temp fix tests

* 9856 first filterset

* 9856 first filterset

* 9856 fix tests

* 9856 fix tests

* 9856 working auto filter generation

* 9856 filter types

* 9856 filter types

* 9856 filter types

* 9856 fix graphiql test

* 9856 fix counter fields and merge feature

* 9856 temp fix tests

* 9856 fix tests

* 9856 fix tenancy, ipam filter definitions

* 9856 cleanup

* 9856 cleanup

* 9856 cleanup

* 9856 review changes

* 9856 review changes

* 9856 review changes

* 9856 fix base-requirements

* 9856 add wrapper to graphiql

* 9856 remove old graphiql debug toolbar

* 9856 review changes

* 9856 update strawberry

* 9856 remove superfluous check

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-03-22 12:56:30 -04:00
Jeremy Stretch
ae8df77cc8 Move count_related() & dict_to_filter_params() to utilities.query 2024-03-22 08:59:52 -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
2aaa552067 Replace custom form templates with TabbedFieldGroups 2024-03-19 13:34:13 -04:00
Jeremy Stretch
bea32aef71 Declare FilterSet fields as a tuple 2024-03-12 12:08:11 -04:00
Jeremy Stretch
16b422cbac Add missing filters 2024-03-11 14:39:34 -04:00
Jeremy Stretch
6af12b1814 Add tests for missing FilterSet filters 2024-03-11 14:39:34 -04:00
Jeremy Stretch
ca56c8b9ef Add dynamic nesting support to SerializedPKRelatedField 2024-02-27 14:00:42 -05:00
Jeremy Stretch
c382ba0ae0 Refactor REST API serializers to avoid circular imports 2024-02-27 13:26:43 -05:00