From 56d163eed1b735bca4a231b18eb819726eb77d8a Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 27 Mar 2025 15:05:33 -0400 Subject: [PATCH] Include module type attributes on module view --- netbox/templates/dcim/module.html | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/netbox/templates/dcim/module.html b/netbox/templates/dcim/module.html index f702c6608..3f09ec82f 100644 --- a/netbox/templates/dcim/module.html +++ b/netbox/templates/dcim/module.html @@ -1,8 +1,8 @@ {% extends 'generic/object.html' %} {% load helpers %} {% load plugins %} -{% load tz %} {% load i18n %} +{% load mptt %} {% block breadcrumbs %} {{ block.super }} @@ -62,8 +62,8 @@ {{ object.device.device_type|linkify }} - {% trans "Module Type" %} - {{ object.module_type|linkify:"full_name" }} + {% trans "Module Bay" %} + {% nested_tree object.module_bay %} {% trans "Status" %} @@ -88,6 +88,25 @@ {% plugin_left_page object %}
+
+

{% trans "Module Type" %}

+ + + + + + + + + + {% for k, v in object.module_type.attributes.items %} + + + + + {% endfor %} +
{% trans "Manufacturer" %}{{ object.module_type.manufacturer|linkify }}
{% trans "Model" %}{{ object.module_type|linkify }}
{{ k }}{{ v|placeholder }}
+
{% include 'inc/panels/related_objects.html' %} {% include 'inc/panels/custom_fields.html' %} {% plugin_right_page object %}