Add location topology button
This commit is contained in:
@@ -11,5 +11,10 @@ class SiteButtons(PluginTemplateExtension):
|
||||
def buttons(self):
|
||||
return self.render('netbox_topology_views/site_button.html')
|
||||
|
||||
class LocationButtons(PluginTemplateExtension):
|
||||
model = 'dcim.location'
|
||||
def buttons(self):
|
||||
return self.render('netbox_topology_views/location_button.html')
|
||||
|
||||
template_extensions = [SiteButtons]
|
||||
|
||||
template_extensions = [SiteButtons, LocationButtons]
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<a role="button" class="btn btn-sm btn-primary" title="Topology" href="#" hx-get="/plugins/netbox_topology_views/topology/?location_id={{ object.id }}&show_cables=on&show_logical_connections=on&show_neighbors=on" hx-target="#htmx-modal-content" data-bs-toggle="modal" data-bs-target="#htmx-modal">
|
||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||
Topology
|
||||
</a>
|
||||
Reference in New Issue
Block a user