mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #8469: Move BaseTable, columns to netbox core app
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import django_tables2 as tables
|
||||
|
||||
from utilities.tables import ActionsColumn, BaseTable, MarkdownColumn, TagColumn, ToggleColumn
|
||||
from ipam.models import *
|
||||
from netbox.tables import BaseTable, columns
|
||||
|
||||
__all__ = (
|
||||
'FHRPGroupTable',
|
||||
@@ -17,11 +17,11 @@ IPADDRESSES = """
|
||||
|
||||
|
||||
class FHRPGroupTable(BaseTable):
|
||||
pk = ToggleColumn()
|
||||
pk = columns.ToggleColumn()
|
||||
group_id = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
comments = MarkdownColumn()
|
||||
comments = columns.MarkdownColumn()
|
||||
ip_addresses = tables.TemplateColumn(
|
||||
template_code=IPADDRESSES,
|
||||
orderable=False,
|
||||
@@ -30,7 +30,7 @@ class FHRPGroupTable(BaseTable):
|
||||
interface_count = tables.Column(
|
||||
verbose_name='Interfaces'
|
||||
)
|
||||
tags = TagColumn(
|
||||
tags = columns.TagColumn(
|
||||
url_name='ipam:fhrpgroup_list'
|
||||
)
|
||||
|
||||
@@ -44,7 +44,7 @@ class FHRPGroupTable(BaseTable):
|
||||
|
||||
|
||||
class FHRPGroupAssignmentTable(BaseTable):
|
||||
pk = ToggleColumn()
|
||||
pk = columns.ToggleColumn()
|
||||
interface_parent = tables.Column(
|
||||
accessor=tables.A('interface.parent_object'),
|
||||
linkify=True,
|
||||
@@ -58,7 +58,7 @@ class FHRPGroupAssignmentTable(BaseTable):
|
||||
group = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
actions = ActionsColumn(
|
||||
actions = columns.ActionsColumn(
|
||||
sequence=('edit', 'delete')
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user