Files
netbox-librenms-plugin/netbox_librenms_plugin/tables/mappings.py
Vlastislav Svatek 673e67106e
Some checks failed
ci / deploy (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
first commit
2026-06-05 10:39:05 +02:00

39 lines
1.1 KiB
Python

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"}