first commit
This commit is contained in:
38
netbox_librenms_plugin/tables/mappings.py
Normal file
38
netbox_librenms_plugin/tables/mappings.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import django_tables2 as tables
|
||||
from netbox.tables import NetBoxTable, columns
|
||||
|
||||
from netbox_librenms_plugin.models import InterfaceTypeMapping
|
||||
|
||||
|
||||
class InterfaceTypeMappingTable(NetBoxTable):
|
||||
"""
|
||||
Table for displaying InterfaceTypeMapping data.
|
||||
"""
|
||||
|
||||
librenms_type = tables.Column(verbose_name="LibreNMS Type")
|
||||
librenms_speed = tables.Column(verbose_name="LibreNMS Speed (Kbps)")
|
||||
netbox_type = tables.Column(verbose_name="NetBox Type")
|
||||
description = tables.Column(verbose_name="Description", linkify=False)
|
||||
actions = columns.ActionsColumn(actions=("edit", "delete"))
|
||||
|
||||
class Meta:
|
||||
"""Meta options for InterfaceTypeMappingTable."""
|
||||
|
||||
model = InterfaceTypeMapping
|
||||
fields = (
|
||||
"id",
|
||||
"librenms_type",
|
||||
"librenms_speed",
|
||||
"netbox_type",
|
||||
"description",
|
||||
"actions",
|
||||
)
|
||||
default_columns = (
|
||||
"id",
|
||||
"librenms_type",
|
||||
"librenms_speed",
|
||||
"netbox_type",
|
||||
"description",
|
||||
"actions",
|
||||
)
|
||||
attrs = {"class": "table table-hover table-headings table-striped"}
|
||||
Reference in New Issue
Block a user