wip installation model
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import django_tables2 as tables
|
||||
from django_tables2.utils import Accessor
|
||||
from netbox_slm.models import SoftwareProduct, SoftwareProductVersion
|
||||
from netbox_slm.models import SoftwareProduct, SoftwareProductVersion, SoftwareProductInstallation
|
||||
from utilities.tables import BaseTable, ChoiceFieldColumn, ToggleColumn
|
||||
|
||||
|
||||
@@ -68,3 +68,44 @@ class SoftwareProductVersionTable(BaseTable):
|
||||
"manufacturer",
|
||||
# "tags",
|
||||
)
|
||||
|
||||
|
||||
class SoftwareProductInstallationTable(BaseTable):
|
||||
"""Table for displaying SoftwareProductInstallation objects."""
|
||||
|
||||
pk = ToggleColumn()
|
||||
name = tables.LinkColumn()
|
||||
device = tables.Column(
|
||||
accessor=Accessor('device'),
|
||||
linkify=True
|
||||
)
|
||||
software_product = tables.Column(
|
||||
accessor=Accessor('software_product'),
|
||||
linkify=True
|
||||
)
|
||||
version = tables.Column(
|
||||
accessor=Accessor('version'),
|
||||
linkify=True
|
||||
)
|
||||
|
||||
# tags = TagColumn(
|
||||
# url_name="plugins:netbox_dns:zone_list",
|
||||
# )
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = SoftwareProductInstallation
|
||||
fields = (
|
||||
"pk",
|
||||
"name",
|
||||
"device",
|
||||
"software_product",
|
||||
"version",
|
||||
# "tags",
|
||||
)
|
||||
default_columns = (
|
||||
"pk",
|
||||
"device",
|
||||
"software_product",
|
||||
"version",
|
||||
# "tags",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user