Commit Graph

760 Commits

Author SHA1 Message Date
jeremystretch
91b81d51da Standardize related model display for nested models 2023-02-19 20:09:51 -05:00
jeremystretch
0c9e7aa074 Clean up related objects for sites, tenants 2023-02-19 20:09:51 -05:00
Jeremy Stretch
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
jeremystretch
ccc108a217 Closes #11598: Add buttons to easily switch between rack list and elevations views 2023-01-26 10:53:59 -05:00
jeremystretch
22a9df82e6 Closes #11554: Add module types count to manufacturers list 2023-01-26 08:46:25 -05:00
jeremystretch
b8de9c0875 Fixes #11528: Permit import of devices using uploaded file 2023-01-25 09:55:45 -05:00
Abhimanyu Saharan
ddd4f805a5
added device and vm tab on device role (#11500)
* added vm tab on device role

* added blank lines

* updated templates

* fixed lint issues
2023-01-20 09:30:18 -05:00
jeremystretch
8565d175f9 Fixes #11467: Correct count on interfaces tab when viewing a VC master device 2023-01-12 09:05:55 -05:00
kkthxbye
effcdb8723 Snapshot DeviceBay before populating/depopulating. 2023-01-09 08:39:54 -05:00
kkthxbye
b9f8370097
Fixes #11156 - Allow InventoryItem component reassignment (#11256)
* Allow re-assigning InventoryItem components

* Refactor logic for finding initial component assignment on InventoryItems

* PEP8 fix

* Fix wrong HTML causing tab list to extend past the end of the parent row

* Tweak form field labels

Co-authored-by: jeremystretch <jstretch@ns1.com>
2023-01-03 10:13:34 -05:00
Mario
ccb2966c4c
Fixes #11244: Elevations: Filter badge missing (#11321)
* Added filter badge in rack elevation

* Tweak template context

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-12-28 16:54:33 -05:00
jeremystretch
13d39a28ce #7854: Misc cleanup 2022-12-12 12:34:05 -05:00
jeremystretch
83a0576ca4 #9072: Add weight parameter to influence ViewTab ordering 2022-12-09 14:50:13 -05:00
jeremystretch
5a77791f9d Merge branch 'develop' into feature 2022-12-08 09:31:22 -05:00
Renato Almeida de Oliveira
d4d8d00d01 add distinct method to circuit_count 2022-12-06 15:19:35 -05:00
jeremystretch
d0e0c2ff8b Merge branch 'develop' into feature 2022-11-30 16:21:20 -05:00
jeremystretch
00d72f18cf Annotate need for natural ordering 2022-11-30 15:33:01 -05:00
Arthur
b36afdc924 11014 code review changes 2022-11-30 15:33:01 -05:00
Arthur
4ed45e4031 11014 fix rack elevation name sorting 2022-11-30 15:33:01 -05:00
kkthxbye-code
977b79ecee Check that device has a platform set before rendering napalm tab 2022-11-17 08:25:06 -05:00
jeremystretch
80f5c96af3 Document save_object() on BulkImportView 2022-11-16 08:47:45 -05:00
jeremystretch
23c0ca456f #4347: Rename NetBoxModelCSVForm to NetBoxModelImportForm 2022-11-15 12:24:57 -05:00
jeremystretch
6f8a7fdbe3 Cleanup for #7854 2022-11-15 11:24:36 -05:00
Daniel Sheppard
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
Arthur Hanson
93e7457e0d
4347 Add JSON/YAML import support for all objects (#10367)
* 4347 initial code for json import

* 4347 initial code for json import

* Clean up form processing logic

* Consolidate import forms

* Consolidate object import/update logic

* Clean up bulk import view

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-10 11:01:52 -05:00
jeremystretch
656f0b7d82 #9072: Add hide_if_empty argument to ViewTab 2022-10-10 08:11:29 -04:00
jeremystretch
b0ba9bd83d Closes #10608: Register all core model views using register_model_view() 2022-10-07 17:17:58 -04:00
jeremystretch
1fc8de85a3 Add device NAPALM view tabs 2022-10-07 14:17:18 -04:00
jeremystretch
5e1a0733e4 Replace active_tab context for object views 2022-10-07 12:14:19 -04:00
jeremystretch
bfe26b46a6 Wrap model detail views with register_model_view() 2022-10-07 11:36:14 -04:00
Arthur Hanson
0b6a3898fe
8424 device location (#10544)
* 8424 fix merge

* 8424 fix merge

* 8424 fix merge

* 8424 fix merge
2022-10-03 13:55:05 -04:00
Daniel Sheppard
0190c0225e
Merge pull request #10420 from netbox-community/9497-fix-site-location-nonracked-device-display
Fixes #9497 - Change non-racked filter for sites/locations
2022-09-20 09:48:09 -05:00
Daniel Sheppard
71d71a6b1b
Fixes #9497 - Change filter for sites/locations 2022-09-20 09:26:40 -05:00
Jeremy Stretch
c4b7ab067a
Fixes #10247: Allow changing selected device/VM when creating a new component (#10312)
* Initial work on #10247

* Continued work on #10247

* Clean up component creation tests

* Move valdiation of replicated field to form

* Clean up ordering of fields in component creation forms

* Omit fieldset header if none

* Clean up ordering of fields in component template creation forms

* View tests should not move component templates to new device type

* Define replication_fields on VMInterfaceCreateForm

* Clean up expandable field help texts

* Update comments

* Update component bulk update forms & views to support new replication fields

* Fix ModularDeviceComponentForm parent class

* Fix bulk creation of VM interfaces (thanks @kkthxbye-code!)
2022-09-15 10:10:32 -04:00
Arthur
239b8d2e7c #9665 review changes 2022-09-01 11:15:23 -07:00
Arthur
43b3ce9ed1 #9665 review changes 2022-09-01 11:12:01 -07:00
Arthur
3d4d880110 #9665 Rack Elevation Sorting Enhancements 2022-08-31 14:42:59 -07:00
Jeremy Stretch
9da9a209a5
Fixes #10087: Correct display of far end in console/power/interface connections tables (#10117) 2022-08-25 08:46:19 -04:00
jeremystretch
a36294e209 Merge branch 'develop' into feature 2022-08-16 12:56:49 -04:00
Jeremy Stretch
14821eed44
Merge pull request #9639 from cpund/8723-branch
PR for #8723
2022-08-16 09:10:24 -04:00
Craig Pund
6a687a9ed1 not necessary to prefetch 2022-08-11 15:16:01 -04:00
jeremystretch
1b88b36820 Merge branch 'develop' into feature 2022-08-08 15:39:03 -04:00
jeremystretch
90317adae7 Clean up usages of mark_safe() 2022-08-08 10:47:07 -04:00
jeremystretch
29a611c729 Closes #9896: Discontinue arbitrary use of OrderedDict 2022-08-01 16:51:44 -04:00
Kim Johansson
6904666e2a Remove deprecated usage of prefetch_related
Fixes #9699
2022-07-30 01:18:30 +02:00
sleepinggenius2
bbf4b906e4 Adds patterned_fields support for bulk components 2022-07-26 17:16:03 -04:00
Marek Zbroch
f385a5fd5e Typo fix in CableEditView 2022-07-16 09:42:01 +02:00
jeremystretch
c380fd00bf Merge branch 'develop' into feature 2022-07-11 12:58:24 -04:00
jeremystretch
57397570c0 Drop extraneous/invalid prefetches 2022-07-11 12:45:53 -04:00
Kim Johansson
1539769c08 Prefetch Tenant Group on user configurable tables
Prefetch the Tenant Group in views which allows its table to be configured
by the user. This decreases the amount of database queries that are required
to fetch the data.
2022-07-10 17:17:56 +02:00
jeremystretch
ac4a87de13 Improve display of related objects in cables list 2022-07-08 13:33:43 -04:00
jeremystretch
9a7f3f8c1a Cleanup for #9102 2022-07-07 12:48:44 -04:00
Craig Pund
fa014fcbf0 add device bulk rename view and url 2022-06-30 01:38:38 -04:00
jeremystretch
25ed3390cb Merge branch 'feature' into 9102-cabling 2022-06-27 12:12:34 -04:00
jeremystretch
fc02e15fb1 Closes #4434: Enable highlighting devices within rack elevations 2022-06-24 11:04:38 -04:00
jeremystretch
440dfabefe Merge branch 'feature' into 9102-cabling 2022-06-20 15:04:55 -04:00
jeremystretch
92a6523bf3 Fixes #9549: Fix device counts for rack list under rack role view 2022-06-17 14:40:37 -04:00
jeremystretch
a7d3e5e7f5 Merge all cable creation URLs into a single view 2022-05-23 13:22:45 -04:00
jeremystretch
7b5ff4c1a5 Merge cable creation/edit views & forms 2022-05-20 16:53:23 -04:00
jeremystretch
906c3dca8b Tests cleanup 2022-05-13 16:29:19 -04:00
jeremystretch
951627093c Test cleanup 2022-05-13 15:34:01 -04:00
jeremystretch
4c51dbba80 Update connected_endpoint serializer field to support multiple objects 2022-05-13 11:04:38 -04:00
jeremystretch
3a461d0279 Update Cable instantiations to match new signature 2022-05-13 09:33:00 -04:00
jeremystretch
82706eb3a6 Migrate CablePath to use two-dimensional array 2022-05-12 16:08:44 -04:00
jeremystretch
f0fc8bf2cf Restrict A terminations by parent object 2022-05-12 16:08:44 -04:00
jeremystretch
5d37f9f975 Update cable connection forms 2022-05-12 16:08:44 -04:00
jeremystretch
1f4ad444ae Introduce CableTermination model & migrate data 2022-05-12 16:08:44 -04:00
jeremystretch
4bb9b6ee26 Extend Cable model to support multiple A/B terminations 2022-05-12 16:08:44 -04:00
jeremystretch
6c290353c1 Allow editing A side termination when creating cable 2022-05-12 16:08:44 -04:00
jeremystretch
c48c8cc353 Remove termination IDs from cable creation view paths 2022-05-12 16:08:44 -04:00
jeremystretch
0301aec409 Closes #9260: Apply user preferences to tables under object detail views 2022-05-04 15:46:13 -04:00
Jeremy Stretch
8781d03aa7
Merge pull request #9067 from jasonyates/FR8920-nonrackeddevices
Limit amount of nonracked devices displayed
2022-04-12 11:38:14 -04:00
Jason Yates
23fddf74b6 Updating to use a single queryset
Updating to use a single queryset for both template variables
2022-04-10 09:06:14 +01:00
jeremystretch
1e65ef0c1a Fixes #9055: Restore ability to move inventory item to other device 2022-04-08 09:41:37 -04:00
Jason Yates
c3d9910e08 Limit amount of nonracked devices displayed
Fixes #8920

Limits the amount of non-racked devices on Site and Location view to 10 and provides a link to the device list this is pre-filtered to the relevant site or location.
2022-04-07 08:21:13 +01:00
jeremystretch
d93e944c07 Closes #8973: Display VLAN group count under site view 2022-04-06 20:12:14 -04:00
Daniel Sheppard
85e65edb7d Fixes #9057 - Fix missing instance counts for module types 2022-04-06 13:46:31 -05:00
jeremystretch
3ff4fd814e Merge branch 'develop' into feature 2022-03-30 15:45:40 -04:00
Stephan Blanke
b7e2ea1ca5 Closes #8163: Add bridge members panel to interface view 2022-03-28 20:37:00 +02:00
jeremystretch
b65404a8a9 Fix cable creation view 2022-03-23 10:55:09 -04:00
jeremystretch
ce87e0dfa4 Merge branch 'develop' into feature 2022-03-22 12:57:23 -04:00
jeremystretch
197dfca5b2 Fixes #8935: Correct ordering of next/previous racks to use naturalized names 2022-03-22 09:50:38 -04:00
jeremystretch
ba1e6e91b9 Rename ObjectEditView.model_form to form 2022-03-21 10:22:30 -04:00
jeremystretch
8d53b46e82 Merge branch 'develop' into feature 2022-03-18 13:17:11 -04:00
Alex Gittings
5abde866f1 Closes: #8457 - implement nonracked devices on locations and sites 2022-03-18 14:34:42 +00:00
jeremystretch
18c9ee2f9d Closes #8804: Include module type count on manufacturer view 2022-03-07 13:44:27 -05:00
jeremystretch
62a1d4b3e0 Fixes #8763: Fix inventory item component assignment 2022-03-03 11:52:36 -05:00
jeremystretch
0953bba0a3 Closes #8747: Rename ObjectListView action_buttons to actions 2022-02-24 16:33:51 -05:00
jeremystretch
a2fe23549b Closes #8667: Support position patterning when creating module bays & templates 2022-02-23 13:02:14 -05:00
jeremystretch
bca0978434 Clean up component template creation for ModuleTypes 2022-02-18 11:56:49 -05:00
jeremystretch
bcdd006dd5 Fixes #8661: Fix ValueError exception when trying to connect a cable 2022-02-16 09:27:16 -05:00
jeremystretch
23a80770e1 Move configure_table() logic to NetBoxTable.configure() 2022-02-09 14:10:54 -05:00
jeremystretch
624eda297f Clean up and document object, object list templates 2022-02-07 16:50:17 -05:00
jeremystretch
a2981870ce #7844: Allow installing modules via UI without replicating components 2022-02-04 11:51:30 -05:00
jeremystretch
4a1b4e0485 Closes #8469: Move BaseTable, columns to netbox core app 2022-01-27 15:00:10 -05:00
jeremystretch
c8713d94d8 Merge branch 'develop' into feature 2022-01-11 16:16:13 -05:00
jeremystretch
21e0e6e495 Closes #6954: Remember users' table ordering preferences 2022-01-10 14:03:07 -05:00
jeremystretch
8c8774cd2f Fixes #8226: Honor return URL after populating a device bay 2022-01-04 13:24:15 -05:00
jeremystretch
791cc093f4 Enable the association of inventory item templates with component templates 2021-12-29 16:30:44 -05:00
jeremystretch
4c15f4a84f Initial work on #8118 2021-12-29 15:37:01 -05:00
jeremystretch
3982f13569 Show parent device/VM when creating new components 2021-12-28 15:19:41 -05:00
jeremystretch
21356b487a #7846: Show assigned component (if any) when creating inventory item 2021-12-28 14:15:06 -05:00
jeremystretch
4075cc8518 Restore front port component creation 2021-12-28 09:53:56 -05:00
jeremystretch
ba85101d30 Update component model forms to use DynamicModelChoiceField query_params for related objects 2021-12-27 21:25:47 -05:00
jeremystretch
a237c01b4b Refactor ComponentCreateView to use separate forms for names/labels and model creation 2021-12-27 21:04:29 -05:00
jeremystretch
6e9afccfd7 #8037: Add role field to InventoryItem 2021-12-27 10:45:33 -05:00
jeremystretch
04fb5e544d #3087: Add InvetoryItemRole 2021-12-27 10:18:39 -05:00
jeremystretch
5e32c69e0e Merge branch 'develop' into feature 2021-12-21 11:28:16 -05:00
jeremystretch
7ba45b2887 Clean up imports 2021-12-21 10:48:10 -05:00
jeremystretch
57a78b3cad Clean up device/devicetype tab views 2021-12-21 10:28:28 -05:00
jeremystretch
71b4641e18 Merge v3.1.2 2021-12-20 16:28:11 -05:00
jeremystretch
85f9690377 Closes #8083: Removed "related devices" panel from device view 2021-12-18 14:30:28 -05:00
jeremystretch
e0d7511eaa Misc cleanup 2021-12-17 16:34:51 -05:00
jeremystretch
7777922bef Add Module model 2021-12-17 16:12:03 -05:00
jeremystretch
5bd223a468 Fix YAML import for ModuleTypes 2021-12-17 13:28:17 -05:00
jeremystretch
7c60e3c0ff Add Module model 2021-12-17 12:18:37 -05:00
jeremystretch
e529d7fd3b Add ModuleBay and ModuleBayTemplate models 2021-12-17 09:35:57 -05:00
jeremystretch
997e88af00 Merge branch 'develop' into feature 2021-12-15 10:53:21 -05:00
jeremystretch
4ffa823ab8 Enable HTMX for all ObjectChildrenViews 2021-12-14 15:31:42 -05:00
jeremystretch
8d3b296eed Update device/VM component views to use ObjectChildrenView 2021-12-14 13:47:40 -05:00
jeremystretch
2dad35186a Generic view cleanup 2021-12-14 11:28:13 -05:00
jeremystretch
029605f926 Clean up site view 2021-12-06 13:43:02 -05:00
jeremystretch
09b612546b Omit actions column from non-paginated child object tables 2021-12-03 11:07:16 -05:00
Daniel Sheppard
cf9eaf2eff Fix dcim/views.py merge error 2021-11-03 11:36:54 -05:00
Daniel Sheppard
db2d71ed9e
Merge branch 'feature' into 6732-asn-model 2021-11-03 08:37:11 -05:00
Daniel Sheppard
7625a2dd3c #6732 - Swap ASN M2M to Site model and update some templates/filters 2021-11-02 12:26:06 -05:00
jeremystretch
bb4f3e1789 Initial work on #6235 2021-11-01 16:56:30 -04:00
Daniel Sheppard
3991115ae5 #6732 - Fix imports and other small items 2021-10-29 14:54:55 -05:00
Daniel Sheppard
a01068949c Initial work on #6732 2021-10-24 23:42:47 -05:00
jeremystretch
8c058dcd45 Closes #7530: Move device type component lists to separate views 2021-10-20 15:04:40 -04:00
jeremystretch
7b70129974 Refactor device component views 2021-10-20 14:24:02 -04:00
jeremystretch
d2bdf4e822 Closes #7462: Include count of assigned virtual machines under platform view 2021-10-06 10:12:44 -04:00
jeremystretch
9e2364b246 Refactor DCIM forms 2021-09-27 17:09:37 -04:00
jeremystretch
aaba4b534f Fixes #7360: Correct redirection URL after removing child device from device bay 2021-09-27 09:58:03 -04:00
jeremystretch
9cb29f48a0 Use exclude() when instantiating tables to omit columns 2021-09-17 14:25:02 -04:00
jeremystretch
5e29679968 Merge 'detail' tables into primaries for each model 2021-09-17 13:55:32 -04:00
jeremystretch
cc0830bf28 Closes #7087: Add search/filter forms for all organizational models 2021-09-16 16:04:46 -04:00
jeremystretch
aa05097fca Fixes #7279: Fix exception when tracing cable with no associated path 2021-09-16 08:56:26 -04:00
jeremystretch
52603c087b Remove unnecessary component creation templates 2021-08-24 14:51:12 -04:00
Jeremy Stretch
939bcfec4b
Improve object list layout (#6907)
* Split object list and filters into tabs

* Use object_list template for connections, rack elevations

* Include custom field filters in grouped filter form

* Annotate number of applied filters on tab

* Rearrange table controls
2021-08-06 15:35:14 -04:00
jeremystretch
c7e0abc3fb Merge v2.11.10 2021-07-28 16:26:04 -04:00
jeremystretch
78e282d406 Fixes #6771: Add count of inventory items to manufacturer view 2021-07-28 10:25:52 -04:00
jeremystretch
a1eb4dc807 Fixes #5627: Fix filtering of interface connections list 2021-07-27 16:21:56 -04:00
jeremystretch
7eef726ee1 Fix filtering for platforms, tenant groups 2021-07-20 15:39:58 -04:00
jeremystretch
9f615cde79 Replace CSS-based cable trace diagrams with SVG images 2021-07-14 15:29:04 -04:00
jeremystretch
a8a9e061a1 Merge branch 'develop' into feature 2021-06-22 14:30:47 -04:00
jeremystretch
4292d88a92 Closes #6620: Show assigned VMs count under device role view 2021-06-22 14:21:41 -04:00
jeremystretch
9d3cac43b7 Modify default CSV export to render from tables 2021-06-09 15:02:31 -04:00
Daniel Sheppard
744792452f
Closes: #5278 - Remove Secrets (#6397)
* Remove Secrets

* #5278: Remove secrets javascript from netbox core

* Remove userkey references

* Fix PEP8

* Remove a few more instances of secrets.  Rebundle

* Remove Secrets

Co-authored-by: checktheroads <matt@allroads.io>
2021-05-17 16:26:02 -04:00
checktheroads
e429ba6fa2 #2434: Fix database transaction context scoping 2021-05-14 11:21:42 -07:00