mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-09 00:58:16 -06:00
Merge remote-tracking branch 'netbox-community/netbox/develop' into 3377-recursive-power-calc
This commit is contained in:
commit
0c0186aed0
@ -1,4 +1,4 @@
|
|||||||
# v2.7.2 (FUTURE)
|
# v2.7.2 (2020-01-21)
|
||||||
|
|
||||||
## Enhancements
|
## Enhancements
|
||||||
|
|
||||||
@ -10,13 +10,14 @@
|
|||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
* [#3721](https://github.com/netbox-community/netbox/issues/3721) - Allow Unicode characters in tag slugs
|
* [#3721](https://github.com/netbox-community/netbox/issues/3721) - Allow Unicode characters in tag slugs
|
||||||
|
* [#3923](https://github.com/netbox-community/netbox/issues/3923) - Indicate validation failure when using SSH-style RSA keys
|
||||||
* [#3951](https://github.com/netbox-community/netbox/issues/3951) - Fix exception in webhook worker due to missing constant
|
* [#3951](https://github.com/netbox-community/netbox/issues/3951) - Fix exception in webhook worker due to missing constant
|
||||||
* [#3923](https://github.com/netbox-community/netbox/issues/3923) - Fix user key validation
|
|
||||||
* [#3953](https://github.com/netbox-community/netbox/issues/3953) - Fix validation error when creating child devices
|
* [#3953](https://github.com/netbox-community/netbox/issues/3953) - Fix validation error when creating child devices
|
||||||
* [#3960](https://github.com/netbox-community/netbox/issues/3960) - Fix legacy device status choice
|
* [#3960](https://github.com/netbox-community/netbox/issues/3960) - Fix legacy device status choice
|
||||||
* [#3962](https://github.com/netbox-community/netbox/issues/3962) - Fix display of unnamed devices in rack elevations
|
* [#3962](https://github.com/netbox-community/netbox/issues/3962) - Fix display of unnamed devices in rack elevations
|
||||||
* [#3963](https://github.com/netbox-community/netbox/issues/3963) - Restore tooltip for devices in rack elevations
|
* [#3963](https://github.com/netbox-community/netbox/issues/3963) - Restore tooltip for devices in rack elevations
|
||||||
* [#3964](https://github.com/netbox-community/netbox/issues/3964) - Show borders around devices in rack elevations
|
* [#3964](https://github.com/netbox-community/netbox/issues/3964) - Show borders around devices in rack elevations
|
||||||
|
* [#3965](https://github.com/netbox-community/netbox/issues/3965) - Indicate the presence of "background" devices in rack elevations
|
||||||
* [#3966](https://github.com/netbox-community/netbox/issues/3966) - Fix filtering of device components by region/site
|
* [#3966](https://github.com/netbox-community/netbox/issues/3966) - Fix filtering of device components by region/site
|
||||||
* [#3967](https://github.com/netbox-community/netbox/issues/3967) - Resolve migration of "other" interface type
|
* [#3967](https://github.com/netbox-community/netbox/issues/3967) - Resolve migration of "other" interface type
|
||||||
|
|
||||||
|
@ -468,6 +468,21 @@ class RackElevationHelperMixin:
|
|||||||
|
|
||||||
return drawing
|
return drawing
|
||||||
|
|
||||||
|
def merge_elevations(self, face):
|
||||||
|
elevation = self.get_rack_units(face=face, expand_devices=False)
|
||||||
|
other_face = DeviceFaceChoices.FACE_FRONT if face == DeviceFaceChoices.FACE_REAR else DeviceFaceChoices.FACE_REAR
|
||||||
|
other = self.get_rack_units(face=other_face)
|
||||||
|
|
||||||
|
unit_cursor = 0
|
||||||
|
for u in elevation:
|
||||||
|
o = other[unit_cursor]
|
||||||
|
if not u['device'] and o['device']:
|
||||||
|
u['device'] = o['device']
|
||||||
|
u['height'] = 1
|
||||||
|
unit_cursor += u.get('height', 1)
|
||||||
|
|
||||||
|
return elevation
|
||||||
|
|
||||||
def get_elevation_svg(self, face=DeviceFaceChoices.FACE_FRONT, unit_width=230, unit_height=20):
|
def get_elevation_svg(self, face=DeviceFaceChoices.FACE_FRONT, unit_width=230, unit_height=20):
|
||||||
"""
|
"""
|
||||||
Return an SVG of the rack elevation
|
Return an SVG of the rack elevation
|
||||||
@ -477,7 +492,7 @@ class RackElevationHelperMixin:
|
|||||||
:param unit_height: Height of each rack unit for the rendered drawing. Note this is not the total
|
:param unit_height: Height of each rack unit for the rendered drawing. Note this is not the total
|
||||||
height of the elevation
|
height of the elevation
|
||||||
"""
|
"""
|
||||||
elevation = self.get_rack_units(face=face, expand_devices=False)
|
elevation = self.merge_elevations(face)
|
||||||
reserved_units = self.get_reserved_units().keys()
|
reserved_units = self.get_reserved_units().keys()
|
||||||
|
|
||||||
return self._draw_elevations(elevation, reserved_units, face, unit_width, unit_height)
|
return self._draw_elevations(elevation, reserved_units, face, unit_width, unit_height)
|
||||||
|
@ -12,7 +12,7 @@ from django.core.exceptions import ImproperlyConfigured
|
|||||||
# Environment setup
|
# Environment setup
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION = '2.7.2-dev'
|
VERSION = '2.7.3-dev'
|
||||||
|
|
||||||
# Hostname
|
# Hostname
|
||||||
HOSTNAME = platform.node()
|
HOSTNAME = platform.node()
|
||||||
|
Loading…
Reference in New Issue
Block a user