Add tags support for 3.1.x - #1150
Open
zackt25 wants to merge 7 commits into
Open
Conversation
Mix TagsBulkEditFormMixin into every bulk edit form so tags can be added or removed in bulk on all taggable Golden Config models. Also drop "tags" from ConfigPlanBulkEditForm.Meta.nullable_fields; bulk edit nullification only applies to actual form fields, so it never had any effect.
Expose the existing `tags` filterset filter in the UI filter forms so objects can be filtered by tag from the list views.
Every taggable model's list view now offers a `tags` column. The column is opt-in through table configuration rather than shown by default, matching the existing ConfigPlan table. GoldenConfigSettingTable and GoldenConfigTable gain an explicit `default_columns` so the new column does not become a default.
The GoldenConfig viewset already declared a bulk edit form but never mixed in the view, so the form was unreachable. Wiring ObjectBulkUpdateViewMixin in exposes the bulk edit action, and with it the new tag add/remove fields.
Cover that every taggable model exposes tags in its bulk edit form, filter form and table, that the tags column is not a default column, and that tags selected in a bulk edit reach the Bulk Edit Objects system job.
Author
|
Tested on v3.1.0 |
| @@ -0,0 +1,157 @@ | |||
| """Unit tests for tag support on nautobot_golden_config models.""" | |||
Contributor
There was a problem hiding this comment.
i know it's in draft, but this doesn't follow our testing standards, so before spending more time on it, thought I would mention.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed
Added a bulk edit view for Golden Config (Configuration Overview) records.
Added tag support throughout the UI for all Golden Config models: tags can be added and removed in bulk edit, filtered on from every list view, and displayed as an optional table column.
To Do