mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Merge pull request #3973 from hellerve/veit/fix-3963
dcim: fix tooltips in svg rack display
This commit is contained in:
commit
007de40ada
@ -395,13 +395,22 @@ class RackElevationHelperMixin:
|
||||
fill='black'
|
||||
)
|
||||
)
|
||||
link.set_desc('{} — {} ({}U) {} {}'.format(
|
||||
device.device_role, device.device_type.display_name,
|
||||
device.device_type.u_height, device.asset_tag or '', device.serial or ''
|
||||
))
|
||||
link.add(drawing.rect(start, end, fill='#{}'.format(color)))
|
||||
hex_color = '#{}'.format(foreground_color(color))
|
||||
link.add(drawing.text(str(device), insert=text, fill=hex_color))
|
||||
|
||||
@staticmethod
|
||||
def _draw_device_rear(drawing, device, start, end, text):
|
||||
drawing.add(drawing.rect(start, end, class_="blocked"))
|
||||
rect = drawing.rect(start, end, class_="blocked")
|
||||
rect.set_desc('{} — {} ({}U) {} {}'.format(
|
||||
device.device_role, device.device_type.display_name,
|
||||
device.device_type.u_height, device.asset_tag or '', device.serial or ''
|
||||
))
|
||||
drawing.add(rect)
|
||||
drawing.add(drawing.text(str(device), insert=text))
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user