1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Replace ButtonsColumn with ActionsColumn

This commit is contained in:
jeremystretch
2022-01-10 11:17:40 -05:00
parent 8b07fbc554
commit aed23d61fc
8 changed files with 90 additions and 165 deletions

View File

@ -3,7 +3,7 @@ import django_tables2 as tables
from dcim.tables.devices import BaseInterfaceTable
from tenancy.tables import TenantColumn
from utilities.tables import (
BaseTable, ButtonsColumn, ChoiceFieldColumn, ColoredLabelColumn, LinkedCountColumn, MarkdownColumn, TagColumn,
ActionsColumn, BaseTable, ChoiceFieldColumn, ColoredLabelColumn, LinkedCountColumn, MarkdownColumn, TagColumn,
ToggleColumn,
)
from .models import Cluster, ClusterGroup, ClusterType, VirtualMachine, VMInterface
@ -183,10 +183,9 @@ class VirtualMachineVMInterfaceTable(VMInterfaceTable):
bridge = tables.Column(
linkify=True
)
actions = ButtonsColumn(
model=VMInterface,
buttons=('edit', 'delete'),
prepend_template=VMINTERFACE_BUTTONS
actions = ActionsColumn(
sequence=('edit', 'delete'),
extra_buttons=VMINTERFACE_BUTTONS
)
class Meta(BaseTable.Meta):