-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REVIEW] v1.4.0 Code Review #2046
Commits on Apr 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b81c64f - Browse repository at this point
Copy the full SHA b81c64fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c9da70 - Browse repository at this point
Copy the full SHA 5c9da70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95aba9a - Browse repository at this point
Copy the full SHA 95aba9aView commit details
Commits on Apr 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0ed5d4d - Browse repository at this point
Copy the full SHA 0ed5d4dView commit details
Commits on Apr 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 19fd4a8 - Browse repository at this point
Copy the full SHA 19fd4a8View commit details
Commits on May 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for dd7e49c - Browse repository at this point
Copy the full SHA dd7e49cView commit details
Commits on May 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 379a901 - Browse repository at this point
Copy the full SHA 379a901View commit details
Commits on May 20, 2022
-
Add Status field to Interface, VMInterface (#1753)
* Add status to interface and create interface_status data migration * add status StatusViewSetMixin to InterfaceViewSet * Update docs * Refactor Interface serializer to search for other status if active not found * create and implement versioned_serializer decorator * Update interface test case * Better status search handling in Interface serializer save method and BaseInterface save method * refactor Status get for Interface and VMInterface Serializers * Raise exception if interface status not found Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> Co-authored-by: Jathan McCollum <jathan@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for dc5c08e - Browse repository at this point
Copy the full SHA dc5c08eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a40b93f - Browse repository at this point
Copy the full SHA a40b93fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e9b5505 - Browse repository at this point
Copy the full SHA e9b5505View commit details
Commits on May 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 805047a - Browse repository at this point
Copy the full SHA 805047aView commit details
Commits on May 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ee5818f - Browse repository at this point
Copy the full SHA ee5818fView commit details -
* HTML dark mode toggle * Auto-detect system theme settings. Enable user override * Add new theme modal * Add dark mode support for GraphiQL page * Fix integration tests for theme * Add dark mode on admin page. Fix footer links
Configuration menu - View commit details
-
Copy full SHA for 61d43f9 - Browse repository at this point
Copy the full SHA 61d43f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2eb4a52 - Browse repository at this point
Copy the full SHA 2eb4a52View commit details
Commits on May 26, 2022
-
Reject unrecognized filter parameters in UI and API (#1736) (#1794)
* Reject unrecognized filter parameters in UI and API (#1736) * Update example_plugin; improve filterset tests * Add view test coverage for filtering capabilities; fix various view filtering gaps/bugs * Add STRICT_FILTERING settings option * Revised approach using a custom metaclass rather than requiring inheritance from BaseFilterSet.Meta * Apply suggestions from code review Co-authored-by: Jathan McCollum <jathan@gmail.com> * Add a few more magic query parameters * Alternate non-metaclass approach to BaseFilterSet, add testing around STRICT_FILTERING option * Various point fixes * Add release-note for #1736 * Improved test coverage Co-authored-by: Jathan McCollum <jathan@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6087627 - Browse repository at this point
Copy the full SHA 6087627View commit details -
Configuration menu - View commit details
-
Copy full SHA for 432437d - Browse repository at this point
Copy the full SHA 432437dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b2be16 - Browse repository at this point
Copy the full SHA 2b2be16View commit details
Commits on May 31, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c63eec2 - Browse repository at this point
Copy the full SHA c63eec2View commit details -
Physical Interfaces Parenting Virtual Interfaces (#1651)
* Add parent field to Interface - rename @Property parent to parent_object * Add parent field to devices Filter, Forms and Table - Replace parent with parent_object in relevant locations * Replace parent with parent_object in relevant files in templates * Create InterfaceSerializerVersion13 serializer - Apply InterfaceSerializerVersion13 to InterfaceViewSet * Add interface parent and lag filter test case * Extend parent to VM - Add parent field to VMInterface, VMInterfaceForm, VMInterfaceFilterSet, VMInterfaceTable - Modify vm templates accordingly * Implement VMInterfaceSerializer for api_version 1.3 * Add VMinterface migration * Add bridge to field to the dcim.Interfac model * Modify relevant testcase * Add bridge to relevant files - Modify TestCases to account for bridge - Modify interface.html add bridge to table * Account for bridge in versioned interface and vminterface serializers * black format * fix dcim.tests.test_view error * Update nautobot/dcim/forms.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * group lag together with parent and bridge * Remove InterfaceCSV Form __init__ * add bridge to InterfaceTypeChoices * Fix serializer * Make black happy * Merge vminterface migrations and change parent field to parent interface in migrations * Rename all occurrence of parent_objects to parent * Rename all occurrence of parent(not previously parent_object) to parent_interface * Limit choices for parent, bridge, and LAG interfaces to the assigned device on InterfaceCSVForm * Add extra query_params field for bridge in InterfaceCreateForm * Add bridge restriction in Interface.clean() * Update nautobot/virtualization/views.py Co-authored-by: Bryan Culver <31187+bryanculver@users.noreply.github.com> * rename parent to parent_interface * Additional restriction to InterfaceBulkEditForm * Add query_params type bridge to Interfaceforms to limit choices to only bridge interfaces * Limit InterfaceFilterSet type bridge/lag * Update interface filter test case * Update nautobot/dcim/models/device_components.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/virtualization/templates/virtualization/vminterface.html Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/constants.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/templates/dcim/interface.html Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/tests/test_filters.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * set interface_parent to delete cascade and add extra warning on UI * Remove redundant `display_field="display"` * remove notimplemented parent check on CableTermination * parent property added back to interface * place paren_interface validations together in Interface.clean() method * minor changes: add bridge add_query_params where relevant * Add virtual_chasis query filter to InterfaceCreateForm * remove [] from parent_interface query_params dict * add VC master filter to InterfaceBulkEditForm * remove irrelevant code * Implement vminterface children interface and add table to UI * Fix InterfaceCSVForm test error * Rename Bridge Interface (ID) to bridge interface in InterfaceFilterSet * Update nautobot/dcim/forms.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/filters.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/forms.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * remove bridge restriction to only type bridge * squash migrations * Add child_interfaces_table to interface view * add ability to search for interfaces with devices belonging to same virtual_chassis remove redundant device.virtual_chassis filter in InterfaceCreateForm and InterfaceForm * Update nautobot/dcim/models/device_components.py Co-authored-by: Bryan Culver <31187+bryanculver@users.noreply.github.com> * rename BaseInterface bridge related name to bridged interface * reorder Interface csv_headers items * Apply suggestions from code review Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Code review refactoring. Sorry not sorry. - `InterfaceFilterSet.device_with_common_vc` was changed from `MultiValueUUIDFilter` to `UUIDFilter` because the underlying method has no valid use-case for multiple device IDs. Further, it was possible to provide `device_id` from two devices NOT in the same VC - `VirtualChassis.member_interfaces` property added to provide a queryset of `Interface` objects common to all VC member devices. `InterfaceFilterSet.device_with_common_vc` now calls this method, improving readability/maintainability - `Interface.clean()` and `VMInterface.clean()` have been unified under `BaseInterface.clean()` and this method has been refactored for optimization of related queries - Added a `VMInterface.site_id` attribute for simplifying "interface" lookups during `clean()` * Reorder csv_headers of parent_interface and bridge * Revert class inheritance ordering changed due to CableTermination * use device_with_common_vc for parent_interface and bridge filtering instead of device_id * Update nautobot/dcim/models/device_components.py Co-authored-by: Bryan Culver <31187+bryanculver@users.noreply.github.com> * Update nautobot/dcim/models/device_components.py Co-authored-by: Bryan Culver <31187+bryanculver@users.noreply.github.com> * Update nautobot/dcim/models/device_components.py Co-authored-by: Bryan Culver <31187+bryanculver@users.noreply.github.com> * Add test case for device_with_common_vc filter * Rename label Bridged Interface to Bridge Interface * Safer parent.virtual_chassis null check for Interfaces * replace .device with .parent since parent property returns self.device * Add test_case for InterfaceCSVForm * remove irrelevant config * revert moving Interface specific clean logic to BaseInterface * add interface API test case testing for vc or device * add available_on_device to vlanfilter set to filter for vlans ti specified device * merge next into dev * add merge * reorder new dcim and virtualization imports * add label to available_on_device * use UUIDFilter instead of ModelChoiceFilter for available_on_device field * add help text * rerun flake8 * Update nautobot/dcim/tests/test_api.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/tests/test_api.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/tests/test_forms.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/tests/test_forms.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/dcim/tests/test_api.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * exclude non-physical interface from parent filter in InterfaceCSVForm Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> Co-authored-by: Bryan Culver <bryan.culver@networktocode.com> Co-authored-by: Bryan Culver <31187+bryanculver@users.noreply.github.com> Co-authored-by: Jathan McCollum <jathan@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 80cf286 - Browse repository at this point
Copy the full SHA 80cf286View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86e3eb9 - Browse repository at this point
Copy the full SHA 86e3eb9View commit details
Commits on Jun 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5c42d82 - Browse repository at this point
Copy the full SHA 5c42d82View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89fbf1f - Browse repository at this point
Copy the full SHA 89fbf1fView commit details -
Rackview UI Add Option to Truncate Device Name (#1824)
* Users can now toggle device full name and truncated name in the rack elevation view * Truncating function is customizable in nautobot_config.py via defining UI_RACK_VIEW_TRUNCATE_FUNCTION * Default behavior is to split on . and return the first item in the list * "Save SVG" link presents the same view as what is currently displayed on screen * Current preferred toggle state is preserved across tabs (requires refresh) and persists in-browser until local storage is cleared * This presents a consistent behavior when browsing between multiple racks Co-authored-by: Josh VanDeraa <jv@networktocode.com> Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for 65d26cd - Browse repository at this point
Copy the full SHA 65d26cdView commit details
Commits on Jun 6, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ab33fee - Browse repository at this point
Copy the full SHA ab33feeView commit details
Commits on Jun 7, 2022
-
Add parent interface and bridge to interface serializer v1.4 (#1834)
* Add parent interface and bridge to interface serializer v14 * refactor interface fields * refactor test
Configuration menu - View commit details
-
Copy full SHA for bba0cf3 - Browse repository at this point
Copy the full SHA bba0cf3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce4cb8e - Browse repository at this point
Copy the full SHA ce4cb8eView commit details
Commits on Jun 8, 2022
-
Marked possible index opportunities so far (#1793)
* Marked possible index opportunities so far * Added Meta.indexes and Meta.constraints as discussed * Finished up marking certain field as needs profiling and added new constraint and migration as discussed
Configuration menu - View commit details
-
Copy full SHA for f0c111b - Browse repository at this point
Copy the full SHA f0c111bView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa5cd1b - Browse repository at this point
Copy the full SHA aa5cd1bView commit details
Commits on Jun 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4419ddd - Browse repository at this point
Copy the full SHA 4419dddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 232b859 - Browse repository at this point
Copy the full SHA 232b859View commit details -
Configuration menu - View commit details
-
Copy full SHA for 43b8511 - Browse repository at this point
Copy the full SHA 43b8511View commit details
Commits on Jun 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 076a6d8 - Browse repository at this point
Copy the full SHA 076a6d8View commit details
Commits on Jun 16, 2022
-
Plugin extra object detail tabs (#1843)
* Basic working draft WIP * black * flake8 * Test Fix * newlines at end of html files * Created computation for plugin tab namespacing for the UI * Tidied up computation for plugin tab namespacing for the UI * Example tab view now inheriting generic.ObjectView as discussed. active_tab now set in generic.ObjectView.get_extra_context * Modified titles of example tabs * Update nautobot/extras/templatetags/plugins.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * PR suggestions * black * Last of the implementation detail * docstring correction * Integration tests * flake8 * Passing down all context from plugins.plugin_object_detail_tabs * black * Refactored and tidied the code. Added draft docs * Added release note * Correction * Update examples/example_plugin/example_plugin/views.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Basic working draft WIP * black * flake8 * Test Fix * newlines at end of html files * Created computation for plugin tab namespacing for the UI * Tidied up computation for plugin tab namespacing for the UI * Example tab view now inheriting generic.ObjectView as discussed. active_tab now set in generic.ObjectView.get_extra_context * Modified titles of example tabs * Update nautobot/extras/templatetags/plugins.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * PR suggestions * black * Last of the implementation detail * docstring correction * Integration tests * flake8 * Passing down all context from plugins.plugin_object_detail_tabs * black * Refactored and tidied the code. Added draft docs * Added release note * Correction * Update examples/example_plugin/example_plugin/urls.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * black * Added url naming recommendation * linter fix * linter fix * Update examples/example_plugin/example_plugin/template_content.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/docs/plugins/development.md Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update examples/example_plugin/example_plugin/template_content.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update examples/example_plugin/example_plugin/template_content.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update nautobot/docs/plugins/development.md Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update examples/example_plugin/example_plugin/template_content.py Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Removed erroneous text * PR suggestions * PR nits * fix * black Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for 7708400 - Browse repository at this point
Copy the full SHA 7708400View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26d05ae - Browse repository at this point
Copy the full SHA 26d05aeView commit details -
Relationship detail view (#1894)
* Resolves #1893 * moving to slug over pk
Configuration menu - View commit details
-
Copy full SHA for 17e439b - Browse repository at this point
Copy the full SHA 17e439bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a36ed89 - Browse repository at this point
Copy the full SHA a36ed89View commit details
Commits on Jun 17, 2022
-
Update dependency Markdown to ~3.3.7 (#1908)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 86ffe5c - Browse repository at this point
Copy the full SHA 86ffe5cView commit details -
Update dependency MarkupSafe to ~2.1.1 (#1909)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d852288 - Browse repository at this point
Copy the full SHA d852288View commit details -
Update dependency celery to ~5.2.7 (#1912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 120ca65 - Browse repository at this point
Copy the full SHA 120ca65View commit details -
Update dependency django-jinja to ~2.10.2 (#1913)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d4f5299 - Browse repository at this point
Copy the full SHA d4f5299View commit details
Commits on Jun 18, 2022
-
Update dependency svgwrite to ~1.4.2 (#1917)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 0754865 - Browse repository at this point
Copy the full SHA 0754865View commit details
Commits on Jun 19, 2022
-
Update dependency django-debug-toolbar to ~3.4.0 (#1925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 9ee1a9d - Browse repository at this point
Copy the full SHA 9ee1a9dView commit details -
Update dependency django-cors-headers to ~3.13.0 (#1924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for cc6a167 - Browse repository at this point
Copy the full SHA cc6a167View commit details
Commits on Jun 20, 2022
-
Update dependency django-auth-ldap to ~4.1.0 (#1921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 9d53ee6 - Browse repository at this point
Copy the full SHA 9d53ee6View commit details -
Update dependency coverage to ~6.4.1 (#1920)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 5e02620 - Browse repository at this point
Copy the full SHA 5e02620View commit details -
Update dependency Pillow to ~9.1.1 (#1919)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2dcfc7f - Browse repository at this point
Copy the full SHA 2dcfc7fView commit details -
Update dependency napalm to ~3.4.1 (#1928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a5afdb8 - Browse repository at this point
Copy the full SHA a5afdb8View commit details -
Update dependency selenium to ~4.2.0 (#1929)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a3b183b - Browse repository at this point
Copy the full SHA a3b183bView commit details -
Update dependency invoke to ~1.7.1 (#1915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 62a7fde - Browse repository at this point
Copy the full SHA 62a7fdeView commit details
Commits on Jun 22, 2022
-
Add missing model fields to DCIM filter sets (#1853)
Add 103 filters to dcim.filters. Add new filter SlugOrPKMultipleChoiceFilter
Configuration menu - View commit details
-
Copy full SHA for 19863f9 - Browse repository at this point
Copy the full SHA 19863f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 943af07 - Browse repository at this point
Copy the full SHA 943af07View commit details
Commits on Jun 23, 2022
-
Fix #1898 - Browsable API is now styled like the rest of the app (#1899)
* Fix #1898 - Browsable API is now styled like the rest of the app - The entry for `rest_framework` within `nautobot.core.settings.INSTALLED_APPS` was moved below `nautobot.core` so that the template can be properly overloaded - Three new include templates in `nautobot/core/templates/inc` have been added and `base.html` has been updated to include these templates - `footer.html` - The `<footer>` tag from `base.html` - `javascript.html` - The `<script>` tags from `base.html` - `media.html` - The `<link>` and `<meta>` header tags from `base.html` - Finally, `nautobot/core/templates/rest_framework/api.html` has been updated to include the same templates to assert uniform UI for the browsable API.
Configuration menu - View commit details
-
Copy full SHA for 93df143 - Browse repository at this point
Copy the full SHA 93df143View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37175c9 - Browse repository at this point
Copy the full SHA 37175c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5847c07 - Browse repository at this point
Copy the full SHA 5847c07View commit details
Commits on Jun 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for db153ef - Browse repository at this point
Copy the full SHA db153efView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc5a826 - Browse repository at this point
Copy the full SHA cc5a826View commit details
Commits on Jun 27, 2022
-
Merge branch 'develop' into next
* Renamed config context migration due to numbered conflict from `develop` * Addressed conflict from tests migrated in
Configuration menu - View commit details
-
Copy full SHA for db8ce7e - Browse repository at this point
Copy the full SHA db8ce7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4576532 - Browse repository at this point
Copy the full SHA 4576532View commit details
Commits on Jun 28, 2022
-
Update dependency splinter to ~0.18.0 (#1932)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2dd4378 - Browse repository at this point
Copy the full SHA 2dd4378View commit details -
Update dependency selenium to ~4.3.0 (#1955)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for eda4157 - Browse repository at this point
Copy the full SHA eda4157View commit details
Commits on Jun 29, 2022
-
Update dependency splinter to v0.18.1 (#1975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for cc0d0a7 - Browse repository at this point
Copy the full SHA cc0d0a7View commit details
Commits on Jul 1, 2022
-
Prototype Locations implementation (#1891)
* Initial proof-of-concept, incomplete * Use django-tree-queries for underlying tree logic * Refinements * Lots of filter/form/template updates * More fixes * Regenerate migrations, lots of cleanup * Add default status choices, fixup tree_depth * Refinements to Location detail template * More UI refinement * Add location columns to various tables * Create location_hierarchy include file * Schema fixes * Add location to model serializers, add location support to PowerPanel * Fixes for tests * Fix TreeNodeMultipleChoiceFilter handling of mixed inputs * Add filterset and form mixins to reduce boilerplate * Code review nit * Add tenant, _name, images to Location model * Black * Add a few REST API tests and fix some issues uncovered along the way * Filter updates and filter tests * Add model test cases * Add view test cases and fix accordingly * First pass at documentation * Add explicit field_name and to_field_name back to site filter * Rework location slug generation; enhance UI to allow slug calculation from multiple fields * Fix js * More enhancements around filtering - Replace leftover location-related SlugOrPKMultipleChoiceFilter references with NaturalKeyOrPKMultipleChoiceFilter - TreeNodeMultipleChoiceFilter is now a subclass of NaturalKeyOrPKMultipleChoiceFilter, supporting both slug and ID - Needs test updates to exercise this functionality in depth though - Implement NaturalKeyOrPKMultipleChoiceFilter.get_filter_predicate() to use the natural key in the predicate - Change MultiMatchModelMultipleChoiceField to get its natural key from `to_field_name` since that's needed anyway for fields using a field other than `slug`. - Set default `lookup_expr` on TreeNodeMultipleChoiceFilter to "in" as it doesn't work well otherwise - Remove separate `location_id` filters, as `location` can now filter by ID as well as slug * Add content-type enforcement for CircuitTermination models, add tests * Add content-type enforcement for Device location, add tests * Add content-type enforcement for PowerPanel,Rack,RackGroup; add tests * Add location content-type enforcement and tests for Prefix, VLANGroup, VLAN * Fix some tests to account for validation * Fix tests? * Add location content-type enforcement and tests for Cluster * Sort content-types in detail view * Fix filtering of LocationTypes * Add location hierarchy to circuit-termination display * Update nautobot/circuits/models.py * Add content-types list to LocationType CSV export * Add tests for location usage in ConfigContext * Reserve certain LocationType names for future use, add testing * Prevent changing the location_type of an existing Location * Update location-type change logic * Another fix for non-changeable location type
Configuration menu - View commit details
-
Copy full SHA for bb3f35c - Browse repository at this point
Copy the full SHA bb3f35cView commit details -
Configuration menu - View commit details
-
Copy full SHA for cd8a58e - Browse repository at this point
Copy the full SHA cd8a58eView commit details
Commits on Jul 7, 2022
-
Create TestCaseMixin for Helper Functions Across All Test Case Bases (#…
…1954) * Create TestCaseMixin so that TestCase and TransactionTestCase have access to the same helper functions. * Switch to get_or_create user for TransactionTestCase. * Switch all tests that use TransactionTestCase, to use the user built-in the TransactionTestCase. * Initialize baseclass for Git Test. * Remove duplicated code by adding a setUpNautobot function. * Change testuser to nautobotuser.
Configuration menu - View commit details
-
Copy full SHA for 2fbe298 - Browse repository at this point
Copy the full SHA 2fbe298View commit details
Commits on Jul 8, 2022
-
Add missing filters to DCIM FilterSets (2nd round) (#1981)
* Add missing Manufacturer filters * Add missing CableTermination filters * Add missing Interface filters * Add missing InventoryItem filters * Add missing VirtualChassis filters * Add missing Cable filters * Add missing PowerPanel filters * Add missing PowerFeed filters * Fix incorrect DCIM filters * Add `cable_terminations` to the `model_features` registry * Update `NaturalKeyOrPKMultipleChoiceFilter` to support `to_field_name` argument * Update `TreeNodeMultipleChoiceFilter` to subclass `NaturalKeyOrPKMultipleChoiceFilter`
Configuration menu - View commit details
-
Copy full SHA for 07b2d6c - Browse repository at this point
Copy the full SHA 07b2d6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 571fff3 - Browse repository at this point
Copy the full SHA 571fff3View commit details
Commits on Jul 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e512db3 - Browse repository at this point
Copy the full SHA e512db3View commit details
Commits on Jul 12, 2022
-
Bulk-edit Support for Associated Relationships (#2014)
* First mostly working implementation for DeviceBulkEditForm * Create NautobotBulkEditForm base class and use it throughout * Reduce logging verbosity * Update nautobot/extras/forms.py
Configuration menu - View commit details
-
Copy full SHA for d602f8e - Browse repository at this point
Copy the full SHA d602f8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 14eaf7c - Browse repository at this point
Copy the full SHA 14eaf7cView commit details -
Fix #1945: Remove registry from default template context, provide tem…
…plate tag to access it as needed (#2017)
Configuration menu - View commit details
-
Copy full SHA for b0150b6 - Browse repository at this point
Copy the full SHA b0150b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a413b14 - Browse repository at this point
Copy the full SHA a413b14View commit details -
Fix merge from develop breaking build in next. (#2037)
* Location added to CSV export which was tested for in develop bugfix.
Configuration menu - View commit details
-
Copy full SHA for 549096c - Browse repository at this point
Copy the full SHA 549096cView commit details -
Add Plugin Ability to Override Views (Core and Plugin) (#1957)
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for 7ee6c00 - Browse repository at this point
Copy the full SHA 7ee6c00View commit details -
Configuration menu - View commit details
-
Copy full SHA for b610589 - Browse repository at this point
Copy the full SHA b610589View commit details -
Update object change context manager to be aware of the change source (…
…#2035) * Add new fields to ObjectChange model (change_context, change_context_detail) * Add ObjectChangeEventContextChoices to nautobot.extras.choices for ObjectChange.change_context field choices * Update objectchange template to add change_context and change_context_detail to the object detail view * Add new ChangeContext class to be used as input to the change_logging context manager * Add ChangeContext convenience subclasses for: JobChangeContext, WebChangeContext, ORMChangeContext * Update web_request_context context manager to use ORMChangeContext * Update run_job to use JobChangeContext * Update handle_changed_object and handle_deleted_object signals to use ChangeContext instead of a WSGIRequest
Configuration menu - View commit details
-
Copy full SHA for 2900c79 - Browse repository at this point
Copy the full SHA 2900c79View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4ea3cd - Browse repository at this point
Copy the full SHA d4ea3cdView commit details
Commits on Jul 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 716460d - Browse repository at this point
Copy the full SHA 716460dView commit details -
Add Support for Custom JS/CSS on Job Schedule Form (#1866)
* Update views.py * Create example_with_custom_template.html Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for 31c0405 - Browse repository at this point
Copy the full SHA 31c0405View commit details -
Add Missing Model Fields to Virtualization Filter Sets (#1938)
* Add missing model fields to filterset * done with ClusterFilterSet * done with ClusterTypeFilterSet * done with ClusterGroupFilterSet * done with VirtualMachineFilterSet * done with VMInterfaceFilterSet * use ModelMultipleChoiceFilter inplace of MultiValueCharFilter for tagged and untagged vlan * fix vid not working as a natural_key field * Use NaturalKeyOrPKMultipleChoiceFilter in place of ModelMultipleChoiceFilter Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 27e7f61 - Browse repository at this point
Copy the full SHA 27e7f61View commit details -
Configuration menu - View commit details
-
Copy full SHA for b34dbb3 - Browse repository at this point
Copy the full SHA b34dbb3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 927432f - Browse repository at this point
Copy the full SHA 927432fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 753087e - Browse repository at this point
Copy the full SHA 753087eView commit details
Commits on Jul 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8a6df7f - Browse repository at this point
Copy the full SHA 8a6df7fView commit details -
Add get_changelog_url Method to Objects that Support Changelogs (#2049)
* Add get_changelog_url method to objects that support it. * Check before use get_changelog_url, remove unused subclass code, incorperate feedback.
Configuration menu - View commit details
-
Copy full SHA for 23ff79f - Browse repository at this point
Copy the full SHA 23ff79fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ab5be1 - Browse repository at this point
Copy the full SHA 0ab5be1View commit details -
[MVP] Dynamic Groups of Groups (#1785)
* Begin prototyping of m2m filters for DynamicGroup * Added schema migration and intermediate model * Got it working with dual-use intermediate Model - DynamicGroupMembership now has `parent_group` field - `DynamicGroup` now has 2x m2m: - filters: through_fields = parent_group, filter - groups: through_fields = parent_group, group - Doesn't quite work but saving this commit for comparison. * Actually got it all working using `DynamicGroup.process_group_filters()` - Except that it only works with a single group right now and its member groups - Recursion needed to handle groups of groups of groups of groups etc. - `SavedFilter` now seems to have little value and we can just align around `DynamicGroup.group` to be m2m w/ a through - Need to also see if this means that the proxy model can be gotten rid of. * Got it totally working but still needs a lot of work and cleanup - `DynamicGroup.get_queryset()` now fails open (returns unfiltered queryset) - Got rid of `DynamicGroupFilteringMixin` back to `DynamicGroup` - Got rid of proxy objects - Got rid of `DeviceGroup.filters` m2m - Got rid of `SavedFilter` - It's all built around `DynamicGroup.process_group_filters()` at this moment which knows how to process groups of groups of groups of groups recursively Still unsolved - if a DynamicGroup has child groups, its own `filter` is used as a part of `self.get_queryset()` which is the baseline - no UI - no testing - no API - Solving for groups of groups w/ weight in UI will be challenging * Got reversible queries working for groups of groups. - Limited and untested obviously. - No longer relying on set/union/difference database operations that dead-end filtering and instead using `Q` object construction to use for filtering * Fix Black and apply Glenn's suggestion. * Got basic UI working - Implemented tree methods (parents/children/descendants/ancestors/siblings/is_leaf) - Migrated `DynamicGroupOperatorChoices` to a subclass of `ChoiceSet` in `extras.choices` - Added sub signal to handled m2m_changed but it's not working as expected; will likely remove it. - UI code for Dynamic Group edit enhanced to support adding child groups. Still needs refinement, but it does technically work. * Emphasis on detail and edit UI views - The tree methods for ancestors/descendants now returns a list for the time being so that the ordering of related groups is preserved - Print statements turned into debugs - Mirrored some properties/methods from the `DynamicGroupMembership.group` object to the `DynamicGroupMembership` object itself to ease providing intuitive UI - This includes `name`, `members`, `count`, `get_absolute_url`, and `get_group_members_url` - New method `DynamicGroup.get_group_queryset()` to return the aggregate list of members for a given group after all filters/descendant groups have been processed - Introduced a `DynamicGroupMembershipFormSet` that is now used in edit view to add dynamic groups as children including their `operator` and `weight` - Introduced a `NestedDynamicGroupTable` to display nested descendant groups with dots for heirarchy (similar to `Prefix` list view or other tree-type objects) - The edit form now has tabs for "Filter Fields" or "Child Groups". These are meant to be mutually exclusive but that is not yet enforced so it's entirely possible to create wild groups that are non-intuitive. There is also not yet any loop detection (such as if a leaf node as added as a parent to its own parent). - Detail view now shows children, descendants, and ancestors in the left pane - Enhanced `utilities/obj_table.html` to take an optional `no_paginate=True` argument to disable pagination when it is not desired (such as rendering related groups inline) * Update `limit_choices_to` to not be a `lambda` since that can't be serialized for migrations. * Hotfix migrations to fix tree thing. * Add natural keys to DG and DGM models * Squash migrations to address merge conflict and get tests working. * Revert change to nautobot/ipam/tables.py to fix integration tests * Fix things from PR feedback. - `DynamicGroup.get_siblings()` now actually correct - `DynamicGroupMembership.save()` removed - Added `{{ block.super }}` to javascript block in edit template * Fixed formset rendering/style issues when adding extra rows - Got rid of `limit_choices_to` on `DynamicGroupMembership.group` because it wasn't working as intended - Introduced a new `DynamicGroupMembershipFormSetForm` (with a wonderfully explicit name) to use a `DynamicModelChoiceField` so the `group` field is always filtered by the `content_type` of the `parent_group` - Revised `DynamicGroupForm` to use a `CSVContentTypeField` so that it uses the `app_label.model` pattern vs. `pk` - Fix #1785: Style when adding a dynamic row will now be asserted by patching `js/forms.js` to be a `jsify_form` function (credit to @bryanculver) and having `jquery.formset.js::added call it on row add - Edit templates for `DynamicGroup`, `CustomField`, and `SecretsGroup` have all been updated to make this call - Added `networkx==2.6.3` as a dependency for forthcoming DAG work for managing and detecting loops in the graph hierarchy for nested descendant groups. * Implement graph generation w/ loop detection. - Not quite right yet. Adding a parent to a nested child group results in an infinite loop when the graph generation is called. The core functionality DOES work so long as there isn't a loop. * Actually got loop detection and prevention working. It's ugly right now, but it works. * Solidify graph management methods/functions and update UI to use graph hierarchy - All but obviate the need for NetworkX at this time, which is now only being used in `DynamicGroup.get_graph()` - Loop detection is now performed by way of asserting that the new child is not in the list of ancestors for the would-be parent - An additional self-child check was also added to assert that a parent node cannot be added as its own child - Doctsring added to all methods. - New properties/methods: - `add_child()` and `remove_child()` to provided a clean model interface to manage child groups - `ancestors/descendants` properties that return ordered querysets based on the graph topology - `(ancestors|descendants)_tree()` that returns a recursive tree mapping of graph hiearchy - `flatten_tree()` that takes a tree mapping and returns a list and adds a `depth` attribute to instances - `is_root()` to assert that a group has children but no parents. - `NestedDynamicGroupTable` has been replaced with `NestedDynamicGroupDescendantsTable` and `NestedDynamicGroupAncestorsTable` that will each display nested hiearchy in the correct direction. Personally I would rather revert back to a single table that takes a "direction" argument of some sort - The flattened graph hierarchy is now included in the detail view template context so that it can be used to visualize nested relationships - `CSVContentTypeField` was enhanced to support integer-based values so that it can be used on model forms in concert with `DynamicModelChoiceField` API `query_params` to filter by `content_type` * Make `DynamicGroupForm.group` required * PR comments. * Fix merge conflict `next` * Remove the need for networkx. * Remove NetworkX. If we need it we can add it back. * Fix integration tests for DynamicGroups - Also map VNC port for Selenium container (5900/tcp) to 15900/tcp on host * Introduce `extra_tab_content` to `generic/object_detail.html` template - Extended `dynamigroup.html` dettail template to move group members to their own nav tab - And moved graph membership/hiearchy to full width panel * Implemented updated unit tests and did some cleanup. - Revamping existing test fixtures for expanded use-cases - Cleaned up unneeded signals - Add action buttons to list view tables for descendants/ancestors members in DynamicGroup detail view - Converted `DynamicGroup.generate_query_for_filter()` and `DynamicGroup.generate_query_for_group()` from instancemethods into classmethods. * Fix and rename migrations for DG/DGM. * Rename template variable for disabling pagination to `disable_pagination` * Add some more unit tests for graph hiearchy - Also revised `DynamicGroup.get_siblings()` to exclude `self` * Wrap up testing and fix a major bug that was of course caught by testing. - Had to refactor the way group filtering was generated. - `DynamicGroup.generate_query()` has replaced `DynamicGroup.process_group_filters()` and now returns a `Q` object for the entire group and its nested child groups - `DynamicGroup.get_group_queryset()` now just calls `generate_query()` to return an actual queryset that can be used for filtering * Make flake8 happy, as one does. * Addressing PR feedback and squashing some bugs - Renamed migration to 0037 and moved constraints to `unique_together` because MySQL - Converted `DynamicGroup.generate_query_for_filter()` and `generate_query_for_group()` back to instancemethods - Fixed a bug (and extended unit tests) when calling `generate_query_for_filter()` on a non-multi-value filter (aka single filter) - `DynamicGroup.generate_query()` no longer takes an argument. It now also checks if a group has members and if not just generates a solo query - All `print()` calls moved to `logger.debug()` - Got rid of `TODO` comments as they are obviated. - Greatly expanded docstrings and comments in some "tough" blocks of code in `DynamicGroup._ordered_filter()` * Make black happy, as one does. * Address PR feedback. - Moved block `extra_tab_content` before "Dynamic Groups" tab to assert consistency with nav tabs inside of `generic/object_detail.html` template.. - Refactored `get_(ancestors|descendants)()` to not take a list as an argument and instead just extend the list internally when making recursively nested calls - Refactored and renamed the `ancestors/descendants` from properties into methods that are named `get_foo_queryset()` to incidate that they are potentially expensive calls and to make their naming more explicit - Improved docstrings for `(ancestors|descendants)_tree()` methods * Fix failing tests related to "not a valid UUID" error. - Root cause was `NaturalKeyOrPkMultipleChoiceFilter.get_filter_predicate()` not utilizing `to_field_name` correctly on non-pk fields. - This method has been expanded to do a type check on whether the incoming value is a model instance or a UUID and act accordingly and will fallback to generating a filter expression if the value is of any other non-null type based on the value of `to_field_name`. - Unit test coverage also expanded for the three valid incoming value types: instance, pk, or "natural key" (aka non-null value) * Adapt `NaturalKeyOrPkMultipleChoiceFilter.get_filter_predicate()` to account for list-type values * Revise `DynamicGroup.generate_query()` to be more correct w/ verbose commenting - Set operation logic now factored into its own method `DynamicGroup.perform_membership_set_operation()` - `DynamicGroup.generate_query()` now calls `perform_membership_set_operation()` when iterating over memberships - `DynamicGroup.generate_members_query()` now also calls `perform_membership_set_operation()` but the two methods are not yet ready to merge, because of the conditional check for whether a group's `filter` is set, which was the underlying issue that required the refactor of how group membership filtering is processed. - The end result, however, is that both direct members and nested members are using the same set operation filtering logic vs. assuming that they should be `&=` (set intersection/boolean AND) together. - Docstrings and commenting expanded to make the complicated `Q` object generation easier to follow. - `DynamicGroup.generate_query_for_filter()` was enhanced to account for `ModelChoiceFilter` instances where `to_field_name` may possibly be set. * Renumber migration file for upstream changes. * Enhanced detail view tables for related groups. - Added `slug` and `filter` properties to `DynamicGroupMembership` intermediate model to simplify passthrough access of those attributes from the `DynamicGroupMembership.group` instance - Implemented a `DynamicGroupMembershipTable` to be used for rendering a hybrid of `DynamicGroup` and `DynamicGroupMembership` of descendant groups from a parent group, including a more robust display of the `filter` field to improve human-readability - Added group object members count as a badge on the nav tab for the "Members" in a Dynamic Group's detail view and removed the children table since it is redundant with descendants - Streamlined the `DynamicGroupView` code for handling the ancestors/descendants table construction * Break `flatten_tree()` into distinct methods for ancestors/descendants - `DynamicGroup.flatten_tree()` has been renamed to `_flatten_tree()` to indicate it is now a private method. - Added distinct `flatten_ancestors_tree()` and `flatten_descendants_tree()` respectively to call `_flatten_tree()` with the correct arguments to avoid any potential confusion - Broke out the unit tests to test each method discretely. * Add the raw Q object to the object detail view in its own panel.
Configuration menu - View commit details
-
Copy full SHA for 0bf77a4 - Browse repository at this point
Copy the full SHA 0bf77a4View commit details
Commits on Jul 19, 2022
-
Dynamic Group of Groups: Add draggable child groups, recompute and hi…
…de weight. (#2061) * Add draggable child groups, recompute and hide weight. * Ensure we always reset val in case a row had values but doesn't anymore. * Document reweighting function more
Configuration menu - View commit details
-
Copy full SHA for fc9b149 - Browse repository at this point
Copy the full SHA fc9b149View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8958bc3 - Browse repository at this point
Copy the full SHA 8958bc3View commit details
Commits on Jul 20, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b19e85b - Browse repository at this point
Copy the full SHA b19e85bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61b2aa6 - Browse repository at this point
Copy the full SHA 61b2aa6View commit details
Commits on Jul 21, 2022
-
Co-authored-by: Dan Bridson <briddo@gmaiil.com>
Configuration menu - View commit details
-
Copy full SHA for 5961291 - Browse repository at this point
Copy the full SHA 5961291View commit details -
Store
job_kwargs
on JobResult Model, Add "Re-run" Button on Job Res……ult List View (#1872) - Allow `_commit` checkbox initial value to be set from request params like any other form field - Discard `request` and `commit` keys before saving job_kwargs - Instead of trying to urlencode the job_kwargs, point to the "source" JobResult by PK and let the view handle it - Make `extras/jobresult.html` use the generic/object_detail.html template more standardsly. - Add job_kwargs display to the "Additional Data" tab. - Allow the various standard buttons on generic/object_detail.html to fail gracefully if relevant views don't exist (needed because there is no JobResultEditView) - Remove urlencode_dict templatetag helper as it's no longer needed/used at this time - JobResult create/update API endpoints shouldn't exist, and weren't working anyway; I removed them from the ViewSet. - extras.tests.test_api.JobResultTest was only testing "delete" API endpoint for JobResults, and with bespoke code. - Change it to inherit from the base GetObjectViewTestCase,ListObjectsViewTestCase,DeleteObjectViewTestCase classes - Add appropriate class variables and setUpTestData() implementation - ListObjectsViewTestCase.test_options_objects_returns_display_and_value and test_options_returns_expected_choices were failing for JobResultTest; it doesn't have create/update endpoints and so there are no PUT/PATCH actions on it - It doesn't make sense for these to be ListObjectsViewTestCase tests, so I moved them to UpdateObjectViewTestCase. - This let me remove a couple of test overrides from other extras.test_api tests that also were hitting this issue. * Ensure that commit flag is respected on rerun, remove redundant refresh_from_db() call * Add check for job_kwargs correctness in test_api.py; add job_kwargs to run_job_for_testing * Docs and release-notes * Replace _get_viewname() with get_route_for_model() Co-authored-by: Bryan Culver <bryan.culver@networktocode.com> Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for 35c028c - Browse repository at this point
Copy the full SHA 35c028cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 68bf0d3 - Browse repository at this point
Copy the full SHA 68bf0d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5382141 - Browse repository at this point
Copy the full SHA 5382141View commit details
Commits on Jul 25, 2022
-
Add Relationship Filtering to Relationship-Capable Model FilterSets, …
…Forms (#2012) * added prototype relationship filterset * relationship filter functional, need to clean up code, filter() function for relationshipfilter needs change * made relationshipfilterset functional * use relationship source_label and destination_label first and then slug to configure relationshipfilterset form fields * clean up and return model.objects.all() instead model.objects.filter() in filterform dropdowns/APISelect * commit to save changes: made adjustment to RelationshipFilterForm/FilterSet for both sides of the relationship * modified code to pass CI tests * added NautobotFilterForm(Bootstrapmixin, CustomFieldFilterForm, RelationshipModelFilterForm), Change FilterForms to use NauotbotFilterForm, added RelationshipModelFilterSet to NautobotFilterSet inheritance * modified NautobotFilterSet docstrings * modified code to pass CI tests * resolve merge conflicts * solve merge conflicts * deleted test code * deleted unnecessary code * replaced several FilterForms and Modelforms to use NautobotFilterForm and NautobotModelForm * resolve merge conflicts * commit to save changes * ignore __init__.py for flake 8 and added documentations * changed code to pass CI tests * modified code to change CI tests * modified code for CI tests * modified code to pass CI tests * modified code to pass CI tests * added formsets to forms.py __all__ * changed relationship filter to use ModelMultipleChoiceFilter * changed base_classes.py to base.py and made RelationshipModelFilterSetTestCase to inherit from FilterTestCase * added queryset and filterset to RelationshipModelFilterSetTestCase since it is needed for FilterTestCase * fix markdownlint error * swap ConnectCableExcludeIDMixin and NautobotModelForm order of inheritance Co-authored-by: Hanlin Miao <hanlinmiao@Hanlins-MBP-2.home> Co-authored-by: Bryan Culver <bryan.culver@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for df90685 - Browse repository at this point
Copy the full SHA df90685View commit details -
added documentations for issues #1883 and #1884
Hanlin Miao authored and Hanlin Miao committedJul 25, 2022 Configuration menu - View commit details
-
Copy full SHA for 29d0126 - Browse repository at this point
Copy the full SHA 29d0126View commit details
Commits on Jul 26, 2022
-
Create JobHookReceiver subclass of Job (#2056)
* Add `JobHookReceiver` subclass of `Job` * Update `nautobot.extras.jobs._get_vars()` to recognize variables set on base classes * Add `is_job_hook_receiver` field to Job model * Add `JobHook` choice for `ObjectChange.change_context` field and associated logic to use this context for `JobHookReceiver` jobs * Add example job to the example plugin * Add documentation page for job hook receivers to be updated and added to the index after job hooks are developed * Add 4 new methods to `nautobot.extras.models.ObjectChange` - `get_related_changes(self)` - `get_prev_change(self, user=None)` - `get_next_change(self, user=None)` - `get_snapshots(self)`
Configuration menu - View commit details
-
Copy full SHA for fac90d2 - Browse repository at this point
Copy the full SHA fac90d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e038792 - Browse repository at this point
Copy the full SHA e038792View commit details
Commits on Jul 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e10f3a1 - Browse repository at this point
Copy the full SHA e10f3a1View commit details
Commits on Jul 28, 2022
-
fixed one to many relationship source filter and apply AND operator b…
…etween filters (#2111) Co-authored-by: Hanlin Miao <hanlinmiao@Hanlins-MBP-2.home>
Configuration menu - View commit details
-
Copy full SHA for ac46e8a - Browse repository at this point
Copy the full SHA ac46e8aView commit details -
updated documentations for #2109 and #2111
Hanlin Miao authored and Hanlin Miao committedJul 28, 2022 Configuration menu - View commit details
-
Copy full SHA for 9b77295 - Browse repository at this point
Copy the full SHA 9b77295View commit details
Commits on Jul 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 96ac629 - Browse repository at this point
Copy the full SHA 96ac629View commit details -
* Implement Notes model and apply it to all relevent models. * Add support for VMInterface and reduce notes tab scope. * Reduces the Notes tab scope to only appear on objects that use the NotesMixin which applies the NotesQuerySet. * Add Notes to Location and LocationTypes. * Add Notes url to Example models. * Skip NotesView test if Model doesn't have the NotesMixin. * Allow updating of the User field of the note. * Use standard max_length for Note slug. Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for ecadb72 - Browse repository at this point
Copy the full SHA ecadb72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8745bc0 - Browse repository at this point
Copy the full SHA 8745bc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c23e364 - Browse repository at this point
Copy the full SHA c23e364View commit details -
Update Releases Batched for Next (next) (#2116)
* Update Releases Batched for Next * Hold back some packages, open drf-yasg, open importlib-metadata. * Pull back metalib required Python version Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bryan Culver <bryan.culver@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for 3d5aabc - Browse repository at this point
Copy the full SHA 3d5aabcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ce3433 - Browse repository at this point
Copy the full SHA 3ce3433View commit details -
Include relationships and associations on object REST APIs (#2092)
* Initial draft implementation * Refine code a bit, add labels to representation, add initial stab at OpenAPI schema for the field * Make relationship detail view a bit more standard * Add missing search field to RelationshipFilter * Simplify API representation * Writable API! * Black fix * Add NautobotModelSerializer * markdownlint * Fix schema for relationships * Add missing location status migration * Add some unit test coverage * Update REST API docs * Fix CableTerminationSerializer * Handle integer PKs in the test * Improve test coverage, fix handling of relationship assignment on object creation * Refine Base Classes best-practices * Fix one more serializer * Update nautobot/dcim/api/serializers.py Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com> * Update example plugin - fix tests?? * Update nautobot/extras/api/relationships.py Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com> * Relocate created/last_updated serializer field addition to cover more cases; add test coverage Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d50810a - Browse repository at this point
Copy the full SHA d50810aView commit details -
Dynamic Groups UX improvements (#2079)
* Dynamic Group UX improvements - Fixes #2069: Revise display name for set operations choices: - "Union (OR)" -> "Include (OR)" - "Intersection (AND)" -> "Restrict (AND)" - "Difference (NOT)" -> Exclude (NOT)" - Removed "delete" button from in-line related groups list view on Dynamic Group detail view as it was decided it would be confusing to have a delete button in that view because intuitively it feels as if it would be removing the child group vs. deleting the group itself - New util function `nautobot.extras.utils.pretty_print_query()` that takes a `Q` object and makes it human-readable - The raw query in Dynamic Group detail view is now displayed using `pretty_print_query()` - Revise `DynamicGroup.delete()` to block delete and raise a `PreotectedError` if there are parents (aka the group is a child) - Updated tables to be more explicit about hiding/showing action buttons for various DynamicGroup table views. They each now show the correct action buttons for the respective view context
Configuration menu - View commit details
-
Copy full SHA for a51b148 - Browse repository at this point
Copy the full SHA a51b148View commit details -
Configuration menu - View commit details
-
Copy full SHA for feadb66 - Browse repository at this point
Copy the full SHA feadb66View commit details -
* Add `JobHook` model and associated views, filters, serializers, form validation, serializer validation, and routes * Add `enqueue_job_hooks` method to launch job hook receivers related to job hooks when an associated change event occurs * Update `JobResult.enqueue_job` to queue jobs on database commit to prevent a race condition where a job runs before the `JobResult` is available to the worker * Fix a problem in change logging middleware where the `object_data_v2` field of an `ObjectChange` was not being updated on ManyToMany field changes
Configuration menu - View commit details
-
Copy full SHA for f3ef08b - Browse repository at this point
Copy the full SHA f3ef08bView commit details -
Configuration menu - View commit details
-
Copy full SHA for dbc3e1e - Browse repository at this point
Copy the full SHA dbc3e1eView commit details
Commits on Jul 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2db42c3 - Browse repository at this point
Copy the full SHA 2db42c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e49c7c4 - Browse repository at this point
Copy the full SHA e49c7c4View commit details
Commits on Aug 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ac73834 - Browse repository at this point
Copy the full SHA ac73834View commit details -
Configuration menu - View commit details
-
Copy full SHA for a34cc15 - Browse repository at this point
Copy the full SHA a34cc15View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffbbd3f - Browse repository at this point
Copy the full SHA ffbbd3fView commit details
Commits on Aug 5, 2022
-
* Correct documentation for NaturalKeyOrPKMultipleChoiceFIlter. * Update nautobot/docs/development/best-practices.md Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for d88bad6 - Browse repository at this point
Copy the full SHA d88bad6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f9582c - Browse repository at this point
Copy the full SHA 9f9582cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff05c82 - Browse repository at this point
Copy the full SHA ff05c82View commit details -
Add slug field to CustomField model, add versioned custom-fields REST…
… API, etc. (#2136) * Initial mostly-working implementation * Add versioned serializer * Improve test coverage * Docs updates * Version REST API for custom_fields data to use slug instead of name as keys in 1.4+ * Fix check-schema error * Fix a class of API errors * Fix custom-field integration tests to handle UI changes * Address some review feedback * Add utils function unit tests
Configuration menu - View commit details
-
Copy full SHA for d576004 - Browse repository at this point
Copy the full SHA d576004View commit details
Commits on Aug 6, 2022
-
Bug fixes and add missing API functionality for Dynamic Group Members…
…hips (#2144) - Added `DynamicGroupMembershipFilterSet`,`DynamicGroupMembershipFilter`, `NestedDynamicGroupMembershipFilter` for filtering - Implemented API view (`DynamicGroupMembershipViewSet`) and serializer (`DynamicGroupMembershipSerializer`) - Everything is unit tested. - Updated `DynamicGroup._map_filter_fields` logic - Always unset `required` on any incoming modelform fields - Always skip filterset fields that have `method` defined as these cannot be reversed to `Q` objects at this time - Moved to `NaturalKeyOrPKMultipleChoiceFilter for `group` and `parent_group` fields - On `DynamicGroupMembershipFilterSet` and updated unit tests - Enforce mutual exclusivity between parent group filter & children - `DynamicGroup.children.add()` and `DynamicGroup.add_child()` will now raise a `ValidationError` if the parent group has a `filter` set - This was accomplished by using a `m2m_changed:pre_add` signal handler with sender of `DynamicGroup.children.through` - `DynamicGroupMembership.clean()` now asserts that `parent_group.filter` cannot be set when attmepting to `save()` - `DynamicGroupMembership.objects.create()` will now raise a `ValidationError` if the parent group has a `filter` set` - This was accomplished by using a `pre_save` signal handler with sender of `DynamicGroupMembership`
Configuration menu - View commit details
-
Copy full SHA for 2c25678 - Browse repository at this point
Copy the full SHA 2c25678View commit details
Commits on Aug 8, 2022
-
Extending filtering of date custom field type (#2126)
* Implementation * PR requests and unit tests * update CustomFieldModelFilterSet to dynamically generate filters for multiple lookup expressions * remove test code * iterate on custom field filters * remove redundant test * add test * add test * documentation and tests * update __all__ and comments * change to multi value filters for extended lookup expressions * roll back filter form changes * clean up Co-authored-by: Gary Snider <gary.snider@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for 5710763 - Browse repository at this point
Copy the full SHA 5710763View commit details
Commits on Aug 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for bf6d49d - Browse repository at this point
Copy the full SHA bf6d49dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 263e956 - Browse repository at this point
Copy the full SHA 263e956View commit details
Commits on Aug 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8f7fa72 - Browse repository at this point
Copy the full SHA 8f7fa72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 541a7b4 - Browse repository at this point
Copy the full SHA 541a7b4View commit details -
* Implement Notes model and apply it to all relevant models * Writable API * Allow updating of the User field of the note * Add Notes API and NautobotModelViewSet * Added NautobotModelSerializer to JobHookSerializer as it is an Organizational Model. Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Configuration menu - View commit details
-
Copy full SHA for ab0189c - Browse repository at this point
Copy the full SHA ab0189cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f8035f - Browse repository at this point
Copy the full SHA 4f8035fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c5c4d3d - Browse repository at this point
Copy the full SHA c5c4d3dView commit details -
Fix missing RelationshipModelForm class, add @class_deprecated_in_fav…
…or_of decorator (#2151) * Add `@class_deprecated_in_favor_of` decorator that can be added to classes so that they report a `DeprecationWarning` when subclassed * Since in Python `DeprecationWarnings` are silenced by default (one easy way to make them visible in your dev environment is to set the environment variable `PYTHONWARNINGS=default`) I've also opted to have this decorator output a standard `logging` warning message as well. * Re-add `RelationshipModelForm` as a deprecated alias of `RelationshipModelFormMixin` (fixes #2135) * Toward improving our consistency and clarity of mixins, go ahead and rename a bunch of our other `nautobot.extras.forms` mixin classes and add their existing names as deprecated aliases: | Former Name | New Name | | --------------------------- | ----------------------------------- | | `AddRemoveTagsForm` | `TagsBulkEditFormMixin` | | `CustomFieldBulkCreateForm` | `CustomFieldModelBulkEditFormMixin` | | `CustomFieldBulkEditForm` | `CustomFieldModelBulkEditFormMixin` | | `CustomFieldFilterForm` | `CustomFieldModelFilterFormMixin` | | `CustomFieldModelForm` | `CustomFieldModelFormMixin` | | `RelationshipModelForm` | `RelationshipModelFormMixin` | | `StatusBulkEditFormMixin` | `StatusModelBulkEditFormMixin` | | `StatusFilterFormMixin` | `StatusModelFilterFormMixin` |
Configuration menu - View commit details
-
Copy full SHA for df9cc81 - Browse repository at this point
Copy the full SHA df9cc81View commit details -
Configuration menu - View commit details
-
Copy full SHA for b155ab5 - Browse repository at this point
Copy the full SHA b155ab5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d1b805 - Browse repository at this point
Copy the full SHA 0d1b805View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9de4ab - Browse repository at this point
Copy the full SHA f9de4abView commit details