"""
web widgets for MURSAT1 Dashboard
"""
import time
def loginFormWidget ():
html = '''
Please enter your email and password in the form below.
Don't have an account yet? Register here!
'''
return html
def loginWidget (email):
html = '''
login request for {0}
'''.format (email)
return html
def registerFormWidget ():
html = '''
Please fill in the form below an click on Register. You will receive a confirmation email.
Fields marked with a * are mandatory.
'''
return html
def registerWidget ():
html = '''
Thank you for registering!
You will receive an email conataining a link to confirm your registration. Please use this link within 24 hours to complete registration.
'''
return html
def errorWidget (error_message):
html = '''
An error occured!
Error: {0}
Description: {1}
'''.format (error_message['error'], error_message['description'])
return html
def submitFormWidget ():
html = '''
sorry, no form yet!
'''
return html
def submitWidget ():
html = '''
need processing of data
'''
return html
def logWidget ():
html = '''
Log data, lot's of log data ...
'''
return html
def osmWidget (longitude = 15.4426, latitude = 47.06576):
html = '''
'''.format (longitude, latitude)
return html
def statusWidget (ip, email):
html = '''
MURSAT1 Mission Dashboard
Hello {0} with session id '{1}'! Local time is {2}
'''.format (email, ip, time.strftime ('%c'))
return html
def indexWidget (lcol, rcol, status):
html = '''
MURSAT1 Dashboard
{0}
{1}
{2}
Development version!
'''.format (status, lcol, rcol)
return html
def dataWidget (longitude = 15.44226, latitude = 47.06576):
html = '''