2021-12-17 16:12:03 -05:00
|
|
|
{% extends 'generic/object.html' %}
|
|
|
|
{% load helpers %}
|
|
|
|
{% load plugins %}
|
|
|
|
{% load tz %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% load i18n %}
|
2021-12-17 16:12:03 -05:00
|
|
|
|
|
|
|
{% block breadcrumbs %}
|
|
|
|
{{ block.super }}
|
|
|
|
<li class="breadcrumb-item">
|
|
|
|
<a href="{% url 'dcim:module_list' %}?module_type_id={{ object.module_type.pk }}">{{ object.module_type }}</a>
|
|
|
|
</li>
|
|
|
|
{% endblock %}
|
|
|
|
|
2022-03-23 13:50:03 -04:00
|
|
|
{% block extra_controls %}
|
2022-03-23 14:00:56 -04:00
|
|
|
{% if perms.dcim.change_module %}
|
|
|
|
<div class="dropdown">
|
2024-01-17 16:25:42 -05:00
|
|
|
<button id="add-components" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Components" %}
|
2022-03-23 14:00:56 -04:00
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu" aria-labeled-by="add-components">
|
|
|
|
{% if perms.dcim.add_consoleport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:consoleport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={% url 'dcim:device_consoleports' pk=object.device.pk %}">{% trans "Console Ports" %}</a></li>
|
2022-03-23 14:00:56 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_consoleserverport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:consoleserverport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=object.device.pk %}">{% trans "Console Server Ports" %}</a></li>
|
2022-03-23 14:00:56 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_powerport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:powerport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={% url 'dcim:device_powerports' pk=object.device.pk %}">{% trans "Power Ports" %}</a></li>
|
2022-03-23 14:00:56 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_poweroutlet %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:poweroutlet_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.device.pk %}">{% trans "Power Outlets" %}</a></li>
|
2022-03-23 14:00:56 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_interface %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:interface_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.device.pk %}">{% trans "Interfaces" %}</a></li>
|
2022-03-23 14:00:56 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_frontport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:frontport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.device.pk %}">{% trans "Front Ports" %}</a></li>
|
2022-03-23 14:00:56 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_rearport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:rearport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={% url 'dcim:device_rearports' pk=object.device.pk %}">{% trans "Rear Ports" %}</a></li>
|
2022-03-23 14:00:56 -04:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-03-23 13:50:03 -04:00
|
|
|
{% endblock %}
|
|
|
|
|
2021-12-17 16:12:03 -05:00
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col col-md-6">
|
|
|
|
<div class="card">
|
2023-07-29 03:30:25 +07:00
|
|
|
<h5 class="card-header">{% trans "Module" %}</h5>
|
2024-01-17 16:25:42 -05:00
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Device" %}</th>
|
|
|
|
<td>{{ object.device|linkify }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Device Type" %}</th>
|
|
|
|
<td>{{ object.device.device_type|linkify }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Module Type" %}</th>
|
|
|
|
<td>{{ object.module_type|linkify }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Status" %}</th>
|
|
|
|
<td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Description" %}</th>
|
|
|
|
<td>{{ object.description|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Serial Number" %}</th>
|
|
|
|
<td class="font-monospace">{{ object.serial|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Asset Tag" %}</th>
|
|
|
|
<td class="font-monospace">{{ object.asset_tag|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2021-12-17 16:12:03 -05:00
|
|
|
</div>
|
|
|
|
{% include 'inc/panels/tags.html' %}
|
|
|
|
{% include 'inc/panels/comments.html' %}
|
|
|
|
{% plugin_left_page object %}
|
2023-01-25 17:27:57 -05:00
|
|
|
</div>
|
|
|
|
<div class="col col-md-6">
|
|
|
|
{% include 'inc/panels/related_objects.html' %}
|
|
|
|
{% include 'inc/panels/custom_fields.html' %}
|
|
|
|
{% plugin_right_page object %}
|
2021-12-17 16:12:03 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col col-md-12">
|
|
|
|
{% plugin_full_width_page object %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|