Added some code to display a service message from the xvm team to the unauth page...
authorPaul Weaver <pweaver@mit.edu>
Wed, 30 Dec 2009 20:18:56 +0000 (15:18 -0500)
committerPaul Weaver <pweaver@mit.edu>
Wed, 30 Dec 2009 20:18:56 +0000 (15:18 -0500)
svn path=/trunk/packages/invirt-web/; revision=2810

code/main.py
code/templates/unauth.mako

index dd2b591..b05906e 100755 (executable)
@@ -51,7 +51,13 @@ class InvirtUnauthWeb(View):
     @cherrypy.expose
     @cherrypy.tools.mako(filename="/unauth.mako")
     def index(self):
-        return {'simple': True}
+        if(os.path.exists("/etc/invirt/message")):
+            f = open('/etc/invirt/message')
+            message = f.read()
+        else:message = None
+        d = dict(simple = True, serviceMessage = message)
+        return d
+
 
 class InvirtWeb(View):
     def __init__(self):
index 3544e18..dc49d8f 100644 (file)
@@ -13,6 +13,11 @@ own complete system on which you can start from our <strong>three-minute
 Debian or Ubuntu install</strong> or install the <strong>operating
 system of your choice</strong>.  The service is <strong>free</strong>
 to any Athena account holder.</p>
+%if serviceMessage:
+<table><tr><td class="result">
+<p class="error">${serviceMessage}</p>
+</td></tr></table>
+%endif
 
 <p>MIT users:</p>
 <blockquote><big><a