Commit d256451f authored by Daniele Venzano's avatar Daniele Venzano

Update web interface to reflect internal changes made in the last release

parent df44a8ff
......@@ -22,7 +22,7 @@
import json
import datetime
from jinja2 import Environment, FileSystemLoader, Markup
from jinja2 import Environment, FileSystemLoader, Markup, TemplateSyntaxError
from tornado.escape import squeeze, linkify, url_escape, xhtml_escape
import tornado.web
......@@ -121,8 +121,11 @@ class ZoeRequestHandler(tornado.web.RequestHandler):
template = self._jinja_env.get_template(template_name)
try:
html = self._render(template, **kwargs)
except Exception:
zoe_api.web.utils.error_page(self, 'Jinja2 template exception', 500)
except TemplateSyntaxError as e:
zoe_api.web.utils.error_page(self, 'Template syntax error at {}:{}:<br> {}'.format(e.name, e.lineno, e.message), 500)
return
except Exception as e:
zoe_api.web.utils.error_page(self, 'Jinja2 template exception: {}'.format(e), 500)
return
self.finish(html)
......
......@@ -33,7 +33,9 @@ class ExecutionDefineWeb(ZoeRequestHandler):
@catch_exceptions
def get(self):
"""Define a new execution."""
get_auth(self)
uid, role_ = get_auth(self)
if uid is None:
return self.redirect(self.get_argument('next', u'/login'))
self.render('execution_new.html')
......@@ -49,6 +51,8 @@ class ExecutionStartWeb(ZoeRequestHandler):
def post(self):
"""Start an execution."""
uid, role = get_auth(self)
if uid is None:
return self.redirect(self.get_argument('next', u'/login'))
app_descr_json = self.request.files['file'][0]['body'].decode('utf-8')
app_descr = json.loads(app_descr_json)
......@@ -70,6 +74,8 @@ class ExecutionRestartWeb(ZoeRequestHandler):
def get(self, execution_id: int):
"""Restart an already defined (and not running) execution."""
uid, role = get_auth(self)
if uid is None:
return self.redirect(self.get_argument('next', u'/login'))
e = self.api_endpoint.execution_by_id(uid, role, execution_id)
new_id = self.api_endpoint.execution_start(uid, role, e.name, e.description)
......@@ -88,6 +94,8 @@ class ExecutionTerminateWeb(ZoeRequestHandler):
def get(self, execution_id: int):
"""Terminate an execution."""
uid, role = get_auth(self)
if uid is None:
return self.redirect(self.get_argument('next', u'/login'))
success, message = self.api_endpoint.execution_terminate(uid, role, execution_id)
if not success:
......@@ -107,6 +115,8 @@ class ExecutionDeleteWeb(ZoeRequestHandler):
def get(self, execution_id: int):
"""Delete an execution."""
uid, role = get_auth(self)
if uid is None:
return self.redirect(self.get_argument('next', u'/login'))
success, message = self.api_endpoint.execution_delete(uid, role, execution_id)
if not success:
......@@ -126,6 +136,8 @@ class ExecutionInspectWeb(ZoeRequestHandler):
def get(self, execution_id):
"""Gather details about an execution."""
uid, role = get_auth(self)
if uid is None:
return self.redirect(self.get_argument('next', u'/login'))
e = self.api_endpoint.execution_by_id(uid, role, execution_id)
......@@ -133,8 +145,11 @@ class ExecutionInspectWeb(ZoeRequestHandler):
for service in e.services:
services_info.append(self.api_endpoint.service_by_id(uid, role, service.id))
endpoints = self.api_endpoint.execution_endpoints(uid, role, e)[1]
template_vars = {
"e": e,
"services_info": services_info
"services_info": services_info,
"endpoints": endpoints,
}
self.render('execution_inspect.html', **template_vars)
......@@ -33,7 +33,7 @@ class RootWeb(ZoeRequestHandler):
@catch_exceptions
def get(self):
"""Home page without authentication."""
self.render('index.html')
self.redirect("/user")
class LoginWeb(ZoeRequestHandler):
......@@ -72,6 +72,8 @@ class HomeWeb(ZoeRequestHandler):
def get(self):
"""Home page with authentication."""
uid, role = get_auth(self)
if uid is None:
return self.redirect(self.get_argument('next', u'/login'))
if role == 'user' or role == 'admin':
executions = self.api_endpoint.execution_list(uid, role)
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg4147"
version="1.1"
inkscape:version="0.91 r13725"
xml:space="preserve"
width="379.92499"
height="271.62421"
viewBox="0 0 379.92499 271.6242"
sodipodi:docname="logo.svg"><metadata
id="metadata4153"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs4151"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4161"><path
d="m 0,1.2207e-4 720,0 0,539.99999793 -720,0 L 0,1.2207e-4 Z"
id="path4163"
inkscape:connector-curvature="0"
style="clip-rule:evenodd" /></clipPath><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4179"><path
d="m 0,6.104e-6 720,0 L 720,540.00001 l -720,0 L 0,6.104e-6 Z"
id="path4181"
inkscape:connector-curvature="0"
style="clip-rule:evenodd" /></clipPath><mask
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="1"
height="1"
id="mask4185"><image
width="1"
height="1"
preserveAspectRatio="none"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAA3CAAAAAAa4SpAAAAAAXNCSVQI5gpbmQAABAFJREFUWIW1WTGLE0EU/nYIhysrFzCgQdnG6Gk4hO1SKKw2adOmTp3K5vr8gIBt/kAsLQKKjbCNcFXAQjyLFcTDQ10RQW1ci+zOvDc7M7t7cK+ayew335t5b97Me/FgEm+/dxPAn3f4YRyvly7aQL1omRNJjoaiHZ03XGQ77HIR9xsAglmWV+Ro0JyxN+fY7WTPDRCLKuEOGTVj7G4M4JVL5UFqoczzPAnrGcXcAt4EFoRnQxQy82ooI4fKYyOik7gp8zzxXYyezS47WRnMKmop8zx1kAbb1mBvXU/pIo3qwUlHw2iU2+U0juN5RZHU4vizCoPhyK25QzD3Sadq5iDi3r8xMXorPvlmJAD43WjKvWpJQT06Mtb80z+io7Mq5R53haRHxkLmWdR7if1NRymgkw71UZ8tJh1pw/TQZ8ofpmT5xkNIj26mKdVllOuqwQWJ3wupKIHYzj1xkhUb6DFnmRjBZH/LmK+WubGHGqIsXQqjTG23iPL/dbF2BetaKSGUzcnMA7pIe5wi4B1FLPtTOyUQSNWUXzLKlSMeRxqH1GHrDuIlLjVTGg4REbm7KQCEElV3R860rW1BSSJAH8CEaeCUOM3zxEwZ12ETqpxctdnPuXSVl7WjVF6zBjyJczitQVpSoiM/9tAvm9mFUgLyruiL6+VvL1tRnpDOo9dNIC/KxoHYL5uvLpYSx2VjpN7Lny6WEl/LxjUhXf9vY8reMek0pVScfXG5MZWkPCEe3phSyQ3xrWw2PSrnpfwlW+J92bp7sZS4VDZ+irOy+fB8lCKMe9avqVwpG+9JfGiS8rErOkaRL2xqUi8AwIgEXDlL5XHVgLKIYrZnL5UVwclHx6IWNtAp5QWR1OVPZD9DYCg7zhQIphirLohlDRZjakMhO0duVFyhJJzudw2wJ7doCZCNdi90UqVkj3H3K0M9N4cAcShzMlLIzETJttsVVBRHcTyUsnMbxmO1lFgNkAd+qud6SohqhQEj42xUfJYFsY9ISlZJMEsJlb9nZRQgVjG6QsjyA65Xh4AtpNQTpNVpkryohCOPJ7T6VgREodRgU5+aZa1+pz9nWv7Z44WCaq2nT8G6Rh2WvJJcEB6zVzofyMX2eQqdmeL5iH6xnah590ZrE7pYk/9Z25Vnz0+BsztPHrBfP977beDE/KkGPgWAx/f1725/YN0wbyAbm2O6S0OlxDosNBQ6NJnbA3kTUkOgChyVMxumBanJpYGOsyy1tZUJC5m4wHm+spllbN/fae0FOXQYx1WKFRMz0FoLZeBqMWwnaexWWEyqZm1aMIY/N1XcototAoIxiwObFoVxIJxRcLYwFfPNOnhXD4Fbh/jy5u33f20oAQCdAP6B40+L/3nrWx5j2o+vAAAAAElFTkSuQmCC"
id="image4187" /></mask></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview4149"
showgrid="false"
inkscape:zoom="0.78462664"
inkscape:cx="-10.9329"
inkscape:cy="178.9348"
inkscape:current-layer="g4155"
fit-margin-top="10"
fit-margin-left="10"
fit-margin-right="10"
fit-margin-bottom="10" /><g
id="g4155"
inkscape:groupmode="layer"
inkscape:label="logo"
transform="matrix(1.25,0,0,-1.25,-219.625,427.6)"><path
d="m 273.4,308.82 c 5.56,0 10.36,-1.74 14.4,-5.21 4.03,-3.47 6.05,-7.83 6.05,-13.09 0,-3.21 -2.99,-6.3 -8.97,-9.29 l -1.29,-0.65 c -3.75,-1.87 -22.3,-20.98 -55.65,-57.31 -3.44,-3.7 -9.37,-10.95 -17.79,-21.74 -7.51,-10.74 -11.26,-17.1 -11.26,-19.08 0,-0.4 1.99,-0.61 5.97,-0.61 4.46,0 12.38,0.94 23.76,2.8 9.75,1.72 17.73,2.58 23.94,2.58 5.48,0 11.37,-0.44 17.67,-1.32 10.16,-1.31 15.24,-3.46 15.24,-6.45 0,-3.76 -2.52,-5.63 -7.56,-5.63 -1.35,0 -3.89,0.25 -7.61,0.75 -3.73,0.5 -5.99,0.75 -6.79,0.75 -5.23,0 -13.01,-0.79 -23.32,-2.36 l -21.53,-3.2 c -1.47,-0.14 -5.24,-1.06 -11.28,-2.75 -5.6,-1.62 -9.52,-2.43 -11.76,-2.43 -3.84,0 -6.87,1.75 -9.09,5.27 -1.84,2.3 -2.76,5.28 -2.76,8.95 0,4.24 4.34,12.91 13.01,26 8.29,12.28 15.76,21.88 22.44,28.79 l 33.38,38.67 c 11.4,13.07 17.1,20.16 17.1,21.26 0,0.41 -1.85,0.61 -5.54,0.61 -18.25,0 -36.31,-2.5 -54.17,-7.48 -2.48,-0.77 -4.09,-1.42 -4.83,-1.95 -0.74,-0.53 -1.04,-1.75 -0.9,-3.68 -6.21,0 -9.32,1.88 -9.32,5.63 0,4.66 3.92,8.22 11.75,10.68 4.74,1.42 12.21,3.12 22.43,5.11 22.3,4.25 37.06,6.38 44.28,6.38 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path4167"
inkscape:connector-curvature="0" /><path
d="m 273.4,308.82 c 5.56,0 10.36,-1.74 14.4,-5.21 4.03,-3.47 6.05,-7.83 6.05,-13.09 0,-3.21 -2.99,-6.3 -8.97,-9.29 l -1.29,-0.65 c -3.75,-1.87 -22.3,-20.98 -55.65,-57.31 -3.44,-3.7 -9.37,-10.95 -17.79,-21.74 -7.51,-10.74 -11.26,-17.1 -11.26,-19.08 0,-0.4 1.99,-0.61 5.97,-0.61 4.46,0 12.38,0.94 23.76,2.8 9.75,1.72 17.73,2.58 23.94,2.58 5.48,0 11.37,-0.44 17.67,-1.32 10.16,-1.31 15.24,-3.46 15.24,-6.45 0,-3.76 -2.52,-5.63 -7.56,-5.63 -1.35,0 -3.89,0.25 -7.61,0.75 -3.73,0.5 -5.99,0.75 -6.79,0.75 -5.23,0 -13.01,-0.79 -23.32,-2.36 l -21.53,-3.2 c -1.47,-0.14 -5.24,-1.06 -11.28,-2.75 -5.6,-1.62 -9.52,-2.43 -11.76,-2.43 -3.84,0 -6.87,1.75 -9.09,5.27 -1.84,2.3 -2.76,5.28 -2.76,8.95 0,4.24 4.34,12.91 13.01,26 8.29,12.28 15.76,21.88 22.44,28.79 l 33.38,38.67 c 11.4,13.07 17.1,20.16 17.1,21.26 0,0.41 -1.85,0.61 -5.54,0.61 -18.25,0 -36.31,-2.5 -54.17,-7.48 -2.48,-0.77 -4.09,-1.42 -4.83,-1.95 -0.74,-0.53 -1.04,-1.75 -0.9,-3.68 -6.21,0 -9.32,1.88 -9.32,5.63 0,4.66 3.92,8.22 11.75,10.68 4.74,1.42 12.21,3.12 22.43,5.11 22.3,4.25 37.06,6.38 44.28,6.38 z"
style="fill:none;stroke:#000000;stroke-width:0.14;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path4169"
inkscape:connector-curvature="0" /><path
d="m 332.58,285.49 c -7.99,0 -15.44,-9.85 -22.35,-29.56 -4.67,-15.36 -7,-29.45 -7,-42.25 0,-24.27 7.15,-36.41 21.45,-36.41 20.26,0 30.39,22.97 30.39,68.9 0,10.03 -1.46,18.56 -4.36,25.61 -3.83,9.14 -9.87,13.71 -18.13,13.71 z m 115.06,5.22 c 5.48,0 9.3,-0.42 11.45,-1.26 4.88,-1.53 7.32,-4.67 7.32,-9.43 0,-4.6 -1.54,-6.9 -4.63,-6.9 -1.53,1.67 -3.53,3.36 -6,5.08 -1.61,0.85 -4.03,1.28 -7.28,1.28 -12.31,0 -24.47,-1.71 -36.49,-5.11 -16.44,-4.68 -24.66,-11.22 -24.66,-19.61 0,-3.33 2.12,-5.84 6.35,-7.53 4.77,-1.61 9.57,-2.41 14.41,-2.41 1.73,0 7.01,0.33 15.85,1.01 8.83,0.58 14.03,0.79 15.58,0.63 2.22,-1.53 3.25,-3.84 3.12,-6.9 -0.3,-3.11 -1.85,-5.1 -4.68,-5.98 -2.84,1.61 -4.78,2.41 -5.8,2.41 -9.72,0 -20.67,-2.48 -32.86,-7.45 -15.89,-6.57 -23.83,-15.08 -23.83,-25.51 0,-8.49 4.86,-14.66 14.59,-18.53 9.48,-3.22 19.55,-4.82 30.23,-4.82 4.25,0 9.71,0.56 16.37,1.69 7.61,1.23 12.77,2.55 15.47,3.96 5.4,2.86 8.7,4.67 9.9,5.44 l 0,5.58 c 6.34,0 9.52,-1.73 9.52,-5.18 0,-6.72 -7.52,-12.44 -22.55,-17.17 -11.46,-3.59 -21.26,-5.38 -29.39,-5.38 -12.92,0 -24.18,2.4 -33.79,7.21 -12.45,6.28 -18.67,15.57 -18.67,27.88 0,8.43 3.33,15.8 9.99,22.1 4.4,4.18 10.87,8.03 19.4,11.54 -5.08,1.18 -8.9,2.91 -11.46,5.17 -4.04,3.74 -6.07,8.51 -6.07,14.3 0,12.3 9.22,21.5 27.65,27.6 12.69,4.2 26.34,6.29 40.96,6.29 z m -124.85,3.95 c 0.8,0 2.07,-0.4 3.78,-1.2 0.68,0.46 1.39,0.69 2.14,0.69 24.14,-1.58 36.22,-17.86 36.22,-48.84 0,-18.27 -2.16,-33.88 -6.47,-46.81 -6.68,-19.92 -17.54,-29.88 -32.58,-29.88 -11.53,0 -20.5,4.84 -26.91,14.51 -5.57,8.42 -8.36,18.48 -8.36,30.21 0,11.36 1.41,23.32 4.21,35.88 2.98,13 7.27,23.4 12.89,31.19 2.57,3.74 4.48,6.47 5.74,8.19 3.23,4.04 6.35,6.06 9.34,6.06 z"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path4171"
inkscape:connector-curvature="0" /><path
d="m 332.58,285.49 c -7.99,0 -15.44,-9.85 -22.35,-29.56 -4.67,-15.36 -7,-29.45 -7,-42.25 0,-24.27 7.15,-36.41 21.45,-36.41 20.26,0 30.39,22.97 30.39,68.9 0,10.03 -1.46,18.56 -4.36,25.61 -3.83,9.14 -9.87,13.71 -18.13,13.71 z m 115.06,5.22 c 5.48,0 9.3,-0.42 11.45,-1.26 4.88,-1.53 7.32,-4.67 7.32,-9.43 0,-4.6 -1.54,-6.9 -4.63,-6.9 -1.53,1.67 -3.53,3.36 -6,5.08 -1.61,0.85 -4.03,1.28 -7.28,1.28 -12.31,0 -24.47,-1.71 -36.49,-5.11 -16.44,-4.68 -24.66,-11.22 -24.66,-19.61 0,-3.33 2.12,-5.84 6.35,-7.53 4.77,-1.61 9.57,-2.41 14.41,-2.41 1.73,0 7.01,0.33 15.85,1.01 8.83,0.58 14.03,0.79 15.58,0.63 2.22,-1.53 3.25,-3.84 3.12,-6.9 -0.3,-3.11 -1.85,-5.1 -4.68,-5.98 -2.84,1.61 -4.78,2.41 -5.8,2.41 -9.72,0 -20.67,-2.48 -32.86,-7.45 -15.89,-6.57 -23.83,-15.08 -23.83,-25.51 0,-8.49 4.86,-14.66 14.59,-18.53 9.48,-3.22 19.55,-4.82 30.23,-4.82 4.25,0 9.71,0.56 16.37,1.69 7.61,1.23 12.77,2.55 15.47,3.96 5.4,2.86 8.7,4.67 9.9,5.44 l 0,5.58 c 6.34,0 9.52,-1.73 9.52,-5.18 0,-6.72 -7.52,-12.44 -22.55,-17.17 -11.46,-3.59 -21.26,-5.38 -29.39,-5.38 -12.92,0 -24.18,2.4 -33.79,7.21 -12.45,6.28 -18.67,15.57 -18.67,27.88 0,8.43 3.33,15.8 9.99,22.1 4.4,4.18 10.87,8.03 19.4,11.54 -5.08,1.18 -8.9,2.91 -11.46,5.17 -4.04,3.74 -6.07,8.51 -6.07,14.3 0,12.3 9.22,21.5 27.65,27.6 12.69,4.2 26.34,6.29 40.96,6.29 z m -124.85,3.95 c 0.8,0 2.07,-0.4 3.78,-1.2 0.68,0.46 1.39,0.69 2.14,0.69 24.14,-1.58 36.22,-17.86 36.22,-48.84 0,-18.27 -2.16,-33.88 -6.47,-46.81 -6.68,-19.92 -17.54,-29.88 -32.58,-29.88 -11.53,0 -20.5,4.84 -26.91,14.51 -5.57,8.42 -8.36,18.48 -8.36,30.21 0,11.36 1.41,23.32 4.21,35.88 2.98,13 7.27,23.4 12.89,31.19 2.57,3.74 4.48,6.47 5.74,8.19 3.23,4.04 6.35,6.06 9.34,6.06 z"
style="fill:none;stroke:#000000;stroke-width:0.14;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path4173"
inkscape:connector-curvature="0" /><g
id="g4175"><g
id="g4177"
clip-path="url(#clipPath4179)"><g
id="g4183"
transform="matrix(41.4,0,0,19.68,310.92,314.4)"><image
width="1"
height="1"
preserveAspectRatio="none"
transform="matrix(1,0,0,-1,0,1)"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAA3CAYAAAA/inWcAAAABHNCSVQICAgIfAhkiAAAAJpJREFUeJzt0QEJACAQwMDX/p21hCCMuwSDrZk5Q8L+HcA7ZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoaYGWJmiJkhZoZcVWkBbaTUQzAAAAAASUVORK5CYII="
mask="url(#mask4185)"
id="image4189" /></g></g></g><path
d="m 329.1,327.95 0,4.21"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path4191"
inkscape:connector-curvature="0" /><path
d="m 324.1,327.15 4.92,-0.04"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path4193"
inkscape:connector-curvature="0" /><text
transform="matrix(1,0,0,-1,221.78,133.03)"
style="font-variant:normal;font-weight:normal;font-size:15.96000004px;font-family:'Times New Roman';-inkscape-font-specification:Times-Roman;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="text4195"><tspan
x="0 13.18296 27.2118 35.000278 45.789242 57.7752 64.11132 75.490799 89.519638 102.7026 108.2088 122.23764 136.26648 150.29532 160.9566 174.98544 187.2108 194.99928 208.18224"
y="0"
sodipodi:role="line"
id="tspan4197">BUILT FOR ANALYTICS</tspan></text>
</g></svg>
\ No newline at end of file
......@@ -32,6 +32,10 @@ table.app_list td {
padding-right: 1.5em;
}
table.app_list tr.even {
background-color: #F3FEEA;
}
div.status_line {
float: left;
}
......@@ -62,84 +66,98 @@ span.fakelink {
}
#wrapper {
width: 800px;
width: 800px;
}
#navigation {
background-color: #fff;
border: #ddd 1px solid;
border-radius: 10px;
margin: 10px;
padding: 10px;
background-color: #fff;
border: #ddd 1px solid;
border-radius: 10px;
margin: 10px;
padding: 10px;
}
#navigation li {
margin: 2px 0;
margin: 2px 0;
}
label.error {
color: #ff0000;
margin-left: 10px;
position: relative;
color: #ff0000;
margin-left: 10px;
position: relative;
}
.wizard {
background-color: #fff;
border: #ddd 1px solid;
border-radius: 10px;
margin: 10px;
padding: 10px;
background-color: #fff;
border: #ddd 1px solid;
border-radius: 10px;
margin: 10px;
padding: 10px;
}
.wizard .wizard-header {
background-color: #f4f4f4;
border-bottom: #ddd 1px solid;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding: 5px 10px;
margin: 0 0 10px 0;
background-color: #f4f4f4;
border-bottom: #ddd 1px solid;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding: 5px 10px;
margin: 0 0 10px 0;
}
.wizard .wizard-step {
margin: 10px 0;
margin: 10px 0;
}
.wizard .wizard-step p {
padding: 5px;
padding: 5px;
}
.navigation {
border-top: #ddd 1px solid;
margin-top: 10px;
padding-top: 10px;
border-top: #ddd 1px solid;
margin-top: 10px;
padding-top: 10px;
}
.navigation ul {
margin: 0;
padding: 0;
list-style: none;
margin: 0;
padding: 0;
list-style: none;
}
.navigation li {
float: left;
margin-right: 10px;
float: left;
margin-right: 10px;
}
.clearfix:before, .clearfix:after {
content: "\0020";
display: block;
height: 0;
visibility: hidden;
content: "\0020";
display: block;
height: 0;
visibility: hidden;
}
.clearfix:after {
clear: both;
clear: both;
}
input {
margin-top: 5px;
margin-top: 5px;
}
section {
padding-bottom: 10px;
}
\ No newline at end of file
}
#loginbox {
width: 25em;
margin: 0 auto;
text-align: center;
}
#loginbox img {
width: 100%;
}
fieldset {
border: 0;
}
......@@ -49,7 +49,6 @@
document.write((bytes / Math.pow(k, i)).toPrecision(dm) + ' ' + sizes[i]);
}
</script>
<h1>Zoe - Analytics on demand</h1>
<div id="content">{% block content %}{% endblock %}</div>
<div id="footer">
{% block footer %}
......
{% extends "base.html" %}
{% block content %}
<h1>Zoe - Analytics on demand</h1>
{{ super() }}
{% endblock %}
{% block footer %}
<p><a href="{{ reverse_url("home_user") }}">Home</a></p>
{{ super() }}
......
......@@ -23,6 +23,19 @@
<p>Error message: <code>{{ e.error_message }}</code></p>
{% endif %}
<div id="endpoints">
<h3>Endpoints</h3>
{% if endpoints|length > 0 %}
<ul>
{% for endp in endpoints %}
<li><a href="{{ endp[1] }}">{{ endp[0] }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>This execution does not have any active endpoint</p>
{% endif %}
</div>
<div id="container_list">
{% if services_info|length > 0 %}
<h3>Services:</h3>
......@@ -32,19 +45,10 @@
<li class="container_name" id="{{ s['id'] }}">{{ s['name'] }}</li>
<ul>
<li>Zoe status: {{ s['status'] }}</li>
<li>Docker status: {{ s['backend_status'] }}</li>
<li>Backend status: {{ s['backend_status'] }}</li>
{% if s['error_message'] is not none %}
<li>Error: {{ s['error_message'] }}</li>
{% endif %}
{% if s['backend_status'] == 'started' %}
{% for p in s['description']['ports'] %}
{% if s['proxy_address'] is not none %}
<li><a href="http://{{ s['proxy_address'] }}">{{ p['name'] }}</a></li>
{% else %}
<li><a> {{ p['name'] }} IP: {{ s['ip_address'] }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
{% endfor %}
</ul>
......
{% extends "base.html" %}
{% extends "base_user.html" %}
{% block title %}Home{% endblock %}
{% block content %}
......@@ -40,7 +40,7 @@
{% else %}
<td><script>format_timestamp("{{ e.time_end }}")</script></td>
{% endif %}
{% if e.status == "running" or e.status == "submitted" or e.status == "scheduled" %}
{% if e.is_active %}
<td><a href="/executions/terminate/{{ e.id }}">Terminate</a></td>
{% else %}
<td><a href="/executions/restart/{{ e.id }}">Restart</a>,
......
<div id="main-container">
<div id="main">
<h1>
<img alt="zoe dummy login page" src="{{ static_url("img/logo.png") }}">
</h1>
<div id="login-form">
<form action="/login" method="post" id="login_form">
<fieldset>
<label for="username">Username</label>
<input autocapitalize="off" autocorrect="off" class="text-input" id="username" name="username" tabindex="1" type="text" value="">
</fieldset>
{% extends "base.html" %}
{% block title %}Login{% endblock %}
{% block content %}
<fieldset>
<label for="password">Password</label>
<input class="text-input" id="password" name="password" tabindex="2" type="password" value="">
</fieldset>
<fieldset>
<span class="errormessage">{{errormessage}}</span>
</fieldset>
<div id="loginbox">
<img alt="ZOE logo" src="{{ static_url("logo.svg") }}">
<div id="login-form">
<form action="/login" method="post" id="login_form">
<fieldset>
<label for="username">Username:</label>
<input autocapitalize="off" autocorrect="off" class="text-input" id="username" name="username" tabindex="1" type="text" value=""><br>
<div id="form_btn">
<input id="signin-btn" class="btn btn-blue" type="submit" value="Sign In" tabindex="3">
</div>
</form>
</div>
<label for="password">Password:</label>
<input class="text-input" id="password" name="password" tabindex="2" type="password" value="">
</fieldset>
<div id="form_btn">
<input id="signin-btn" class="btn btn-blue" type="submit" value="Login" tabindex="3">
</div>
</div>
</form>
</div>
</div>
{% endblock %}
......@@ -84,7 +84,7 @@ def get_auth(handler: ZoeRequestHandler):
log.info('Authentication done using cookie')
return uid, role
else:
handler.redirect(handler.get_argument('next', u'/login'))
return None, None
def error_page(handler: ZoeRequestHandler, error_message: str, status: int):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment