Commit Graph

729 Commits

Author SHA1 Message Date
Anthony Brissonnet
0c13610866 Fix #12579 create cable and add another error (#13007)
* fix create cable and add another error #12579

* fix return proper parent object field

* improve code and wokflow

---------

Co-authored-by: netopsab <abrisson@cerbere.rp.sig.u-bourgogne.fr>
2023-07-06 09:28:45 -04:00
Sudheesh Singanamalla
bfe29fd958 Fixes #12847 - Include Missing Add buttons to Views
Signed-off-by: Sudheesh Singanamalla <sudheesh@cs.washington.edu>
2023-06-14 10:05:43 -07:00
Abhimanyu Saharan
d940797df9 Adds contact tabs (#12460)
* adds contact tabs #11599

* fixed lint issues

* changes as per review

* changes as per review

* replaces generic object template with base template
2023-05-12 10:26:26 -04:00
kkthxbye-code
3a54e66620 Fix the filtervar being set to site_id instead of site in SiteView related_models 2023-05-01 07:15:00 +02:00
jeremystretch
d669251679 Merge branch 'develop' into feature 2023-04-26 15:09:51 -04:00
PieterL75
c11bd52cf0 Fixes #10987: Show rack-list dropdown in rack (#11779)
* Intial. 2 ways the racknavigation displayed

* show active rack in dropdown

* auto hide/show when viewport reduces

* Dropdown only

* Update links to use get_absolute_url()

---------

Co-authored-by: Pieter Lambrecht <pieter.lambrecht@sentia.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-24 12:01:33 -04:00
jeremystretch
c9a427a442 Closes #12187: Add button to download rendered config from UI 2023-04-17 16:37:02 -04:00
jeremystretch
f039d36522 Merge branch 'develop' into feature 2023-04-07 13:00:00 -04:00
jeremystretch
b57dae8fc8 Fixes #12184: Fix filtered bulk deletion for various models 2023-04-07 10:25:36 -04:00
jeremystretch
e8325cb64f Fixes #12144: Ensure consistent treatment of context data when rendering config templates via UI & API 2023-04-03 09:50:07 -04:00
jeremystretch
e672146a43 #11559: Add device config API endpoint & cleanup 2023-03-21 17:00:06 -04:00
Jeremy Stretch
20ef576da6 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
Arthur Hanson
eb923e080e 10520 remove Napalm code references (#11768)
* 10520 remove all Napalm code references

* 10520 remove lldp

* 10520 remove config, status - rebuild js

* 10520 re-add config parameters

* 10520 re-add serializer

* 10520 update docs
2023-02-24 15:38:50 -05:00
Jeremy Stretch
86690d83a1 Closes #11559: Implement config template rendering (#11769)
* WIP

* Add config_template field to Device

* Pre-fetch referenced templates

* Correct up_to_date callable

* Add config_template FK to Device

* Update & merge migrations

* Add config_template FK to Platform

* Add tagging support for ConfigTemplate

* Catch exceptions when rendering device templates in UI

* Refactor ConfigTemplate.render()

* Add support for returning plain text content

* Add ConfigTemplate model documentation

* Add feature documentation for config rendering
2023-02-19 20:09:52 -05:00
jeremystretch
d68b11ac79 Move rack reservations panel to separate tab 2023-02-19 20:09:51 -05:00
jeremystretch
829a05d06e Use embedded table to show assigned services under object view 2023-02-19 20:09:51 -05:00
jeremystretch
e936a73f07 Standard related object links across all models 2023-02-19 20:09:51 -05:00
jeremystretch
e41c60b76a Standardize linking to related objects in tables 2023-02-19 20:09:51 -05:00
jeremystretch
a55945b97d Standardize related model display for organizational models 2023-02-19 20:09:51 -05:00
jeremystretch
1f41e04ffd Standardize related model display for nested models 2023-02-19 20:09:51 -05:00
jeremystretch
1e4953d340 Clean up related objects for sites, tenants 2023-02-19 20:09:51 -05:00
Jeremy Stretch
f603c1fb9e 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
3c291bed2f Closes #11598: Add buttons to easily switch between rack list and elevations views 2023-01-26 10:53:59 -05:00
jeremystretch
7da05a817c Closes #11554: Add module types count to manufacturers list 2023-01-26 08:46:25 -05:00
jeremystretch
2392bb2d3a Fixes #11528: Permit import of devices using uploaded file 2023-01-25 09:55:45 -05:00
Abhimanyu Saharan
359c0fc8fb 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
0fb1db6ed7 Fixes #11467: Correct count on interfaces tab when viewing a VC master device 2023-01-12 09:05:55 -05:00
kkthxbye
c5bc3dfc55 Snapshot DeviceBay before populating/depopulating. 2023-01-09 08:39:54 -05:00
kkthxbye
bf59fc9043 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
33bef86386 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
c8686a2c6a #7854: Misc cleanup 2022-12-12 12:34:05 -05:00
jeremystretch
dc8adb5bf3 #9072: Add weight parameter to influence ViewTab ordering 2022-12-09 14:50:13 -05:00
jeremystretch
c999b73314 Merge branch 'develop' into feature 2022-12-08 09:31:22 -05:00
Renato Almeida de Oliveira
6e58e4e5d1 add distinct method to circuit_count 2022-12-06 15:19:35 -05:00
jeremystretch
4bb8499ba2 Merge branch 'develop' into feature 2022-11-30 16:21:20 -05:00
jeremystretch
8794cd993b Annotate need for natural ordering 2022-11-30 15:33:01 -05:00
Arthur
a1da8e5149 11014 code review changes 2022-11-30 15:33:01 -05:00
Arthur
30e0911287 11014 fix rack elevation name sorting 2022-11-30 15:33:01 -05:00
kkthxbye-code
d19c57481d Check that device has a platform set before rendering napalm tab 2022-11-17 08:25:06 -05:00
jeremystretch
c4ca9e155f Document save_object() on BulkImportView 2022-11-16 08:47:45 -05:00
jeremystretch
e5f3ff8ff9 #4347: Rename NetBoxModelCSVForm to NetBoxModelImportForm 2022-11-15 12:24:57 -05:00
jeremystretch
ef75940cde Cleanup for #7854 2022-11-15 11:24:36 -05:00
Daniel Sheppard
e0e38c63cf 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
eab0451aa3 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
89786934dc #9072: Add hide_if_empty argument to ViewTab 2022-10-10 08:11:29 -04:00
jeremystretch
c042c7e166 Closes #10608: Register all core model views using register_model_view() 2022-10-07 17:17:58 -04:00
jeremystretch
95ac085bec Add device NAPALM view tabs 2022-10-07 14:17:18 -04:00
jeremystretch
21b9d38748 Replace active_tab context for object views 2022-10-07 12:14:19 -04:00
jeremystretch
0a8d83cec1 Wrap model detail views with register_model_view() 2022-10-07 11:36:14 -04:00
Arthur Hanson
200d295660 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
4c5ef573ea 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
a49f70a3dd Fixes #9497 - Change filter for sites/locations 2022-09-20 09:26:40 -05:00
Jeremy Stretch
cd0f4028cd 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
e49cdd34ba #9665 review changes 2022-09-01 11:15:23 -07:00
Arthur
e627e42395 #9665 review changes 2022-09-01 11:12:01 -07:00
Arthur
9441c1f5ae #9665 Rack Elevation Sorting Enhancements 2022-08-31 14:42:59 -07:00
Jeremy Stretch
338f2c552f Fixes #10087: Correct display of far end in console/power/interface connections tables (#10117) 2022-08-25 08:46:19 -04:00
jeremystretch
26573be4a5 Merge branch 'develop' into feature 2022-08-16 12:56:49 -04:00
Jeremy Stretch
5dcaa880e9 Merge pull request #9639 from cpund/8723-branch
PR for #8723
2022-08-16 09:10:24 -04:00
Craig Pund
be042f6d9d not necessary to prefetch 2022-08-11 15:16:01 -04:00
jeremystretch
151a09bb4b Merge branch 'develop' into feature 2022-08-08 15:39:03 -04:00
jeremystretch
0d285d9c03 Clean up usages of mark_safe() 2022-08-08 10:47:07 -04:00
jeremystretch
3593fcaa75 Closes #9896: Discontinue arbitrary use of OrderedDict 2022-08-01 16:51:44 -04:00
Kim Johansson
43b2ac4412 Remove deprecated usage of prefetch_related
Fixes #9699
2022-07-30 01:18:30 +02:00
sleepinggenius2
2a52cb2a04 Adds patterned_fields support for bulk components 2022-07-26 17:16:03 -04:00
Marek Zbroch
48c324b51e Typo fix in CableEditView 2022-07-16 09:42:01 +02:00
jeremystretch
58579d8bbc Merge branch 'develop' into feature 2022-07-11 12:58:24 -04:00
jeremystretch
88dcff2a58 Drop extraneous/invalid prefetches 2022-07-11 12:45:53 -04:00
Kim Johansson
6a191ab466 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
3500c3e173 Improve display of related objects in cables list 2022-07-08 13:33:43 -04:00
jeremystretch
0c5cb3069e Cleanup for #9102 2022-07-07 12:48:44 -04:00
Craig Pund
b5689ebaa8 add device bulk rename view and url 2022-06-30 01:38:38 -04:00
jeremystretch
d8ce0030e4 Merge branch 'feature' into 9102-cabling 2022-06-27 12:12:34 -04:00
jeremystretch
4702ca6e7a Closes #4434: Enable highlighting devices within rack elevations 2022-06-24 11:04:38 -04:00
jeremystretch
8a2d363b65 Merge branch 'feature' into 9102-cabling 2022-06-20 15:04:55 -04:00
jeremystretch
c4a9f4faab Fixes #9549: Fix device counts for rack list under rack role view 2022-06-17 14:40:37 -04:00
jeremystretch
9687fd1e1e Merge all cable creation URLs into a single view 2022-05-23 13:22:45 -04:00
jeremystretch
7f502e6122 Merge cable creation/edit views & forms 2022-05-20 16:53:23 -04:00
jeremystretch
485066ddc7 Tests cleanup 2022-05-13 16:29:19 -04:00
jeremystretch
fe36f58046 Test cleanup 2022-05-13 15:34:01 -04:00
jeremystretch
536edca5c3 Update connected_endpoint serializer field to support multiple objects 2022-05-13 11:04:38 -04:00
jeremystretch
15bf7d3012 Update Cable instantiations to match new signature 2022-05-13 09:33:00 -04:00
jeremystretch
19480d3d93 Migrate CablePath to use two-dimensional array 2022-05-12 16:08:44 -04:00
jeremystretch
466e3fc9d2 Restrict A terminations by parent object 2022-05-12 16:08:44 -04:00
jeremystretch
bfa895b2b8 Update cable connection forms 2022-05-12 16:08:44 -04:00
jeremystretch
5286e73c40 Introduce CableTermination model & migrate data 2022-05-12 16:08:44 -04:00
jeremystretch
e88403f8a4 Extend Cable model to support multiple A/B terminations 2022-05-12 16:08:44 -04:00
jeremystretch
f8648e82b4 Allow editing A side termination when creating cable 2022-05-12 16:08:44 -04:00
jeremystretch
f7d52fdf20 Remove termination IDs from cable creation view paths 2022-05-12 16:08:44 -04:00
jeremystretch
919b2a1565 Closes #9260: Apply user preferences to tables under object detail views 2022-05-04 15:46:13 -04:00
Jeremy Stretch
fd1a0f3043 Merge pull request #9067 from jasonyates/FR8920-nonrackeddevices
Limit amount of nonracked devices displayed
2022-04-12 11:38:14 -04:00
Jason Yates
3ef7f903d9 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
b2715c9136 Fixes #9055: Restore ability to move inventory item to other device 2022-04-08 09:41:37 -04:00
Jason Yates
8421d0864c 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
f9f958825e Closes #8973: Display VLAN group count under site view 2022-04-06 20:12:14 -04:00
Daniel Sheppard
159f803acc Fixes #9057 - Fix missing instance counts for module types 2022-04-06 13:46:31 -05:00
jeremystretch
2197315e3b Merge branch 'develop' into feature 2022-03-30 15:45:40 -04:00
Stephan Blanke
ea920136c7 Closes #8163: Add bridge members panel to interface view 2022-03-28 20:37:00 +02:00
jeremystretch
9b8787daa5 Fix cable creation view 2022-03-23 10:55:09 -04:00
jeremystretch
d2f388954d Merge branch 'develop' into feature 2022-03-22 12:57:23 -04:00