mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Split out NetBoxTable from BaseTable
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import django_tables2 as tables
|
||||
|
||||
from ipam.models import *
|
||||
from netbox.tables import BaseTable, columns
|
||||
from netbox.tables import NetBoxTable, columns
|
||||
|
||||
__all__ = (
|
||||
'ServiceTable',
|
||||
@@ -9,8 +9,7 @@ __all__ = (
|
||||
)
|
||||
|
||||
|
||||
class ServiceTemplateTable(BaseTable):
|
||||
pk = columns.ToggleColumn()
|
||||
class ServiceTemplateTable(NetBoxTable):
|
||||
name = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
@@ -21,14 +20,13 @@ class ServiceTemplateTable(BaseTable):
|
||||
url_name='ipam:servicetemplate_list'
|
||||
)
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
class Meta(NetBoxTable.Meta):
|
||||
model = ServiceTemplate
|
||||
fields = ('pk', 'id', 'name', 'protocol', 'ports', 'description', 'tags')
|
||||
default_columns = ('pk', 'name', 'protocol', 'ports', 'description')
|
||||
|
||||
|
||||
class ServiceTable(BaseTable):
|
||||
pk = columns.ToggleColumn()
|
||||
class ServiceTable(NetBoxTable):
|
||||
name = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
@@ -43,7 +41,7 @@ class ServiceTable(BaseTable):
|
||||
url_name='ipam:service_list'
|
||||
)
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
class Meta(NetBoxTable.Meta):
|
||||
model = Service
|
||||
fields = (
|
||||
'pk', 'id', 'name', 'parent', 'protocol', 'ports', 'ipaddresses', 'description', 'tags', 'created',
|
||||
|
||||
Reference in New Issue
Block a user