From d45edcd216b81cce9fb37a12f9d80b71973b2358 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 18 Mar 2021 14:49:06 -0400 Subject: [PATCH] Linkify circuit terminations in table --- netbox/circuits/models.py | 6 +++++- netbox/circuits/tables.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/netbox/circuits/models.py b/netbox/circuits/models.py index c2ff71126..73df7f2d4 100644 --- a/netbox/circuits/models.py +++ b/netbox/circuits/models.py @@ -351,7 +351,11 @@ class CircuitTermination(ChangeLoggedModel, PathEndpoint, CableTermination): if self.site: return str(self.site) return str(self.cloud) - return f"Side {self.get_term_side_display()}" + + def get_absolute_url(self): + if self.site: + return self.site.get_absolute_url() + return self.cloud.get_absolute_url() def clean(self): super().clean() diff --git a/netbox/circuits/tables.py b/netbox/circuits/tables.py index 00b4613a7..ba113de8c 100644 --- a/netbox/circuits/tables.py +++ b/netbox/circuits/tables.py @@ -84,9 +84,11 @@ class CircuitTable(BaseTable): status = ChoiceFieldColumn() tenant = TenantColumn() termination_a = tables.Column( + linkify=True, verbose_name='Side A' ) termination_z = tables.Column( + linkify=True, verbose_name='Side Z' ) tags = TagColumn(