You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hide the 'BGP Peer Sessions' and 'BGP Routing Instances' boxes on device pages when there are no sessions or routing instances.
Use Case
Servers, PDUs, cable management, and many other devices will not have BGP sessions or instances. Having the empty boxes there clutters the device page, this could be done by checking for the existence of the filtered object before rendering the box, e.g.:
def right_page(self):
"""Add content to the right side of the Devices detail view."""
endpoints = PeerEndpoint.objects.filter(
routing_instance__device=self.context["object"],
)
if endpoints:
return self.render(
"nautobot_bgp_models/inc/device_peer_endpoints.html",
extra_context={"endpoints": endpoints},
)
else:
return ""
The text was updated successfully, but these errors were encountered:
Environment
Proposed Functionality
Hide the 'BGP Peer Sessions' and 'BGP Routing Instances' boxes on device pages when there are no sessions or routing instances.
Use Case
Servers, PDUs, cable management, and many other devices will not have BGP sessions or instances. Having the empty boxes there clutters the device page, this could be done by checking for the existence of the filtered object before rendering the box, e.g.:
The text was updated successfully, but these errors were encountered: