diff --git a/netbox/templates/dcim/inc/panels/racktype_dimensions.html b/netbox/templates/dcim/inc/panels/racktype_dimensions.html new file mode 100644 index 000000000..e955413ed --- /dev/null +++ b/netbox/templates/dcim/inc/panels/racktype_dimensions.html @@ -0,0 +1,48 @@ +{% load i18n %} +
+
{% trans "Dimensions" %}
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans "Form factor" %}{{ object.get_form_factor_display|placeholder }}
{% trans "Width" %}{{ object.get_width_display }}
{% trans "Height" %}{{ object.u_height }}U
{% trans "Outer Width" %} + {% if object.outer_width %} + {{ object.outer_width }} {{ object.get_outer_unit_display }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
{% trans "Outer Depth" %} + {% if object.outer_depth %} + {{ object.outer_depth }} {{ object.get_outer_unit_display }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
{% trans "Mounting Depth" %} + {% if object.mounting_depth %} + {{ object.mounting_depth }} {% trans "Millimeters" %} + {% else %} + {{ ''|placeholder }} + {% endif %} +
+
diff --git a/netbox/templates/dcim/inc/panels/racktype_numbering.html b/netbox/templates/dcim/inc/panels/racktype_numbering.html new file mode 100644 index 000000000..9a56fa43b --- /dev/null +++ b/netbox/templates/dcim/inc/panels/racktype_numbering.html @@ -0,0 +1,14 @@ +{% load i18n %} +
+
{% trans "Numbering" %}
+ + + + + + + + + +
{% trans "Starting Unit" %}{{ object.starting_unit }}
{% trans "Descending Units" %}{% checkmark object.desc_units %}
+
diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html index 2ae9726f7..9bf2f1827 100644 --- a/netbox/templates/dcim/rack.html +++ b/netbox/templates/dcim/rack.html @@ -9,155 +9,107 @@ {% block content %}
-
-
{% trans "Rack" %}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% trans "Region" %} - {% nested_tree object.site.region %} -
{% trans "Site" %}{{ object.site|linkify }}
{% trans "Location" %}{% nested_tree object.location %}
{% trans "Facility ID" %}{{ object.facility_id|placeholder }}
{% trans "Tenant" %} - {% if object.tenant.group %} - {{ object.tenant.group|linkify }} / - {% endif %} - {{ object.tenant|linkify|placeholder }} -
{% trans "Status" %}{% badge object.get_status_display bg_color=object.get_status_color %}
{% trans "Rack Type" %}{{ object.rack_type|linkify|placeholder }}
{% trans "Role" %}{{ object.role|linkify|placeholder }}
{% trans "Description" %}{{ object.description|placeholder }}
{% trans "Serial Number" %}{{ object.serial|placeholder }}
{% trans "Asset Tag" %}{{ object.asset_tag|placeholder }}
{% trans "Space Utilization" %}{% utilization_graph object.get_utilization %}
{% trans "Power Utilization" %}{% utilization_graph object.get_power_utilization %}
-
-
-
{% trans "Dimensions" %}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% trans "Form factor" %}{{ object.get_form_factor_display|placeholder }}
{% trans "Width" %}{{ object.get_width_display }}
{% trans "Height" %}{{ object.u_height }}U ({% if object.desc_units %}{% trans "descending" %}{% else %}{% trans "ascending" %}{% endif %})
{% trans "Starting Unit" %} - {{ object.starting_unit }} -
{% trans "Outer Width" %} - {% if object.outer_width %} - {{ object.outer_width }} {{ object.get_outer_unit_display }} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Outer Depth" %} - {% if object.outer_depth %} - {{ object.outer_depth }} {{ object.get_outer_unit_display }} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Mounting Depth" %} - {% if object.mounting_depth %} - {{ object.mounting_depth }} {% trans "Millimeters" %} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Rack Weight" %} - {% if object.weight %} - {{ object.weight|floatformat }} {{ object.get_weight_unit_display }} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Maximum Weight" %} - {% if object.max_weight %} - {{ object.max_weight }} {{ object.get_weight_unit_display }} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Total Weight" %} - {{ object.total_weight|floatformat }} {% trans "Kilograms" %} - ({{ object.total_weight|kg_to_pounds|floatformat }} {% trans "Pounds" %}) -
-
- {% include 'inc/panels/custom_fields.html' %} - {% include 'inc/panels/tags.html' %} - {% include 'inc/panels/comments.html' %} - {% include 'inc/panels/image_attachments.html' %} - {% plugin_left_page object %} +
+
{% trans "Rack" %}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans "Region" %}{% nested_tree object.site.region %}
{% trans "Site" %}{{ object.site|linkify }}
{% trans "Location" %}{% nested_tree object.location %}
{% trans "Facility ID" %}{{ object.facility_id|placeholder }}
{% trans "Tenant" %} + {% if object.tenant.group %} + {{ object.tenant.group|linkify }} / + {% endif %} + {{ object.tenant|linkify|placeholder }} +
{% trans "Status" %}{% badge object.get_status_display bg_color=object.get_status_color %}
{% trans "Rack Type" %}{{ object.rack_type|linkify|placeholder }}
{% trans "Role" %}{{ object.role|linkify|placeholder }}
{% trans "Description" %}{{ object.description|placeholder }}
{% trans "Serial Number" %}{{ object.serial|placeholder }}
{% trans "Asset Tag" %}{{ object.asset_tag|placeholder }}
{% trans "Space Utilization" %}{% utilization_graph object.get_utilization %}
{% trans "Power Utilization" %}{% utilization_graph object.get_power_utilization %}
+
+ {% include 'dcim/inc/panels/racktype_dimensions.html' %} + {% include 'dcim/inc/panels/racktype_numbering.html' %} +
+
{% trans "Weight" %}
+ + + + + + + + + + + + + +
{% trans "Rack Weight" %} + {% if object.weight %} + {{ object.weight|floatformat }} {{ object.get_weight_unit_display }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
{% trans "Maximum Weight" %} + {% if object.max_weight %} + {{ object.max_weight }} {{ object.get_weight_unit_display }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
{% trans "Total Weight" %} + {{ object.total_weight|floatformat }} {% trans "Kilograms" %} + ({{ object.total_weight|kg_to_pounds|floatformat }} {% trans "Pounds" %}) +
+
+ {% include 'inc/panels/custom_fields.html' %} + {% include 'inc/panels/tags.html' %} + {% include 'inc/panels/comments.html' %} + {% include 'inc/panels/image_attachments.html' %} + {% plugin_left_page object %}
@@ -168,26 +120,26 @@
-
-
-

{% trans "Front" %}

- {% include 'dcim/inc/rack_elevation.html' with face='front' extra_params=svg_extra %} -
+
+
+

{% trans "Front" %}

+ {% include 'dcim/inc/rack_elevation.html' with face='front' extra_params=svg_extra %}
-
-
-

{% trans "Rear" %}

- {% include 'dcim/inc/rack_elevation.html' with face='rear' extra_params=svg_extra %} -
+
+
+
+

{% trans "Rear" %}

+ {% include 'dcim/inc/rack_elevation.html' with face='rear' extra_params=svg_extra %}
+
{% include 'inc/panels/related_objects.html' %} {% plugin_right_page object %}
-
- {% plugin_full_width_page object %} -
+
+ {% plugin_full_width_page object %} +
{% endblock %} diff --git a/netbox/templates/dcim/racktype.html b/netbox/templates/dcim/racktype.html index d51faa112..0c82b13d1 100644 --- a/netbox/templates/dcim/racktype.html +++ b/netbox/templates/dcim/racktype.html @@ -20,63 +20,22 @@ {% trans "Name" %} {{ object.name }} - - {% trans "Form factor" %} - {{ object.get_form_factor_display|placeholder }} - {% trans "Description" %} {{ object.description|placeholder }}
+ {% include 'dcim/inc/panels/racktype_dimensions.html' %} + {% include 'inc/panels/tags.html' %} + {% include 'inc/panels/comments.html' %} + {% plugin_left_page object %} +
+
+ {% include 'dcim/inc/panels/racktype_numbering.html' %}
-
{% trans "Dimensions" %}
+
{% trans "Weight" %}
- - - - - - - - - - - - - - - - - - - - - - - -
{% trans "Width" %}{{ object.get_width_display }}
{% trans "Height" %}{{ object.u_height }}U ({% if object.desc_units %}{% trans "descending" %}{% else %}{% trans "ascending" %}{% endif %})
{% trans "Starting Unit" %} - {{ object.starting_unit }} -
{% trans "Outer Width" %} - {% if object.outer_width %} - {{ object.outer_width }} {{ object.get_outer_unit_display }} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Outer Depth" %} - {% if object.outer_depth %} - {{ object.outer_depth }} {{ object.get_outer_unit_display }} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Mounting Depth" %} - {% if object.mounting_depth %} - {{ object.mounting_depth }} {% trans "Millimeters" %} - {% else %} - {{ ''|placeholder }} - {% endif %} -
{% trans "Rack Weight" %} @@ -99,11 +58,6 @@
- {% include 'inc/panels/tags.html' %} - {% include 'inc/panels/comments.html' %} - {% plugin_left_page object %} -
-
{% include 'inc/panels/custom_fields.html' %} {% include 'inc/panels/related_objects.html' %} {% plugin_right_page object %}