Closes #8469: Move BaseTable, columns to netbox core app

This commit is contained in:
jeremystretch
2022-01-27 15:00:10 -05:00
parent 083d1acb81
commit 4a1b4e0485
33 changed files with 321 additions and 349 deletions

View File

@@ -1,7 +1,7 @@
import django_tables2 as tables
from utilities.tables import BaseTable, TagColumn, ToggleColumn
from ipam.models import *
from netbox.tables import BaseTable, columns
__all__ = (
'ServiceTable',
@@ -10,14 +10,14 @@ __all__ = (
class ServiceTemplateTable(BaseTable):
pk = ToggleColumn()
pk = columns.ToggleColumn()
name = tables.Column(
linkify=True
)
ports = tables.Column(
accessor=tables.A('port_list')
)
tags = TagColumn(
tags = columns.TagColumn(
url_name='ipam:servicetemplate_list'
)
@@ -28,7 +28,7 @@ class ServiceTemplateTable(BaseTable):
class ServiceTable(BaseTable):
pk = ToggleColumn()
pk = columns.ToggleColumn()
name = tables.Column(
linkify=True
)
@@ -39,7 +39,7 @@ class ServiceTable(BaseTable):
ports = tables.Column(
accessor=tables.A('port_list')
)
tags = TagColumn(
tags = columns.TagColumn(
url_name='ipam:service_list'
)