Files
Netbox-Utilities/pyproject.toml
T
MrBlakeandClaude Sonnet 5 3cff66ad33 fix: target the correct classes for images-only/labels-only export
Decompiled NetBox core's own bundled JS (netbox.js) to find the real
toggle logic: its "images-only"/"labels-only" control only ever
hides image.device-image and text.device-image-label - it never
touches the plain text.label, relying on an opaque device image to
visually cover it. A device without a photo therefore still shows its
name live, even in "images-only".

apply_rack_view_mode() previously removed .label for images-only and
.device-image/.device-image-label for labels-only, which not only
targeted the wrong element for images-only but also left device-
image-label (the name overlaid on the image) around in labels-only.

For a static, non-interactive export there's no image left to cover
stray text, so per explicit request this deliberately does not mirror
NetBox's live fallback: images-only now always removes every label
(.label and .device-image-label) for a pure image view, and
labels-only removes the image layer (.device-image and
.device-image-label) to reproduce NetBox's own box-with-text view.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 15:54:53 +02:00

34 lines
783 B
TOML

[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[project]
name = "netbox-utilities"
version = "0.12.1"
description = "Navigation, tenant utilities, connection VLANs, partial-width racks, and bulk operations for NetBox 4.6/4.7"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [
{ name = "MrBlake" }
]
classifiers = [
"Framework :: Django",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.urls]
Repository = "https://git.mrblake.cc/MrBlake/Netbox-Utilities"
[tool.hatch.build.targets.wheel]
packages = ["netbox_utilities"]
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.lint]
ignore = ["RUF012"]