Skip to content

Move ActionsColumn extra_buttons rendering first #9387

@PieterL75

Description

@PieterL75

NetBox version

v3.2.3

Feature type

Change to existing functionality

Proposed functionality

In the ActionsColumn class, the rendering of the extra_buttons is done at the end of the render() def.

I would like to move this to the beginning, so that the extra_buttons are created, even if there are no 'actions' to be shown in the dropdown
https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/tables/columns.py#L213

Use case

I'm building a 'custom' device landing page, using a plugin and ngix-reverse proxy,
This page shows all device info in one view, but I would like to be able to reduce the view to a minimum.

The 'action' buttons are not needed here, but I would like to still show the 'extra_buttons'.

As I set 'action' to empty, the code does not continue to render the extra_buttons.
When I modify the code to render the extra_buttons first, it shows as I would like to
image

I know this is a corner case, but I can imagine that future native netbox views would benefit if being able to show extra_buttons only, without actions

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

Labels

type: bugA confirmed report of unexpected behavior in the applicationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions