1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Misc cleanup

This commit is contained in:
jeremystretch
2022-07-12 12:30:07 -04:00
parent 53372a7471
commit 43b27cc052
14 changed files with 58 additions and 19 deletions

View File

@@ -260,13 +260,14 @@ class RackElevationSVG:
)
for ru in range(0, self.rack.u_height):
unit = ru + 1 if self.rack.desc_units else self.rack.u_height - ru
y_offset = RACK_ELEVATION_BORDER_WIDTH + ru * self.unit_height
text_coords = (
x_offset + self.unit_width / 2,
y_offset + self.unit_height / 2
)
link = Hyperlink(href=url_string.format(ru), target='_blank')
link = Hyperlink(href=url_string.format(unit), target='_blank')
link.add(Rect((x_offset, y_offset), (self.unit_width, self.unit_height), class_='slot'))
link.add(Text('add device', insert=text_coords, class_='add-device'))