diff --git a/netbox/dcim/ui/panels.py b/netbox/dcim/ui/panels.py
index 4661e3151..87ceb9c4a 100644
--- a/netbox/dcim/ui/panels.py
+++ b/netbox/dcim/ui/panels.py
@@ -6,6 +6,7 @@ from netbox.ui import attrs, panels
class SitePanel(panels.ObjectAttributesPanel):
region = attrs.NestedObjectAttr('region', linkify=True)
group = attrs.NestedObjectAttr('group', linkify=True)
+ name = attrs.TextAttr('name')
status = attrs.ChoiceAttr('status')
tenant = attrs.RelatedObjectAttr('tenant', linkify=True, grouped_by='group')
facility = attrs.TextAttr('facility')
@@ -42,7 +43,8 @@ class RackPanel(panels.ObjectAttributesPanel):
region = attrs.NestedObjectAttr('site.region', linkify=True)
site = attrs.RelatedObjectAttr('site', linkify=True, grouped_by='group')
location = attrs.NestedObjectAttr('location', linkify=True)
- facility = attrs.TextAttr('facility')
+ name = attrs.TextAttr('name')
+ facility = attrs.TextAttr('facility', label=_('Facility ID'))
tenant = attrs.RelatedObjectAttr('tenant', linkify=True, grouped_by='group')
status = attrs.ChoiceAttr('status')
rack_type = attrs.RelatedObjectAttr('rack_type', linkify=True, grouped_by='manufacturer')
@@ -58,13 +60,21 @@ class RackPanel(panels.ObjectAttributesPanel):
class RackWeightPanel(panels.ObjectAttributesPanel):
weight = attrs.NumericAttr('weight', unit_accessor='get_weight_unit_display')
max_weight = attrs.NumericAttr('max_weight', unit_accessor='get_weight_unit_display', label=_('Maximum weight'))
- total_weight = attrs.NumericAttr('total_weight', unit_accessor='get_weight_unit_display')
+ total_weight = attrs.TemplatedAttr('total_weight', template_name='dcim/rack/attrs/total_weight.html')
class RackRolePanel(panels.OrganizationalObjectPanel):
color = attrs.ColorAttr('color')
+class RackReservationPanel(panels.ObjectAttributesPanel):
+ units = attrs.TextAttr('unit_list')
+ status = attrs.ChoiceAttr('status')
+ tenant = attrs.RelatedObjectAttr('tenant', linkify=True, grouped_by='group')
+ user = attrs.RelatedObjectAttr('user')
+ description = attrs.TextAttr('description')
+
+
class RackTypePanel(panels.ObjectAttributesPanel):
manufacturer = attrs.RelatedObjectAttr('manufacturer', linkify=True)
model = attrs.TextAttr('model')
diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py
index 4cb5233e1..508b7e6f2 100644
--- a/netbox/dcim/views.py
+++ b/netbox/dcim/views.py
@@ -866,6 +866,7 @@ class RackTypeListView(generic.ObjectListView):
@register_model_view(RackType)
class RackTypeView(GetRelatedModelsMixin, generic.ObjectView):
+ template_name = 'generic/object.html'
queryset = RackType.objects.all()
layout = layout.SimpleLayout(
left_panels=[
@@ -1147,14 +1148,14 @@ class RackReservationView(generic.ObjectView):
queryset = RackReservation.objects.all()
layout = layout.SimpleLayout(
left_panels=[
- panels.RackPanel(accessor='object.rack', only=['region', 'site', 'location']),
+ panels.RackPanel(accessor='object.rack', only=['region', 'site', 'location', 'name']),
+ panels.RackReservationPanel(title=_('Reservation')),
CustomFieldsPanel(),
TagsPanel(),
CommentsPanel(),
- ImageAttachmentsPanel(),
],
right_panels=[
- TemplatePanel('dcim/panels/rack_elevations.html'),
+ TemplatePanel(template_name='dcim/panels/rack_reservation_elevations.html'),
RelatedObjectsPanel(),
],
)
@@ -1570,6 +1571,7 @@ class ModuleTypeProfileListView(generic.ObjectListView):
@register_model_view(ModuleTypeProfile)
class ModuleTypeProfileView(GetRelatedModelsMixin, generic.ObjectView):
+ template_name = 'generic/object.html'
queryset = ModuleTypeProfile.objects.all()
layout = layout.SimpleLayout(
left_panels=[
diff --git a/netbox/netbox/ui/panels.py b/netbox/netbox/ui/panels.py
index 5699c64e9..e62d9f422 100644
--- a/netbox/netbox/ui/panels.py
+++ b/netbox/netbox/ui/panels.py
@@ -198,8 +198,8 @@ class NestedGroupObjectPanel(ObjectAttributesPanel, metaclass=ObjectAttributesPa
"""
An ObjectPanel with attributes common to NestedGroupObjects. Includes the `parent` attribute.
"""
- name = attrs.TextAttr('name', label=_('Name'))
parent = attrs.NestedObjectAttr('parent', label=_('Parent'), linkify=True)
+ name = attrs.TextAttr('name', label=_('Name'))
description = attrs.TextAttr('description', label=_('Description'))
diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html
index f8b8e95c2..9719d6df1 100644
--- a/netbox/templates/dcim/device.html
+++ b/netbox/templates/dcim/device.html
@@ -1,375 +1 @@
{% extends 'dcim/device/base.html' %}
-{% load render_table from django_tables2 %}
-{% load buttons %}
-{% load static %}
-{% load helpers %}
-{% load plugins %}
-{% load i18n %}
-{% load l10n %}
-{% load mptt %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Region" %} |
- {% nested_tree object.site.region %} |
-
-
- | {% trans "Site" %} |
- {{ object.site|linkify }} |
-
-
- | {% trans "Location" %} |
- {% nested_tree object.location %} |
-
- {% if object.virtual_chassis %}
-
- | {% trans "Virtual Chassis" %} |
- {{ object.virtual_chassis|linkify }} |
-
- {% endif %}
-
- | {% trans "Rack" %} |
-
- {% if object.rack %}
- {{ object.rack|linkify }}
-
-
-
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "Position" %} |
-
- {% if object.parent_bay %}
- {% with object.parent_bay.device as parent %}
- {{ parent|linkify }} / {{ object.parent_bay }}
- {% if parent.position %}
- (U{{ parent.position|floatformat }} / {{ parent.get_face_display }})
- {% endif %}
- {% endwith %}
- {% elif object.rack and object.position %}
- U{{ object.position|floatformat }} / {{ object.get_face_display }}
- {% elif object.rack and object.device_type.u_height %}
- {% trans "Not racked" %}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "GPS Coordinates" %} |
-
- {% if object.latitude and object.longitude %}
- {% if config.MAPS_URL %}
-
- {% endif %}
- {{ object.latitude }}, {{ object.longitude }}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "Tenant" %} |
-
- {% if object.tenant.group %}
- {{ object.tenant.group|linkify }} /
- {% endif %}
- {{ object.tenant|linkify|placeholder }}
- |
-
-
- | {% trans "Device Type" %} |
-
- {{ object.device_type|linkify:"full_name" }} ({{ object.device_type.u_height|floatformat }}U)
- |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Airflow" %} |
-
- {{ object.get_airflow_display|placeholder }}
- |
-
-
- | {% trans "Serial Number" %} |
- {{ object.serial|placeholder }} |
-
-
- | {% trans "Asset Tag" %} |
- {{ object.asset_tag|placeholder }} |
-
-
- | {% trans "Config Template" %} |
- {{ object.config_template|linkify|placeholder }} |
-
-
-
- {% if vc_members %}
-
-
-
-
-
- | {% trans "Device" %} |
- {% trans "Position" %} |
- {% trans "Master" %} |
- {% trans "Priority" %} |
-
-
-
- {% for vc_member in vc_members %}
-
- | {{ vc_member|linkify }} |
- {% badge vc_member.vc_position show_empty=True %} |
-
- {% if object.virtual_chassis.master == vc_member %}
- {% checkmark True %}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
- {{ vc_member.vc_priority|placeholder }} |
-
- {% endfor %}
-
-
-
- {% endif %}
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/comments.html' %}
-
-
- {% htmx_table 'dcim:virtualdevicecontext_list' device_id=object.pk %}
-
- {% plugin_left_page object %}
-
-
-
-
-
-
- | {% trans "Status" %} |
- {% badge object.get_status_display bg_color=object.get_status_color %} |
-
-
- | {% trans "Role" %} |
- {{ object.role|linkify }} |
-
-
- | {% trans "Platform" %} |
- {{ object.platform|linkify|placeholder }} |
-
-
- | {% trans "Primary IPv4" %} |
-
- {% if object.primary_ip4 %}
- {{ object.primary_ip4.address.ip }}
- {% if object.primary_ip4.nat_inside %}
- ({% trans "NAT for" %} {{ object.primary_ip4.nat_inside.address.ip }})
- {% elif object.primary_ip4.nat_outside.exists %}
- ({% trans "NAT" %}: {% for nat in object.primary_ip4.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %})
- {% endif %}
- {% copy_content "primary_ip4" %}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "Primary IPv6" %} |
-
- {% if object.primary_ip6 %}
- {{ object.primary_ip6.address.ip }}
- {% if object.primary_ip6.nat_inside %}
- ({% trans "NAT for" %} {{ object.primary_ip6.nat_inside.address.ip }})
- {% elif object.primary_ip6.nat_outside.exists %}
- ({% trans "NAT" %}: {% for nat in object.primary_ip6.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %})
- {% endif %}
- {% copy_content "primary_ip6" %}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | Out-of-band IP |
-
- {% if object.oob_ip %}
- {{ object.oob_ip.address.ip }}
- {% if object.oob_ip.nat_inside %}
- ({% trans "NAT for" %} {{ object.oob_ip.nat_inside.address.ip }})
- {% elif object.oob_ip.nat_outside.exists %}
- ({% trans "NAT" %}: {% for nat in object.oob_ip.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %})
- {% endif %}
- {% copy_content "oob_ip" %}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
- {% if object.cluster %}
-
- | {% trans "Cluster" %} |
-
- {% if object.cluster.group %}
- {{ object.cluster.group|linkify }} /
- {% endif %}
- {{ object.cluster|linkify }}
- |
-
- {% endif %}
-
-
- {% if object.powerports.exists and object.poweroutlets.exists %}
-
-
-
-
-
- | {% trans "Input" %} |
- {% trans "Outlets" %} |
- {% trans "Allocated" %} |
- {% trans "Available" %} |
- {% trans "Utilization" %} |
-
-
- {% for powerport in object.powerports.all %}
- {% with utilization=powerport.get_power_draw powerfeed=powerport.connected_endpoints.0 %}
-
- | {{ powerport }} |
- {{ utilization.outlet_count }} |
- {{ utilization.allocated }}{% trans "VA" %} |
- {% if powerfeed.available_power %}
- {{ powerfeed.available_power }}{% trans "VA" %} |
- {% utilization_graph utilization.allocated|percentage:powerfeed.available_power %} |
- {% else %}
- — |
- — |
- {% endif %}
-
- {% for leg in utilization.legs %}
-
- |
- {% trans "Leg" context "Leg of a power feed" %} {{ leg.name }}
- |
- {{ leg.outlet_count }} |
- {{ leg.allocated }} |
- {% if powerfeed.available_power %}
- {% with phase_available=powerfeed.available_power|divide:3 %}
- {{ phase_available }}{% trans "VA" %} |
- {% utilization_graph leg.allocated|percentage:phase_available %} |
- {% endwith %}
- {% else %}
- — |
- — |
- {% endif %}
-
- {% endfor %}
- {% endwith %}
- {% endfor %}
-
-
- {% endif %}
-
-
- {% htmx_table 'ipam:service_list' device_id=object.pk %}
-
- {% include 'inc/panels/image_attachments.html' %}
-
-
-
-
- | {% trans "Height" %} |
-
- {{ object.device_type.u_height }}U
- |
-
-
- | {% trans "Weight" %} |
-
- {% if object.total_weight %}
- {{ object.total_weight|floatformat }} {% trans "Kilograms" %}
- ({{ object.total_weight|kg_to_pounds|floatformat }} {% trans "Pounds" %})
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
-
- {% if object.rack and object.position %}
-
-
-
{{ object.rack.name }}
- {% if object.rack.role %}
-
{{ object.rack.role }}
- {% endif %}
- {% if object.rack.facility_id %}
-
{{ object.rack.facility_id }}
- {% endif %}
-
-
-
-
{% trans "Front" %}
- {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='front' extra_params=svg_extra %}
-
-
-
-
-
{% trans "Rear" %}
- {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='rear' extra_params=svg_extra %}
-
-
-
- {% endif %}
- {% plugin_right_page object %}
-
-
-
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/devicetype.html b/netbox/templates/dcim/devicetype.html
index 909b5276e..4c9c678dc 100644
--- a/netbox/templates/dcim/devicetype.html
+++ b/netbox/templates/dcim/devicetype.html
@@ -1,112 +1 @@
{% extends 'dcim/devicetype/base.html' %}
-{% load buttons %}
-{% load helpers %}
-{% load plugins %}
-{% load i18n %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Manufacturer" %} |
- {{ object.manufacturer|linkify }} |
-
-
- | {% trans "Model Name" %} |
-
- {{ object.model }}
- {{ object.slug }}
- |
-
-
- | {% trans "Part Number" %} |
- {{ object.part_number|placeholder }} |
-
-
- | {% trans "Default Platform" %} |
- {{ object.default_platform|linkify }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Height (U)" %} |
- {{ object.u_height|floatformat }} |
-
-
- | {% trans "Exclude From Utilization" %} |
- {% checkmark object.exclude_from_utilization %} |
-
-
- | {% trans "Full Depth" %} |
- {% checkmark object.is_full_depth %} |
-
-
- | {% trans "Weight" %} |
-
- {% if object.weight %}
- {{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "Parent/Child" %} |
-
- {{ object.get_subdevice_role_display|placeholder }}
- |
-
-
- | {% trans "Airflow" %} |
-
- {{ object.get_airflow_display|placeholder }}
- |
-
-
- | {% trans "Front Image" %} |
-
- {% if object.front_image %}
-
-
-
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "Rear Image" %} |
-
- {% if object.rear_image %}
-
-
-
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
-
- {% include 'inc/panels/tags.html' %}
- {% plugin_left_page object %}
-
-
- {% include 'inc/panels/related_objects.html' %}
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/comments.html' %}
- {% include 'inc/panels/image_attachments.html' %}
- {% plugin_right_page object %}
-
-
-
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/location.html b/netbox/templates/dcim/location.html
index dfd0c32b3..07c64305a 100644
--- a/netbox/templates/dcim/location.html
+++ b/netbox/templates/dcim/location.html
@@ -1,8 +1,4 @@
{% extends 'generic/object.html' %}
-{% load helpers %}
-{% load plugins %}
-{% load render_table from django_tables2 %}
-{% load i18n %}
{% block breadcrumbs %}
{{ block.super }}
@@ -10,96 +6,3 @@
{{ location|linkify }}
{% endfor %}
{% endblock %}
-
-{% block extra_controls %}
- {% if perms.dcim.add_location %}
-
- {% trans "Add Child Location" %}
-
- {% endif %}
-{% endblock extra_controls %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Name" %} |
- {{ object.name }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Site" %} |
- {{ object.site|linkify }} |
-
-
- | {% trans "Parent" %} |
- {{ object.parent|linkify|placeholder }} |
-
-
- | {% trans "Status" %} |
- {% badge object.get_status_display bg_color=object.get_status_color %} |
-
-
- | {% trans "Tenant" %} |
-
- {% if object.tenant.group %}
- {{ object.tenant.group|linkify }} /
- {% endif %}
- {{ object.tenant|linkify|placeholder }}
- |
-
-
- | {% trans "Facility" %} |
- {{ object.facility|placeholder }} |
-
-
-
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/comments.html' %}
- {% plugin_left_page object %}
-
-
- {% include 'inc/panels/related_objects.html' %}
- {% include 'inc/panels/image_attachments.html' %}
- {% plugin_right_page object %}
-
-
-
-
-
-
- {% htmx_table 'dcim:location_list' parent_id=object.pk %}
-
-
-
- {% htmx_table 'dcim:device_list' location_id=object.pk rack_id='null' parent_bay_id='null' %}
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/manufacturer.html b/netbox/templates/dcim/manufacturer.html
index cb6251f63..f6bd7dfc3 100644
--- a/netbox/templates/dcim/manufacturer.html
+++ b/netbox/templates/dcim/manufacturer.html
@@ -1,7 +1,4 @@
{% extends 'generic/object.html' %}
-{% load helpers %}
-{% load plugins %}
-{% load render_table from django_tables2 %}
{% load i18n %}
{% block extra_controls %}
@@ -25,35 +22,3 @@
{% endif %}
{% endblock extra_controls %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Name" %} |
- {{ object.name }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
-
- {% include 'inc/panels/tags.html' %}
- {% plugin_left_page object %}
-
-
- {% include 'inc/panels/related_objects.html' %}
- {% include 'inc/panels/custom_fields.html' %}
- {% plugin_right_page object %}
-
-
-
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/moduletypeprofile.html b/netbox/templates/dcim/moduletypeprofile.html
deleted file mode 100644
index 87e576bda..000000000
--- a/netbox/templates/dcim/moduletypeprofile.html
+++ /dev/null
@@ -1,59 +0,0 @@
-{% extends 'generic/object.html' %}
-{% load buttons %}
-{% load helpers %}
-{% load plugins %}
-{% load i18n %}
-
-{% block title %}{{ object.name }}{% endblock %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Name" %} |
- {{ object.name }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
-
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/comments.html' %}
- {% plugin_left_page object %}
-
-
-
-
-
{{ object.schema|json }}
-
- {% include 'inc/panels/custom_fields.html' %}
- {% plugin_right_page object %}
-
-
-
-
-
-
- {% htmx_table 'dcim:moduletype_list' profile_id=object.pk %}
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/panels/rack_reservation_elevations.html b/netbox/templates/dcim/panels/rack_reservation_elevations.html
new file mode 100644
index 000000000..dab57f242
--- /dev/null
+++ b/netbox/templates/dcim/panels/rack_reservation_elevations.html
@@ -0,0 +1,15 @@
+{% load i18n %}
+
+
+
+
{% trans "Front" %}
+ {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='front' extra_params=svg_extra %}
+
+
+
+
+
{% trans "Rear" %}
+ {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='rear' extra_params=svg_extra %}
+
+
+
diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html
index eec4d63a5..a8f85e1f1 100644
--- a/netbox/templates/dcim/rack.html
+++ b/netbox/templates/dcim/rack.html
@@ -1,153 +1 @@
{% extends 'dcim/rack/base.html' %}
-{% load buttons %}
-{% load helpers %}
-{% load static %}
-{% load plugins %}
-{% load i18n %}
-{% load mptt %}
-
-{% block content %}
-
-
-
-
-
-
- | {% 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:"full_name"|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 "Airflow" %} |
- {{ object.get_airflow_display|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 "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" %} |
-
- {% if object.total_weight %}
- {{ object.total_weight|floatformat }} {% trans "Kilograms" %}
- ({{ object.total_weight|kg_to_pounds|floatformat }} {% trans "Pounds" %})
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
-
- {% 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 "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 %}
-
-
-
- {% include 'inc/panels/related_objects.html' %}
- {% plugin_right_page object %}
-
-
-
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/rack/attrs/total_weight.html b/netbox/templates/dcim/rack/attrs/total_weight.html
new file mode 100644
index 000000000..2db1d13e8
--- /dev/null
+++ b/netbox/templates/dcim/rack/attrs/total_weight.html
@@ -0,0 +1,3 @@
+{% load i18n %}
+{{ value|floatformat }} {% trans "Kilograms" %}
+({{ value|kg_to_pounds|floatformat }} {% trans "Pounds" %})
diff --git a/netbox/templates/dcim/rackreservation.html b/netbox/templates/dcim/rackreservation.html
index 87c4f7e4b..405117041 100644
--- a/netbox/templates/dcim/rackreservation.html
+++ b/netbox/templates/dcim/rackreservation.html
@@ -1,99 +1,8 @@
{% extends 'generic/object.html' %}
-{% load buttons %}
-{% load helpers %}
-{% load static %}
-{% load plugins %}
{% load i18n %}
-{% load mptt %}
{% block breadcrumbs %}
{{ block.super }}
{{ object.rack }}
{% trans "Units" %} {{ object.unit_list }}
{% endblock %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Region" %} |
-
- {% nested_tree object.rack.site.region %}
- |
-
-
- | {% trans "Site" %} |
- {{ object.rack.site|linkify }} |
-
-
- | {% trans "Location" %} |
- {{ object.rack.location|linkify|placeholder }} |
-
-
- | {% trans "Rack" %} |
- {{ object.rack|linkify }} |
-
-
-
-
-
-
-
- | {% trans "Units" %} |
- {{ object.unit_list }} |
-
-
- | {% trans "Status" %} |
- {% badge object.get_status_display bg_color=object.get_status_color %} |
-
-
- | {% trans "Tenant" %} |
-
- {% if object.tenant.group %}
- {{ object.tenant.group|linkify }} /
- {% endif %}
- {{ object.tenant|linkify|placeholder }}
- |
-
-
- | {% trans "User" %} |
- {{ object.user }} |
-
-
- | {% trans "Description" %} |
- {{ object.description }} |
-
-
-
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/comments.html' %}
- {% plugin_left_page object %}
-
-
-
-
-
-
{% trans "Front" %}
- {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='front' %}
-
-
-
-
-
{% trans "Rear" %}
- {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='rear' %}
-
-
-
- {% plugin_right_page object %}
-
-
-
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/rackrole.html b/netbox/templates/dcim/rackrole.html
index 87341d90e..5466eea21 100644
--- a/netbox/templates/dcim/rackrole.html
+++ b/netbox/templates/dcim/rackrole.html
@@ -1,7 +1,4 @@
{% extends 'generic/object.html' %}
-{% load helpers %}
-{% load plugins %}
-{% load render_table from django_tables2 %}
{% load i18n %}
{% block extra_controls %}
@@ -11,41 +8,3 @@
{% endif %}
{% endblock extra_controls %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Name" %} |
- {{ object.name }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Color" %} |
-
-
- |
-
-
-
- {% include 'inc/panels/tags.html' %}
- {% plugin_left_page object %}
-
-
- {% include 'inc/panels/related_objects.html' %}
- {% include 'inc/panels/custom_fields.html' %}
- {% plugin_right_page object %}
-
-
-
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/racktype.html b/netbox/templates/dcim/racktype.html
deleted file mode 100644
index cfeba02fe..000000000
--- a/netbox/templates/dcim/racktype.html
+++ /dev/null
@@ -1,75 +0,0 @@
-{% extends 'generic/object.html' %}
-{% load buttons %}
-{% load helpers %}
-{% load static %}
-{% load plugins %}
-{% load i18n %}
-{% load mptt %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Manufacturer" %} |
- {{ object.manufacturer|linkify }} |
-
-
- | {% trans "Model" %} |
- {{ object.model }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Airflow" %} |
- {{ object.get_airflow_display|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 "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 %}
- |
-
-
-
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/related_objects.html' %}
- {% plugin_right_page object %}
-
-
-
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/region.html b/netbox/templates/dcim/region.html
index f11868b0a..8fdf314ae 100644
--- a/netbox/templates/dcim/region.html
+++ b/netbox/templates/dcim/region.html
@@ -1,7 +1,4 @@
{% extends 'generic/object.html' %}
-{% load helpers %}
-{% load plugins %}
-{% load render_table from django_tables2 %}
{% load i18n %}
{% block breadcrumbs %}
@@ -18,53 +15,3 @@
{% endif %}
{% endblock extra_controls %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Name" %} |
- {{ object.name }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Parent" %} |
- {{ object.parent|linkify|placeholder }} |
-
-
-
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/comments.html' %}
- {% plugin_left_page object %}
-
-
- {% include 'inc/panels/related_objects.html' %}
- {% plugin_right_page object %}
-
-
-
-
-
-
- {% htmx_table 'dcim:region_list' parent_id=object.pk %}
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html
index cf65961d9..3cefe59b1 100644
--- a/netbox/templates/dcim/site.html
+++ b/netbox/templates/dcim/site.html
@@ -1,10 +1,4 @@
{% extends 'generic/object.html' %}
-{% load helpers %}
-{% load plugins %}
-{% load tz %}
-{% load i18n %}
-{% load l10n %}
-{% load mptt %}
{% block breadcrumbs %}
{{ block.super }}
@@ -20,135 +14,3 @@
{{ object.group }}
{% endif %}
{% endblock %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Region" %} |
-
- {% nested_tree object.region %}
- |
-
-
- | {% trans "Group" %} |
-
- {% nested_tree object.group %}
- |
-
-
- | {% trans "Status" %} |
- {% badge object.get_status_display bg_color=object.get_status_color %} |
-
-
- | {% trans "Tenant" %} |
-
- {% if object.tenant.group %}
- {{ object.tenant.group|linkify }} /
- {% endif %}
- {{ object.tenant|linkify|placeholder }}
- |
-
-
- | {% trans "Facility" %} |
- {{ object.facility|placeholder }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Time Zone" %} |
-
- {% if object.time_zone %}
- {{ object.time_zone }} ({% trans "UTC" %} {{ object.time_zone|tzoffset }})
- {% trans "Site time" %}: {% timezone object.time_zone %}{% now 'Y-m-d H:i' %}{% endtimezone %}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "Physical Address" %} |
-
- {% if object.physical_address %}
- {{ object.physical_address|linebreaksbr }}
- {% if config.MAPS_URL %}
-
- {% trans "Map" %}
-
- {% endif %}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
- | {% trans "Shipping Address" %} |
- {{ object.shipping_address|linebreaksbr|placeholder }} |
-
-
- | {% trans "GPS Coordinates" %} |
-
- {% if object.latitude and object.longitude %}
- {% if config.MAPS_URL %}
-
- {% endif %}
- {{ object.latitude }}, {{ object.longitude }}
- {% else %}
- {{ ''|placeholder }}
- {% endif %}
- |
-
-
-
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/comments.html' %}
- {% plugin_left_page object %}
-
-
- {% include 'inc/panels/related_objects.html' with filter_name='site_id' %}
- {% include 'inc/panels/image_attachments.html' %}
- {% plugin_right_page object %}
-
-
-
-
-
-
- {% htmx_table 'dcim:location_list' site_id=object.pk %}
-
-
-
- {% htmx_table 'dcim:device_list' site_id=object.pk rack_id='null' parent_bay_id='null' %}
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}
diff --git a/netbox/templates/dcim/sitegroup.html b/netbox/templates/dcim/sitegroup.html
index dc9aca6f5..b25156ea2 100644
--- a/netbox/templates/dcim/sitegroup.html
+++ b/netbox/templates/dcim/sitegroup.html
@@ -1,7 +1,4 @@
{% extends 'generic/object.html' %}
-{% load helpers %}
-{% load plugins %}
-{% load render_table from django_tables2 %}
{% load i18n %}
{% block breadcrumbs %}
@@ -18,53 +15,3 @@
{% endif %}
{% endblock extra_controls %}
-
-{% block content %}
-
-
-
-
-
-
- | {% trans "Name" %} |
- {{ object.name }} |
-
-
- | {% trans "Description" %} |
- {{ object.description|placeholder }} |
-
-
- | {% trans "Parent" %} |
- {{ object.parent|linkify|placeholder }} |
-
-
-
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/comments.html' %}
- {% plugin_left_page object %}
-
-
- {% include 'inc/panels/related_objects.html' %}
- {% plugin_right_page object %}
-
-
-
-
-
-
- {% htmx_table 'dcim:sitegroup_list' parent_id=object.pk %}
-
- {% plugin_full_width_page object %}
-
-
-{% endblock %}