| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- {% extends 'generic/object.html' %}
- {% load helpers %}
- {% load plugins %}
- {% load tz %}
- {% load i18n %}
- {% 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 %}
- {% block extra_controls %}
- {% if perms.dcim.change_module %}
- <div class="dropdown">
- <button id="add-components" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
- <i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Components" %}
- </button>
- <ul class="dropdown-menu" aria-labeled-by="add-components">
- {% if perms.dcim.add_consoleport %}
- <li><a class="dropdown-item" href="{% url 'dcim:consoleport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Console Ports" %}</a></li>
- {% endif %}
- {% if perms.dcim.add_consoleserverport %}
- <li><a class="dropdown-item" href="{% url 'dcim:consoleserverport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Console Server Ports" %}</a></li>
- {% endif %}
- {% if perms.dcim.add_powerport %}
- <li><a class="dropdown-item" href="{% url 'dcim:powerport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Power Ports" %}</a></li>
- {% endif %}
- {% if perms.dcim.add_poweroutlet %}
- <li><a class="dropdown-item" href="{% url 'dcim:poweroutlet_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Power Outlets" %}</a></li>
- {% endif %}
- {% if perms.dcim.add_interface %}
- <li><a class="dropdown-item" href="{% url 'dcim:interface_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Interfaces" %}</a></li>
- {% endif %}
- {% if perms.dcim.add_frontport %}
- <li><a class="dropdown-item" href="{% url 'dcim:frontport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Front Ports" %}</a></li>
- {% endif %}
- {% if perms.dcim.add_rearport %}
- <li><a class="dropdown-item" href="{% url 'dcim:rearport_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Rear Ports" %}</a></li>
- {% endif %}
- {% if perms.dcim.add_modulebay %}
- <li><a class="dropdown-item" href="{% url 'dcim:modulebay_add' %}?device={{ object.device.pk }}&module={{ object.pk }}&return_url={{ object.get_absolute_url }}">{% trans "Module Bays" %}</a></li>
- {% endif %}
- </ul>
- </div>
- {% endif %}
- {% endblock %}
- {% block content %}
- <div class="row">
- <div class="col col-12 col-md-6">
- <div class="card">
- <h2 class="card-header">{% trans "Module" %}</h2>
- <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:"full_name" }}</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>
- </div>
- {% include 'inc/panels/tags.html' %}
- {% include 'inc/panels/comments.html' %}
- {% plugin_left_page object %}
- </div>
- <div class="col col-12 col-md-6">
- {% include 'inc/panels/related_objects.html' %}
- {% include 'inc/panels/custom_fields.html' %}
- {% plugin_right_page object %}
- </div>
- </div>
- <div class="row">
- <div class="col col-md-12">
- {% plugin_full_width_page object %}
- </div>
- </div>
- {% endblock %}
|