Half occupied units color

14 views
Skip to first unread message

Alexander Brusilov

unread,
Sep 7, 2021, 6:13:03 AM9/7/21
to NetBox
Hello everyone,

I am using Netbox v2.11.12 and noticed that half-occupied units not differ from free units (see attach).
I really need to fix this. In previous versions Netbox half-occupied units was noticeable.

I try to change color code for 'occupied' in file netbox/dcim/elevations.py but, no success.
# add gradients
RackElevationSVG._add_gradient(drawing, 'reserved', '#c7c7ff')
RackElevationSVG._add_gradient(drawing, 'occupied', '#d7d7d7')
RackElevationSVG._add_gradient(drawing, 'blocked', '#ffc0c0')

However changing color codes for 'reserved' and 'blocked' in this file works as expected. Can anyone tell me, why? How can change color for 'occupied' in source code? Or may be netbox dev team release hot patch to fix this for v2.11.12?
netbox-units-color.png

Brian Candler

unread,
Sep 7, 2021, 6:26:31 AM9/7/21
to NetBox
Open issue #6961 (also previously reported as #6156)

I found the same as you, by inspecting the code, that the "occupied" class can never be applied.  I've suggested it be used for showing where the opposite face is occupied, and proposed a patch here.

Reply all
Reply to author
Forward
0 new messages