1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

275 lines
12 KiB
HTML
Raw Normal View History

2021-03-02 15:58:33 -05:00
{% extends 'generic/object.html' %}
{% load buttons %}
2016-03-01 11:23:03 -05:00
{% load helpers %}
{% load static %}
{% load plugins %}
2016-03-01 11:23:03 -05:00
2021-03-02 15:58:33 -05:00
{% block title %}Rack {{ object }}{% endblock %}
{% block breadcrumbs %}
2021-07-20 12:14:01 -04:00
{{ block.super }}
Merge branch 'feature' of https://github.com/netbox-community/netbox into feature # Conflicts: # netbox/dcim/tables/template_code.py # netbox/netbox/views/__init__.py # netbox/project-static/css/base.css # netbox/templates/base.html # netbox/templates/circuits/circuit.html # netbox/templates/circuits/circuittermination_edit.html # netbox/templates/circuits/inc/circuit_termination.html # netbox/templates/circuits/provider.html # netbox/templates/dcim/device.html # netbox/templates/dcim/device/base.html # netbox/templates/dcim/device_component.html # netbox/templates/dcim/devicetype.html # netbox/templates/dcim/inc/device_napalm_tabs.html # netbox/templates/dcim/rack.html # netbox/templates/dcim/site.html # netbox/templates/dcim/virtualchassis.html # netbox/templates/extras/configcontext.html # netbox/templates/extras/object_journal.html # netbox/templates/extras/tag.html # netbox/templates/generic/object.html # netbox/templates/generic/object_list.html # netbox/templates/home.html # netbox/templates/inc/nav_menu.html # netbox/templates/ipam/aggregate.html # netbox/templates/ipam/ipaddress.html # netbox/templates/ipam/prefix.html # netbox/templates/ipam/vlan.html # netbox/templates/ipam/vlangroup_edit.html # netbox/templates/ipam/vlangroup_vlans.html # netbox/templates/secrets/secret.html # netbox/templates/tenancy/tenant.html # netbox/templates/users/api_tokens.html # netbox/templates/virtualization/cluster.html # netbox/templates/virtualization/vminterface_edit.html # netbox/utilities/forms/fields.py # netbox/utilities/templates/buttons/export.html
2021-04-14 11:30:15 -07:00
<li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li>
2021-07-20 12:14:01 -04:00
{% if object.location %}
{% for location in object.location.get_ancestors %}
<li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?location_id={{ location.pk }}">{{ location }}</a></li>
2021-03-02 15:58:33 -05:00
{% endfor %}
2021-07-20 12:14:01 -04:00
<li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?location_id={{ object.location.pk }}">{{ object.location }}</a></li>
2021-03-02 15:58:33 -05:00
{% endif %}
{% endblock %}
2021-03-19 09:25:27 -07:00
{% block extra_controls %}
<a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}{% endif %}" class="btn btn-sm btn-primary{% if not prev_rack %} disabled{% endif %}">
2021-07-20 13:46:59 -04:00
<i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous
2021-03-02 15:58:33 -05:00
</a>
<a {% if next_rack %}href="{% url 'dcim:rack' pk=next_rack.pk %}{% endif %}" class="btn btn-sm btn-primary{% if not next_rack %} disabled{% endif %}">
2021-07-20 13:46:59 -04:00
<i class="mdi mdi-chevron-right" aria-hidden="true"></i> Next
2021-03-02 15:58:33 -05:00
</a>
2018-06-14 16:15:14 -04:00
{% endblock %}
{% block content %}
2021-07-21 11:20:35 -04:00
<div class="row">
<div class="col col-12 col-xl-5">
<div class="card">
<h5 class="card-header">
Rack
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">Site</th>
<td>
{% if object.site.region %}
2022-03-22 14:51:20 -04:00
{{ object.site.region|linkify }} /
2017-02-28 16:10:53 -05:00
{% endif %}
2022-03-22 14:51:20 -04:00
{{ object.site|linkify }}
</td>
2021-07-21 11:20:35 -04:00
</tr>
<tr>
2021-07-21 11:20:35 -04:00
<th scope="row">Location</th>
<td>
2021-07-21 11:20:35 -04:00
{% if object.location %}
{% for location in object.location.get_ancestors %}
2022-03-22 14:51:20 -04:00
{{ location|linkify }} /
{% endfor %}
2022-03-22 14:51:20 -04:00
{{ object.location|linkify }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Facility ID</th>
<td>{{ object.facility_id|placeholder }}</td>
</tr>
<tr>
<th scope="row">Tenant</th>
<td>
2022-03-22 15:29:05 -04:00
{% if object.tenant.group %}
{{ object.tenant.group|linkify }} /
{% endif %}
2022-03-22 15:29:05 -04:00
{{ object.tenant|linkify|placeholder }}
</td>
</tr>
<tr>
<th scope="row">Status</th>
<td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
</tr>
<tr>
<th scope="row">Role</th>
2022-03-22 14:51:20 -04:00
<td>{{ object.role|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">Description</th>
<td>{{ object.description|placeholder }}</td>
</tr>
<tr>
<th scope="row">Serial Number</th>
<td class="font-monospace">{{ object.serial|placeholder }}</td>
</tr>
2018-11-02 09:17:51 -04:00
<tr>
<th scope="row">Asset Tag</th>
<td class="font-monospace">{{ object.asset_tag|placeholder }}</td>
2018-11-02 09:17:51 -04:00
</tr>
<tr>
<th scope="row">Space Utilization</th>
<td>{% utilization_graph object.get_utilization %}</td>
</tr>
<tr>
<th scope="row">Power Utilization</th>
<td>{% utilization_graph object.get_power_utilization %}</td>
</tr>
</table>
</div>
</div>
<div class="card">
<h5 class="card-header">Dimensions</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">Type</th>
<td>
{% if object.type %}
{{ object.get_type_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Width</th>
<td>{{ object.get_width_display }}</td>
</tr>
<tr>
<th scope="row">Height</th>
<td>{{ object.u_height }}U ({% if object.desc_units %}descending{% else %}ascending{% endif %})</td>
</tr>
<tr>
<th scope="row">Outer Width</th>
<td>
{% if object.outer_width %}
{{ object.outer_width }} {{ object.get_outer_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Outer Depth</th>
<td>
{% if object.outer_depth %}
{{ object.outer_depth }} {{ object.get_outer_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Mounting Depth</th>
<td>
{% if object.mounting_depth %}
{{ object.mounting_depth }} Millimeters
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Rack Weight</th>
<td>
{% if object.weight %}
{{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Maximum Weight</th>
<td>
{% if object.max_weight %}
{{ object.max_weight }} {{ object.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Total Weight</th>
2022-11-15 15:30:39 -05:00
<td>
{{ object.total_weight|floatformat }} Kilograms
({{ object.total_weight|kg_to_pounds|floatformat }} Pounds)
</td>
</tr>
</table>
</div>
2016-03-01 11:23:03 -05:00
</div>
2021-10-19 14:21:31 -04:00
{% include 'inc/panels/custom_fields.html' %}
{% include 'inc/panels/tags.html' %}
2021-10-19 14:21:31 -04:00
{% include 'inc/panels/comments.html' %}
{% include 'inc/panels/image_attachments.html' %}
<div class="card">
<h5 class="card-header">
Reservations
</h5>
<div class="card-body">
{% if reservations %}
<table class="table table-hover">
<tr>
<th>Units</th>
<th>Tenant</th>
<th>Description</th>
<th></th>
</tr>
{% for resv in reservations %}
<tr>
<td>{{ resv|linkify:"unit_list" }}</td>
2022-03-22 14:51:20 -04:00
<td>{{ resv.tenant|linkify|placeholder }}</td>
<td>
{{ resv.description }}<br />
<small>{{ resv.user }} &middot; {{ resv.created|annotated_date }}</small>
</td>
<td class="text-end noprint">
{% if perms.dcim.change_rackreservation %}
2021-04-18 16:42:28 -07:00
<a href="{% url 'dcim:rackreservation_edit' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-sm" title="Edit Reservation">
<i class="mdi mdi-pencil" aria-hidden="true"></i>
</a>
{% endif %}
{% if perms.dcim.delete_rackreservation %}
2021-04-18 16:42:28 -07:00
<a href="{% url 'dcim:rackreservation_delete' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-sm" title="Delete Reservation">
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="text-muted">None</div>
{% endif %}
</div>
{% if perms.dcim.add_rackreservation %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:rackreservation_add' %}?rack={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-sm">
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
Add a Reservation
</a>
</div>
{% endif %}
</div>
{% plugin_left_page object %}
2021-07-21 11:20:35 -04:00
</div>
<div class="col col-12 col-xl-7">
2021-10-07 12:41:24 -04:00
<div class="text-end mb-4">
<select class="btn btn-sm btn-outline-dark rack-view">
<option value="images-and-labels" selected="selected">Images and Labels</option>
<option value="images-only">Images only</option>
<option value="labels-only">Labels only</option>
</select>
</div>
2019-04-02 13:50:57 -04:00
<div class="row" style="margin-bottom: 20px">
2021-04-30 15:55:37 -07:00
<div class="col col-md-6 col-sm-6 col-xs-12 text-center">
<div style="margin-left: 30px">
<h4>Front</h4>
{% include 'dcim/inc/rack_elevation.html' with face='front' extra_params=svg_extra %}
</div>
2019-04-02 13:50:57 -04:00
</div>
2021-04-30 15:55:37 -07:00
<div class="col col-md-6 col-sm-6 col-xs-12 text-center">
<div style="margin-left: 30px">
<h4>Rear</h4>
{% include 'dcim/inc/rack_elevation.html' with face='rear' extra_params=svg_extra %}
</div>
2019-04-02 13:50:57 -04:00
</div>
</div>
{% include 'inc/panels/related_objects.html' %}
{% include 'dcim/inc/nonracked_devices.html' %}
2021-10-19 14:21:31 -04:00
{% include 'inc/panels/contacts.html' %}
{% plugin_right_page object %}
</div>
2021-07-21 11:20:35 -04:00
</div>
<div class="row">
<div class="col col-md-12">
{% plugin_full_width_page object %}
</div>
</div>
2016-03-01 11:23:03 -05:00
{% endblock %}