mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 20:32:25 -06:00
Initial work on #7679
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import django_tables2 as tables
|
||||
|
||||
from utilities.tables import BaseTable, ButtonsColumn, MarkdownColumn, TagColumn, ToggleColumn
|
||||
from utilities.tables import ActionsColumn, BaseTable, MarkdownColumn, TagColumn, ToggleColumn
|
||||
from ipam.models import *
|
||||
|
||||
__all__ = (
|
||||
@@ -58,9 +58,8 @@ class FHRPGroupAssignmentTable(BaseTable):
|
||||
group = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
actions = ButtonsColumn(
|
||||
model=FHRPGroupAssignment,
|
||||
buttons=('edit', 'delete', 'foo')
|
||||
actions = ActionsColumn(
|
||||
actions=('edit', 'delete')
|
||||
)
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
|
||||
@@ -4,8 +4,8 @@ from django_tables2.utils import Accessor
|
||||
|
||||
from tenancy.tables import TenantColumn
|
||||
from utilities.tables import (
|
||||
BaseTable, BooleanColumn, ButtonsColumn, ChoiceFieldColumn, LinkedCountColumn, TagColumn,
|
||||
ToggleColumn, UtilizationColumn,
|
||||
ActionsColumn, BaseTable, BooleanColumn, ChoiceFieldColumn, LinkedCountColumn, TagColumn, ToggleColumn,
|
||||
UtilizationColumn,
|
||||
)
|
||||
from ipam.models import *
|
||||
|
||||
@@ -89,7 +89,7 @@ class RIRTable(BaseTable):
|
||||
tags = TagColumn(
|
||||
url_name='ipam:rir_list'
|
||||
)
|
||||
actions = ButtonsColumn(RIR)
|
||||
actions = ActionsColumn()
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = RIR
|
||||
@@ -111,7 +111,7 @@ class ASNTable(BaseTable):
|
||||
url_params={'asn_id': 'pk'},
|
||||
verbose_name='Sites'
|
||||
)
|
||||
actions = ButtonsColumn(ASN)
|
||||
actions = ActionsColumn()
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = ASN
|
||||
@@ -173,7 +173,7 @@ class RoleTable(BaseTable):
|
||||
tags = TagColumn(
|
||||
url_name='ipam:role_list'
|
||||
)
|
||||
actions = ButtonsColumn(Role)
|
||||
actions = ActionsColumn()
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = Role
|
||||
@@ -405,9 +405,7 @@ class AssignedIPAddressesTable(BaseTable):
|
||||
)
|
||||
status = ChoiceFieldColumn()
|
||||
tenant = TenantColumn()
|
||||
actions = ButtonsColumn(
|
||||
model=IPAddress
|
||||
)
|
||||
actions = ActionsColumn()
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = IPAddress
|
||||
|
||||
@@ -5,8 +5,8 @@ from django_tables2.utils import Accessor
|
||||
from dcim.models import Interface
|
||||
from tenancy.tables import TenantColumn
|
||||
from utilities.tables import (
|
||||
BaseTable, BooleanColumn, ButtonsColumn, ChoiceFieldColumn, ContentTypeColumn, LinkedCountColumn, TagColumn,
|
||||
TemplateColumn, ToggleColumn,
|
||||
ActionsColumn, BaseTable, BooleanColumn, ButtonsColumn, ChoiceFieldColumn, ContentTypeColumn, LinkedCountColumn,
|
||||
TagColumn, TemplateColumn, ToggleColumn,
|
||||
)
|
||||
from virtualization.models import VMInterface
|
||||
from ipam.models import *
|
||||
@@ -153,7 +153,9 @@ class VLANDevicesTable(VLANMembersTable):
|
||||
device = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
actions = ButtonsColumn(Interface, buttons=['edit'])
|
||||
actions = ActionsColumn(
|
||||
actions=('edit',)
|
||||
)
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = Interface
|
||||
@@ -165,7 +167,9 @@ class VLANVirtualMachinesTable(VLANMembersTable):
|
||||
virtual_machine = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
actions = ButtonsColumn(VMInterface, buttons=['edit'])
|
||||
actions = ActionsColumn(
|
||||
actions=('edit',)
|
||||
)
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = VMInterface
|
||||
|
||||
Reference in New Issue
Block a user