Minor tweaks to layout
Change-Id: I82fcf6cf1f50a51e75a1e3a162a118f51db98b99
diff --git a/visualisation/visualisation.py b/visualisation/visualisation.py
index 3f3462b..34bb389 100644
--- a/visualisation/visualisation.py
+++ b/visualisation/visualisation.py
@@ -49,7 +49,6 @@
""" Cache for graphics state, to avoid having to recalculate every
query too many times. """
last_update = None
- max_width = 0
graphics = {}
def __init__(self):
@@ -222,7 +221,7 @@
page.append('.content {')
page.append(' position:relative;')
page.append(' padding-top: 10px;')
- page.append(' width: %dpx;' % cache.max_width)
+ page.append(' width: 80%;')
page.append(' max-width:80%;')
page.append(' margin-left: 21%;')
page.append(' margin-top: 50px;')
@@ -289,7 +288,7 @@
page.append(' text-indent: 0;')
page.append('}')
page.append('area + span {')
- page.append(' position: fixed;')
+ page.append(' position: absolute;')
page.append(' margin-left: -9999em;')
page.append(' background: #00FFFF;')
page.append('}')
@@ -311,7 +310,8 @@
page.append('}')
self.wfile.write('\r\n'.join(page))
- # Send a graphic from our cache
+ # Generate a PNG showing the layout of switches/port/trunks for a
+ # specific VLAN
def send_graphic(self):
vlan_id = 0
vlan_re = re.compile(r'^/images/vlan/(\d+).png$')