|
|
@@ -37,6 +37,11 @@ class SitePanel(panels.ObjectAttributesPanel):
|
|
|
facility = attrs.TextAttr('facility')
|
|
|
description = attrs.TextAttr('description')
|
|
|
timezone = attrs.TimezoneAttr('time_zone')
|
|
|
+
|
|
|
+
|
|
|
+class SiteLocationPanel(panels.ObjectAttributesPanel):
|
|
|
+ title = _('Location')
|
|
|
+
|
|
|
physical_address = attrs.AddressAttr('physical_address', map_url=True, copy_button=True)
|
|
|
shipping_address = attrs.AddressAttr('shipping_address', map_url=True, copy_button=True)
|
|
|
gps_coordinates = attrs.GPSCoordinatesAttr()
|
|
|
@@ -115,15 +120,8 @@ class RackTypePanel(panels.ObjectAttributesPanel):
|
|
|
|
|
|
|
|
|
class DevicePanel(panels.ObjectAttributesPanel):
|
|
|
- region = attrs.NestedObjectAttr('site.region', linkify=True)
|
|
|
- site = attrs.RelatedObjectAttr('site', linkify=True, grouped_by='group')
|
|
|
- location = attrs.NestedObjectAttr('location', linkify=True)
|
|
|
- rack = attrs.TemplatedAttr('rack', template_name='dcim/device/attrs/rack.html')
|
|
|
virtual_chassis = attrs.RelatedObjectAttr('virtual_chassis', linkify=True)
|
|
|
parent_device = attrs.TemplatedAttr('parent_bay', template_name='dcim/device/attrs/parent_device.html')
|
|
|
- gps_coordinates = attrs.GPSCoordinatesAttr()
|
|
|
- mercator_x = attrs.NumericAttr('mercator_x', label=_('Web Mercator X'), copy_button=True, localize=False)
|
|
|
- mercator_y = attrs.NumericAttr('mercator_y', label=_('Web Mercator Y'), copy_button=True, localize=False)
|
|
|
tenant = attrs.RelatedObjectAttr('tenant', linkify=True, grouped_by='group')
|
|
|
description = attrs.TextAttr('description')
|
|
|
cooling_method = attrs.ChoiceAttr('cooling_method')
|
|
|
@@ -133,6 +131,18 @@ class DevicePanel(panels.ObjectAttributesPanel):
|
|
|
config_template = attrs.RelatedObjectAttr('config_template', linkify=True)
|
|
|
|
|
|
|
|
|
+class DeviceLocationPanel(panels.ObjectAttributesPanel):
|
|
|
+ title = _('Location')
|
|
|
+
|
|
|
+ region = attrs.NestedObjectAttr('site.region', linkify=True)
|
|
|
+ site = attrs.RelatedObjectAttr('site', linkify=True, grouped_by='group')
|
|
|
+ location = attrs.NestedObjectAttr('location', linkify=True)
|
|
|
+ rack = attrs.TemplatedAttr('rack', template_name='dcim/device/attrs/rack.html')
|
|
|
+ gps_coordinates = attrs.GPSCoordinatesAttr()
|
|
|
+ mercator_x = attrs.NumericAttr('mercator_x', label=_('Web Mercator X'), copy_button=True, localize=False)
|
|
|
+ mercator_y = attrs.NumericAttr('mercator_y', label=_('Web Mercator Y'), copy_button=True, localize=False)
|
|
|
+
|
|
|
+
|
|
|
class DeviceManagementPanel(panels.ObjectAttributesPanel):
|
|
|
title = _('Management')
|
|
|
|