Jeremy Stretch 1 день назад
Родитель
Сommit
4d53c8aeb5
2 измененных файлов с 1 добавлено и 73 удалено
  1. 1 1
      netbox/dcim/ui/panels.py
  2. 0 72
      netbox/templates/dcim/module.html

+ 1 - 1
netbox/dcim/ui/panels.py

@@ -177,7 +177,7 @@ class ModuleTypeProfilePanel(panels.ObjectAttributesPanel):
 class ModuleTypePanel(panels.ObjectAttributesPanel):
     profile = attrs.RelatedObjectAttr('profile', linkify=True)
     manufacturer = attrs.RelatedObjectAttr('manufacturer', linkify=True)
-    model = attrs.TextAttr('name')
+    model = attrs.TextAttr('model', label=_('Model name'))
     part_number = attrs.TextAttr('part_number')
     description = attrs.TextAttr('description')
     airflow = attrs.ChoiceAttr('airflow')

+ 0 - 72
netbox/templates/dcim/module.html

@@ -46,75 +46,3 @@
     </div>
   {% endif %}
 {% endblock %}
-
-{% block contentx %}
-<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 Bay" %}</th>
-          <td>{% nested_tree object.module_bay %}</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">
-    <div class="card">
-      <h2 class="card-header">{% trans "Module Type" %}</h2>
-      <table class="table table-hover attr-table">
-        <tr>
-          <th scope="row">{% trans "Manufacturer" %}</th>
-          <td>{{ object.module_type.manufacturer|linkify }}</td>
-        </tr>
-        <tr>
-          <th scope="row">{% trans "Model" %}</th>
-          <td>{{ object.module_type|linkify }}</td>
-        </tr>
-        {% for k, v in object.module_type.attributes.items %}
-          <tr>
-            <th scope="row">{{ k }}</th>
-            <td>{{ v|placeholder }}</td>
-          </tr>
-        {% endfor %}
-      </table>
-    </div>
-    {% 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 %}