diff --git a/netbox/circuits/models/circuits.py b/netbox/circuits/models/circuits.py index 7b65d52ad..fa21d7cd3 100644 --- a/netbox/circuits/models/circuits.py +++ b/netbox/circuits/models/circuits.py @@ -227,7 +227,7 @@ class CircuitTermination( return f'{self.circuit}: Termination {self.term_side}' def get_absolute_url(self): - return self.circuit.get_absolute_url() + return reverse('circuits:circuittermination', args=[self.pk]) def clean(self): super().clean() diff --git a/netbox/circuits/tables/circuits.py b/netbox/circuits/tables/circuits.py index b7c308269..b13c43f56 100644 --- a/netbox/circuits/tables/circuits.py +++ b/netbox/circuits/tables/circuits.py @@ -96,6 +96,7 @@ class CircuitTerminationTable(NetBoxTable): class Meta(NetBoxTable.Meta): model = CircuitTermination fields = ( - 'pk', 'id', 'circuit', 'term_side', 'created', 'last_updated', 'actions', + 'pk', 'id', 'circuit', 'term_side', 'site', 'provider_network', 'port_speed', 'upstream_speed', + 'xconnect_id', 'pp_info', 'description', 'created', 'last_updated', 'actions', ) - default_columns = ('pk', 'id', 'circuit', 'term_side') + default_columns = ('pk', 'id', 'circuit', 'term_side', 'description') diff --git a/netbox/templates/circuits/circuittermination.html b/netbox/templates/circuits/circuittermination.html new file mode 100644 index 000000000..267024d20 --- /dev/null +++ b/netbox/templates/circuits/circuittermination.html @@ -0,0 +1,126 @@ +{% extends 'generic/object.html' %} +{% load helpers %} +{% load plugins %} +{% load i18n %} + +{% block breadcrumbs %} + {{ block.super }} +
{% trans "Site" %} | ++ {% if object.site.region %} + {{ object.site.region|linkify }} / + {% endif %} + {{ object.site|linkify }} + | +
---|---|
{% trans "Termination" %} | +
+ {% if object.mark_connected %}
+
+ {% trans "Marked as connected" %}
+ {% elif object.cable %}
+ {{ object.cable }} {% trans "to" %}
+ {% for peer in object.link_peers %}
+ {% if peer.device %}
+ {{ peer.device|linkify }} + {% elif peer.circuit %} + {{ peer.circuit|linkify }} + {% endif %} + {{ peer|linkify }}{% if not forloop.last %},{% endif %} + {% endfor %} +
+
+ {% trans "Trace" %}
+
+ {% if perms.dcim.change_cable %}
+
+ {% trans "Edit" %}
+
+ {% endif %}
+ {% if perms.dcim.delete_cable %}
+
+ {% trans "Disconnect" %}
+
+ {% endif %}
+
+ {% elif perms.dcim.add_cable %}
+
+
+
+ {% endif %}
+
+ |
+
{% trans "Provider Network" %} | +{{ object.provider_network.provider|linkify }} / {{ object.provider_network|linkify }} | +
{% trans "Speed" %} | ++ {% if object.port_speed and object.upstream_speed %} + {{ object.port_speed|humanize_speed }} + {{ object.upstream_speed|humanize_speed }} + {% elif object.port_speed %} + {{ object.port_speed|humanize_speed }} + {% else %} + {{ ''|placeholder }} + {% endif %} + | +
{% trans "Cross-Connect" %} | +{{ object.xconnect_id|placeholder }} | +
{% trans "Patch Panel/Port" %} | +{{ object.pp_info|placeholder }} | +
{% trans "Description" %} | +{{ object.description|placeholder }} | +