Changeset 2810 for trunk


Ignore:
Timestamp:
Dec 30, 2009, 3:18:56 PM (15 years ago)
Author:
pweaver
Message:

Added some code to display a service message from the xvm team to the unauth page of the website. The message lives in /etc/invirt/message, which would be symlinked to afs

Location:
trunk/packages/invirt-web/code
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/main.py

    r2737 r2810  
    5252    @cherrypy.tools.mako(filename="/unauth.mako")
    5353    def index(self):
    54         return {'simple': True}
     54        if(os.path.exists("/etc/invirt/message")):
     55            f = open('/etc/invirt/message')
     56            message = f.read()
     57        else:message = None
     58        d = dict(simple = True, serviceMessage = message)
     59        return d
     60
    5561
    5662class InvirtWeb(View):
  • trunk/packages/invirt-web/code/templates/unauth.mako

    r2808 r2810  
    1414system of your choice</strong>.  The service is <strong>free</strong>
    1515to any Athena account holder.</p>
     16%if serviceMessage:
     17<table><tr><td class="result">
     18<p class="error">${serviceMessage}</p>
     19</td></tr></table>
     20%endif
    1621
    1722<p>MIT users:</p>
Note: See TracChangeset for help on using the changeset viewer.