Skip to content
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

Fixes #12847 - Include Missing Add buttons to Views #12864

Merged

Conversation

sudheesh001
Copy link
Contributor

Fixes: #12847

  • Includes missing Add button in Views for Device Components
  • Includes missing Add button in Views for Virtualization > Interfaces

@@ -2193,7 +2193,7 @@ class ConsolePortListView(generic.ObjectListView):
filterset = filtersets.ConsolePortFilterSet
filterset_form = forms.ConsolePortFilterForm
table = tables.ConsolePortTable
actions = ('import', 'export', 'bulk_edit', 'bulk_delete')
actions = ('add', 'import', 'export', 'bulk_edit', 'bulk_delete')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ActionsMixin sets this list by default, so we can instead just remove the definition for actions from each view.

class ActionsMixin:
    actions = ('add', 'import', 'export', 'bulk_edit', 'bulk_delete')
Suggested change
actions = ('add', 'import', 'export', 'bulk_edit', 'bulk_delete')

Signed-off-by: Sudheesh Singanamalla <sudheesh@cs.washington.edu>
@sudheesh001
Copy link
Contributor Author

Thanks for the review @jeremystretch I just updated the PR based on your feedback. Please let me know if this would be a better patch.

@jeremystretch
Copy link
Member

That'll work, thanks!

@jeremystretch jeremystretch merged commit f7b0e48 into netbox-community:develop Jun 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include "add" button on page heading for virtual machine interfaces list
2 participants