Exemple #1
0
 def printResult(result):
     return dedent("""\
         <html>
             <head><title>Proxy a Service</title></head>
             <body style="background: %(color)s">
                 <h1>Proxy a Service</h1>
                 <p>
                 Proxying service at: %(proxied_service)s
                 </p>
                 <pre>
         %(result)s
                 </pre>
                 <p>
                 <a href="/">Back</a>
                 </p>
             </body>
         </html>
         """) % {
             'color': self.color,
             'result': escape_html(result), 
             'proxied_service': escape_html(proxied_service)}
Exemple #2
0
 def printError(err):
     log.err(err)
     return dedent("""\
         <html>
             <head><title>Proxy a Service - Error</title></head>
             <body style="background: %(color)s">
                 <h1>Proxy a Service - Error</h1>
                 <p>
                 Errors occured while proxying service at: %(proxied_service)s
                 </p>
                 <pre>
         %(result)s
                 </pre>
                 <p>
                 <a href="/">Back</a>
                 </p>
             </body>
         </html>
         """) % {
             'color': self.color,
             'result': escape_html(str(err.getErrorMessage())), 
             'proxied_service': escape_html(proxied_service)}
Exemple #3
0
 def printResult(result):
     return dedent("""\
         <html>
             <head><title>/proxy Result</title></head>
             <body style="background: %(color)s">
                 <h1>/proxy Result</h1>
                 <pre>
         %(result)s
                 </pre>
                 <p>
                 <a href="/">Back</a>
                 </p>
             </body>
         </html>
         """) % {
             'color': self.color,
             'result': escape_html(result)}
Exemple #4
0
 def pgtinfo_GET(self, request):
     session = request.getSession()
     if hasattr(session, 'pgt'):
         return "PGT == %s" % escape_html(session.pgt)
     else:
         return "No PGT"