Arthur 1 settimana fa
parent
commit
a6e8028957

+ 5 - 3
netbox/dcim/forms/filtersets.py

@@ -581,8 +581,9 @@ class DeviceTypeFilterForm(PrimaryModelFilterSetForm):
         FieldSet('q', 'filter_id', 'tag'),
         FieldSet(
             'manufacturer_id', 'default_platform_id', 'part_number', 'device_count',
-            'subdevice_role', 'airflow', 'cooling_method', name=_('Hardware')
+            'subdevice_role', name=_('Hardware')
         ),
+        FieldSet('cooling_method', 'airflow', name=_('Cooling')),
         FieldSet('has_front_image', 'has_rear_image', name=_('Images')),
         FieldSet(
             'console_ports', 'console_server_ports', 'power_ports', 'power_outlets', 'interfaces',
@@ -883,8 +884,9 @@ class DeviceFilterForm(
     fieldsets = (
         FieldSet('q', 'filter_id', 'tag'),
         FieldSet('region_id', 'site_group_id', 'site_id', 'location_id', 'rack_id', name=_('Location')),
-        FieldSet('status', 'role_id', 'airflow', 'serial', 'asset_tag', 'mac_address', name=_('Operation')),
-        FieldSet('manufacturer_id', 'device_type_id', 'platform_id', 'cooling_method', name=_('Hardware')),
+        FieldSet('status', 'role_id', 'serial', 'asset_tag', 'mac_address', name=_('Operation')),
+        FieldSet('manufacturer_id', 'device_type_id', 'platform_id', name=_('Hardware')),
+        FieldSet('cooling_method', 'airflow', name=_('Cooling')),
         FieldSet('tenant_group_id', 'tenant_id', name=_('Tenant')),
         FieldSet('owner_group_id', 'owner_id', name=_('Ownership')),
         FieldSet('contact', 'contact_role', 'contact_group', name=_('Contacts')),

+ 2 - 1
netbox/dcim/forms/model_forms.py

@@ -438,8 +438,9 @@ class DeviceTypeForm(PrimaryModelForm):
         FieldSet('manufacturer', 'model', 'slug', 'default_platform', 'description', 'tags', name=_('Device Type')),
         FieldSet(
             'u_height', 'exclude_from_utilization', 'is_full_depth', 'part_number', 'subdevice_role',
-            'cooling_method', 'airflow', 'weight', 'weight_unit', name=_('Chassis')
+            'weight', 'weight_unit', name=_('Chassis')
         ),
+        FieldSet('cooling_method', 'airflow', name=_('Cooling')),
         FieldSet('front_image', 'rear_image', name=_('Images')),
     )
 

+ 8 - 2
netbox/templates/dcim/device_edit.html

@@ -22,12 +22,18 @@
         <h2 class="col-9 offset-3">{% trans "Hardware" %}</h2>
       </div>
       {% render_field form.device_type %}
-      {% render_field form.cooling_method %}
-      {% render_field form.airflow %}
       {% render_field form.serial %}
       {% render_field form.asset_tag %}
     </div>
 
+    <div class="field-group my-5">
+      <div class="row">
+        <h2 class="col-9 offset-3">{% trans "Cooling" %}</h2>
+      </div>
+      {% render_field form.cooling_method %}
+      {% render_field form.airflow %}
+    </div>
+
     <div class="field-group my-5">
       <div class="row">
         <h2 class="col-9 offset-3">{% trans "Location" %}</h2>