Move ActionsColumn extra_buttons rendering first #6495

Closed
opened 2025-12-29 19:41:29 +01:00 by adam · 0 comments
Owner

Originally created by @PieterL75 on GitHub (May 18, 2022).

Originally assigned to: @jeremystretch on GitHub.

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

Originally created by @PieterL75 on GitHub (May 18, 2022). Originally assigned to: @jeremystretch on GitHub. ### 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](https://user-images.githubusercontent.com/74899468/169055039-5bef86e6-ee34-4cbc-b556-f0d63e7ad2a4.png) 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
adam added the type: bugtype: feature labels 2025-12-29 19:41:29 +01:00
adam closed this issue 2025-12-29 19:41:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6495