fix: disk table fits page like other tables
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3cf26c8ded
commit
2c0e026cb9
4 files changed
+10
-8
No files matched your search
@@ -5,7 +5,7 @@ class CustomerExportConfig(PluginConfig):
|
||||
name = "netbox_customer_export"
|
||||
verbose_name = "Kunden-Export"
|
||||
description = "Kundendokumentation als PDF oder Word exportieren"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
author = "Claude"
|
||||
base_url = "customer-export"
|
||||
min_version = "4.6.8"
|
||||
|
||||
@@ -53,7 +53,7 @@ def disk_blocks(scope, opts):
|
||||
by_device.setdefault(disk.device, []).append(disk)
|
||||
|
||||
show_installed = bool(opts.get("disk_install_date"))
|
||||
headers = ["Steckplatz", "Status", "Typ", "Hersteller / Modell", "Größe", "Seriennummer", "Firmware", "RAID"]
|
||||
headers = ["Steckplatz", "Status", "Datenträger", "Größe", "Seriennummer", "RAID"]
|
||||
headers += ["Eingebaut"] * show_installed + ["Garantie bis", "Hinweise"]
|
||||
blocks = []
|
||||
for device, items in by_device.items():
|
||||
@@ -89,12 +89,13 @@ def disk_blocks(scope, opts):
|
||||
row = [
|
||||
_slot(d),
|
||||
d.get_status_display(),
|
||||
" / ".join(x for x in (d.get_disk_type_display(), d.get_interface_display()) if x),
|
||||
" ".join(x for x in (d.manufacturer, d.model) if x),
|
||||
"\n".join(x for x in (
|
||||
" ".join(x for x in (d.manufacturer, d.model) if x),
|
||||
" / ".join(x for x in (d.get_disk_type_display(), d.get_interface_display()) if x),
|
||||
) if x),
|
||||
fmt(d.capacity_gb) if d.capacity_gb else None,
|
||||
d.serial,
|
||||
d.firmware,
|
||||
d.raid_group,
|
||||
"\n".join(x for x in (d.serial, f"FW {d.firmware}" if d.firmware else "") if x),
|
||||
d.raid_group.name if d.raid_group_id else None,
|
||||
]
|
||||
if show_installed:
|
||||
row.append(_date(getattr(d, "install_date", None)))
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
table { width: 100%; border-collapse: collapse; margin: 4pt 0 10pt; font-size: 8.5pt; }
|
||||
thead { display: table-header-group; }
|
||||
th { background: var(--primary); color: var(--head-text); text-align: left; padding: 3pt 5pt; }
|
||||
th, td { overflow-wrap: anywhere; }
|
||||
td { border-bottom: 1px solid #ddd; padding: 3pt 5pt; vertical-align: top; }
|
||||
tr { page-break-inside: avoid; }
|
||||
tbody tr:nth-child(even) td { background: var(--stripe); }
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "netbox-customer-export"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "NetBox-Plugin: Kundendokumentation (PDF/Word) für Standorte, Lokationen, Mandanten und Mandantengruppen"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
Reference in new issue
Block a user