133 enhancement bubbletext (#136)

* added extra fields to popup

* open new tab with device info
This commit is contained in:
mattieserver
2022-08-03 11:46:37 +02:00
committed by GitHub
parent 1b36b9e7df
commit faf156a6b2
3 changed files with 20 additions and 1 deletions
+9
View File
@@ -33,6 +33,15 @@ def create_node(device):
node_content += "<tr><th>IP Address: </th><td>" + str(device.primary_ip.address) + "</td></tr>"
if device.site is not None:
node_content += "<tr><th>Site: </th><td>" + device.site.name + "</td></tr>"
if device.location is not None:
node_content += "<tr><th>Location: </th><td>" + device.location.name + "</td></tr>"
if device.rack is not None:
node_content += "<tr><th>Rack: </th><td>" + device.rack.name + "</td></tr>"
if device.position is not None:
if device.face is not None:
node_content += "<tr><th>Position: </th><td> {} ({}) </td></tr>".format(device.position, device.face)
else:
node_content += "<tr><th>Position: </th><td>" + device.position + "</td></tr>"
dev_title = "<table> %s </table>" % (node_content)