fix: move offline SVG export from buttons() to right_page()

The buttons() plugin-template-extension hook was registered for
dcim.rack and rendered without error, but the button HTML never
appeared on the rendered rack detail page in production — NetBox's
Rack detail template apparently doesn't wire the buttons() slot into
its controls row. right_page() is confirmed working for this plugin
already (the device rack-width panel uses it), so the export links
now render there as a small card instead.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Sonnet 5 committed 2026-09-17 15:10:33 +02:00
1 parent 3768417be6
commit c722abe497
5 files changed
+19 -14

No files matched your search

+2 -2
View File
@@ -155,12 +155,12 @@ class ConnectionVLANContent(PluginTemplateExtension):
class RackUtilitiesContent(PluginTemplateExtension):
models = ["dcim.rack"]
def buttons(self):
def right_page(self):
if not offline_svg_export_enabled():
return ""
rack = self.context["object"]
return self.render(
"netbox_utilities/rack_offline_svg_buttons.html",
"netbox_utilities/rack_offline_svg_panel.html",
{"rack": rack},
)