@@ -7,7 +7,7 @@ class SitePanel(panels.ObjectAttributesPanel):
77 region = attrs .NestedObjectAttr ('region' , linkify = True )
88 group = attrs .NestedObjectAttr ('group' , linkify = True )
99 status = attrs .ChoiceAttr ('status' )
10- tenant = attrs .ObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
10+ tenant = attrs .RelatedObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
1111 facility = attrs .TextAttr ('facility' )
1212 description = attrs .TextAttr ('description' )
1313 timezone = attrs .TimezoneAttr ('time_zone' )
@@ -17,9 +17,9 @@ class SitePanel(panels.ObjectAttributesPanel):
1717
1818
1919class LocationPanel (panels .NestedGroupObjectPanel ):
20- site = attrs .ObjectAttr ('site' , linkify = True , grouped_by = 'group' )
20+ site = attrs .RelatedObjectAttr ('site' , linkify = True , grouped_by = 'group' )
2121 status = attrs .ChoiceAttr ('status' )
22- tenant = attrs .ObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
22+ tenant = attrs .RelatedObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
2323 facility = attrs .TextAttr ('facility' )
2424
2525
@@ -40,13 +40,13 @@ class RackNumberingPanel(panels.ObjectAttributesPanel):
4040
4141class RackPanel (panels .ObjectAttributesPanel ):
4242 region = attrs .NestedObjectAttr ('site.region' , linkify = True )
43- site = attrs .ObjectAttr ('site' , linkify = True , grouped_by = 'group' )
43+ site = attrs .RelatedObjectAttr ('site' , linkify = True , grouped_by = 'group' )
4444 location = attrs .NestedObjectAttr ('location' , linkify = True )
4545 facility = attrs .TextAttr ('facility' )
46- tenant = attrs .ObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
46+ tenant = attrs .RelatedObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
4747 status = attrs .ChoiceAttr ('status' )
48- rack_type = attrs .ObjectAttr ('rack_type' , linkify = True , grouped_by = 'manufacturer' )
49- role = attrs .ObjectAttr ('role' , linkify = True )
48+ rack_type = attrs .RelatedObjectAttr ('rack_type' , linkify = True , grouped_by = 'manufacturer' )
49+ role = attrs .RelatedObjectAttr ('role' , linkify = True )
5050 description = attrs .TextAttr ('description' )
5151 serial = attrs .TextAttr ('serial' , label = _ ('Serial number' ), style = 'font-monospace' , copy_button = True )
5252 asset_tag = attrs .TextAttr ('asset_tag' , style = 'font-monospace' , copy_button = True )
@@ -66,26 +66,26 @@ class RackRolePanel(panels.OrganizationalObjectPanel):
6666
6767
6868class RackTypePanel (panels .ObjectAttributesPanel ):
69- manufacturer = attrs .ObjectAttr ('manufacturer' , linkify = True )
69+ manufacturer = attrs .RelatedObjectAttr ('manufacturer' , linkify = True )
7070 model = attrs .TextAttr ('model' )
7171 description = attrs .TextAttr ('description' )
7272
7373
7474class DevicePanel (panels .ObjectAttributesPanel ):
7575 region = attrs .NestedObjectAttr ('site.region' , linkify = True )
76- site = attrs .ObjectAttr ('site' , linkify = True , grouped_by = 'group' )
76+ site = attrs .RelatedObjectAttr ('site' , linkify = True , grouped_by = 'group' )
7777 location = attrs .NestedObjectAttr ('location' , linkify = True )
7878 rack = attrs .TemplatedAttr ('rack' , template_name = 'dcim/device/attrs/rack.html' )
79- virtual_chassis = attrs .ObjectAttr ('virtual_chassis' , linkify = True )
79+ virtual_chassis = attrs .RelatedObjectAttr ('virtual_chassis' , linkify = True )
8080 parent_device = attrs .TemplatedAttr ('parent_bay' , template_name = 'dcim/device/attrs/parent_device.html' )
8181 gps_coordinates = attrs .GPSCoordinatesAttr ()
82- tenant = attrs .ObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
83- device_type = attrs .ObjectAttr ('device_type' , linkify = True , grouped_by = 'manufacturer' )
82+ tenant = attrs .RelatedObjectAttr ('tenant' , linkify = True , grouped_by = 'group' )
83+ device_type = attrs .RelatedObjectAttr ('device_type' , linkify = True , grouped_by = 'manufacturer' )
8484 description = attrs .TextAttr ('description' )
8585 airflow = attrs .ChoiceAttr ('airflow' )
8686 serial = attrs .TextAttr ('serial' , label = _ ('Serial number' ), style = 'font-monospace' , copy_button = True )
8787 asset_tag = attrs .TextAttr ('asset_tag' , style = 'font-monospace' , copy_button = True )
88- config_template = attrs .ObjectAttr ('config_template' , linkify = True )
88+ config_template = attrs .RelatedObjectAttr ('config_template' , linkify = True )
8989
9090
9191class DeviceManagementPanel (panels .ObjectAttributesPanel ):
@@ -109,7 +109,7 @@ class DeviceManagementPanel(panels.ObjectAttributesPanel):
109109 label = _ ('Out-of-band IP' ),
110110 template_name = 'dcim/device/attrs/ipaddress.html' ,
111111 )
112- cluster = attrs .ObjectAttr ('cluster' , linkify = True )
112+ cluster = attrs .RelatedObjectAttr ('cluster' , linkify = True )
113113
114114
115115class DeviceDimensionsPanel (panels .ObjectAttributesPanel ):
@@ -120,10 +120,10 @@ class DeviceDimensionsPanel(panels.ObjectAttributesPanel):
120120
121121
122122class DeviceTypePanel (panels .ObjectAttributesPanel ):
123- manufacturer = attrs .ObjectAttr ('manufacturer' , linkify = True )
123+ manufacturer = attrs .RelatedObjectAttr ('manufacturer' , linkify = True )
124124 model = attrs .TextAttr ('model' )
125125 part_number = attrs .TextAttr ('part_number' )
126- default_platform = attrs .ObjectAttr ('default_platform' , linkify = True )
126+ default_platform = attrs .RelatedObjectAttr ('default_platform' , linkify = True )
127127 description = attrs .TextAttr ('description' )
128128 height = attrs .TextAttr ('u_height' , format_string = '{}U' , label = _ ('Height' ))
129129 exclude_from_utilization = attrs .BooleanAttr ('exclude_from_utilization' )
0 commit comments