Commit Graph

902 Commits

Author SHA1 Message Date
Alexander Haase
bcf589d0fc Closes 18061: Hide traceback from rendered device config (#18127)
* Hide traceback from rendered device config

When an exception occurs during device configuration rendering, it
usually doesn't contain information about the template being rendered,
but rather the trace of how the template was rendered. Since this could
confuse users and expose internal server information, it is now hidden.

* Improve error message display; replicate changes for VMs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-11 10:28:42 -05:00
Jeremy Stretch
b77bb44739 Fixes #17986: Correct label for disk size when bulk editing virtual machines (#17992)
* Fixes #17986: Correct label for disk size when bulk editing virtual machines

* Correct label for VirtualDisk.size
2024-11-12 14:53:57 -05:00
Jeremy Stretch
e0742decef Fixes #17884: Fix translation support for certain tab headings 2024-10-30 08:48:37 -04:00
Jeremy Stretch
9aef95da97 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
1b753ed5bc Closes #17725: Clean up import statements (#17728)
* #17725: Resolve all F401 errors

* Tweak noqa designation
2024-10-10 14:52:47 -04:00
Jeremy Stretch
f37e2e55a3 Closes #17577: Reference ModelState when determining whether an object is being created 2024-09-24 09:14:07 -04:00
Jeremy Stretch
6a8e455294 Merge branch 'develop' into feature 2024-09-03 11:59:59 -04:00
Daniel Sheppard
45754798e7 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
fbdc68851b Merge branch 'develop' into feature 2024-08-29 10:51:38 -04:00
Daniel Sheppard
bc97b12bd2 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
0f37da1523 Closes #17143: Deprecate the use of dedicated nested API serializers 2024-08-15 08:00:33 -04:00
Jeremy Stretch
15e6822071 Merge branch 'develop' into feature 2024-08-14 10:54:31 -04:00
Arthur Hanson
57da8b8f51 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
Arthur Hanson
7507237499 17032 Convert Virtual Disk Size from GB -> MB (#17033)
* 17032 Convert Virtual Disk size from GB -> MB

* 17032 update migration

* 17032 update migration

* 17032 update migration

* 17032 update migration

* Omit redundant method

* Merge migrations

* Tweak column header

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-31 10:03:25 -04:00
Jeremy Stretch
effa4c40b1 Closes #14861: Standardize URL path for virtual disks 2024-07-25 13:12:53 -04:00
Jeremy Stretch
3d23f9c099 Merge branch 'develop' into feature 2024-07-09 15:16:05 -04:00
Jeremy Stretch
9e9274e6d5 Fixes #16796: Allow assignment of VM with no site to a cluster with a site 2024-07-04 09:14:07 -04:00
Jeremy Stretch
985fd3644b Fixes #16779: Fix saved filter selection for child object lists (#16789)
* Fixes #16779: Fix saved filter selection for child object lists

* Omit label_suffix
2024-07-03 08:51:30 -04:00
Arthur Hanson
4490c55ff8 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
c23b62287a Merge branch 'develop' into feature 2024-06-24 15:40:43 -04:00
Ryan Gillespie
9db2f2b24e Fixes #15717 - Unable to assign a VM in Site to Cluster without Site (#15763)
* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site
2024-06-20 10:59:17 -04:00
Arthur Hanson
c338e11afa 7537 add serial number to virtual machines (#16407)
* 7537 add serial number to virtual machines

* 7537 add migration

* 7537 add sn to search

* 7537 add to model documentation

* 8984 move serializer field

* 8984 add to detail view and search index

* 7537 serial_number -> serial

* 7537 fix migration

* Add missing serial field

* Give serial field higher precedence for search

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-12 10:15:16 -04:00
Alexander Haase
10238cf057 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 Hanson
73be300ab4 14692 Convert VM disk size (#16434)
* 14692 convert disk size to MB

* 14692 fix list display

* 14692 fix migration

* Update netbox/virtualization/migrations/0039_convert_disk_size.py

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

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-11 09:19:57 -04:00
Daniel Sheppard
24611f9e2f Fixes: #16039 - Fix row highlighting on device components and VM interfaces (#16044)
* Fix row highlighting

* Minor fix for VMInterfaces

* Move duplicated dicts into inheritable meta class

* Add CableTerminationTable.Meta class for inheritance of the row_attrs to each descendant Meta class.
2024-06-03 08:47:53 -04:00
Jeremy Stretch
a55a2bdaf1 Fixes #16124: Fix GraphQL API support for querying virtual machine interfaces 2024-05-14 09:15:57 -04:00
Jeremy Stretch
5480c96c65 Closes #16070: Set default template for ObjectChildrenView 2024-05-13 15:21:52 -04:00
Jeremy Stretch
47278b7347 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
2914276837 Merge branch 'develop' into feature 2024-04-22 13:23:42 -04:00
Arthur
647449e6bb 15588 set readonly nullable fields as allow_null=True 2024-04-19 16:17:28 -04:00
Florian Derler
a4150a28a5 #15712: add imageattachments to vms 2024-04-19 14:15:50 -04:00
Julio-Oliveira-Encora
80433c90a6 Fixed line 391 in netbox/virtualization/views.py. It was reeplaced "view_virtual_disk" with "view_virtualdisk" 2024-04-15 09:28:21 -04:00
Arthur Hanson
cc979e110f 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
Jeremy Stretch
d85b056a14 Upgrade DRF to v3.15 2024-03-29 13:13:41 -04:00
Arthur Hanson
d166f577e1 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
d636da5f32 Move count_related() & dict_to_filter_params() to utilities.query 2024-03-22 08:59:52 -04:00
Jeremy Stretch
c928756396 Use FieldSet instances for all forms 2024-03-19 13:34:13 -04:00
Jeremy Stretch
521735c400 Merge branch 'develop' into feature 2024-03-15 12:32:54 -04:00
Jeremy Stretch
3a60ea4568 Fixes #15347: Fix querying virtual machine contacts via GraphQL 2024-03-13 19:09:52 -04:00
Jeremy Stretch
bc49f301d2 Declare FilterSet fields as a tuple 2024-03-12 12:08:11 -04:00
Jeremy Stretch
458a80244a Clean up exemption logic 2024-03-11 15:54:35 -04:00
Jeremy Stretch
813ec0c7f3 Add missing filters 2024-03-11 14:39:34 -04:00
Jeremy Stretch
411862a55e Add tests for missing FilterSet filters 2024-03-11 14:39:34 -04:00
Jeremy Stretch
f3c7da2cfb Closes #15291: Add tunnel termination buttons to VM interfaces table 2024-03-08 16:58:04 -05:00
Jeremy Stretch
6372d3be41 Closes #15297: Linkify platform column in device & virtual machine tables 2024-03-08 16:48:39 -05:00
Jeremy Stretch
66cc58e7d0 Add dynamic nesting support to SerializedPKRelatedField 2024-02-27 14:00:42 -05:00
Jeremy Stretch
de0427a45b Refactor REST API serializers to avoid circular imports 2024-02-27 13:26:43 -05:00
Jeremy Stretch
aea8c693f5 Replace nested serializers with primary serializers where possible 2024-02-26 16:49:30 -05:00
Jeremy Stretch
5c2f7fa59c Closes #15238: Include description field in brief mode 2024-02-26 11:39:31 -05:00
Abhimanyu Saharan
ba23a7f31e added display on virtual disk api #15241 2024-02-23 15:33:35 -05:00