Jeremy Stretch 1 год назад
Родитель
Сommit
b841875f63
2 измененных файлов с 5 добавлено и 5 удалено
  1. 1 1
      netbox/dcim/forms/filtersets.py
  2. 4 4
      netbox/templates/dcim/inventoryitem.html

+ 1 - 1
netbox/dcim/forms/filtersets.py

@@ -1524,7 +1524,7 @@ class InventoryItemFilterForm(DeviceComponentFilterForm):
     fieldsets = (
         FieldSet('q', 'filter_id', 'tag'),
         FieldSet(
-            'name', 'label', 'role_id', 'manufacturer_id', 'serial', 'asset_tag', 'discovered',
+            'name', 'label', 'status', 'role_id', 'manufacturer_id', 'serial', 'asset_tag', 'discovered',
             name=_('Attributes')
         ),
         FieldSet('region_id', 'site_group_id', 'site_id', 'location_id', 'rack_id', name=_('Location')),

+ 4 - 4
netbox/templates/dcim/inventoryitem.html

@@ -32,6 +32,10 @@
                         <th scope="row">{% trans "Label" %}</th>
                         <td>{{ object.label|placeholder }}</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 "Role" %}</th>
                         <td>{{ object.role|linkify|placeholder }}</td>
@@ -56,10 +60,6 @@
                         <th scope="row">{% trans "Asset Tag" %}</th>
                         <td>{{ object.asset_tag|placeholder }}</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>