summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdWidgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mmd/MmdWidgets.py')
-rw-r--r--tools/mmd/MmdWidgets.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/mmd/MmdWidgets.py b/tools/mmd/MmdWidgets.py
index a1a1f55..8bade15 100644
--- a/tools/mmd/MmdWidgets.py
+++ b/tools/mmd/MmdWidgets.py
@@ -1,5 +1,5 @@
"""
-web templates for MURSAT1 Dashboard
+web widgets for MURSAT1 Dashboard
"""
import time
@@ -42,7 +42,7 @@ def registerFormWidget ():
<tr><td class="formfield">Confirm Password*: </td><td><input type="password" name="confirm" /></td></tr>
<tr><td class="formfield"><input type="submit" value="Register" /></td><td></td></tr>
</table>
- <input type="hidden" name="cmd" value="login" />
+ <input type="hidden" name="cmd" value="register" />
</form>
Fields marked with a * are mandatory.
'''
@@ -51,7 +51,7 @@ def registerFormWidget ():
def registerWidget ():
html = '''
- need processing of data
+ you could be registered iff I had finished this code
'''
return html
@@ -104,15 +104,18 @@ def osmWidget (longitude = 15.4426, latitude = 47.06576):
def statusWidget (ip, user = 'Anonymous'):
html = '''
- <img src="http://sat.mur.at/pics/sat-logo-notext.png" alt="mur.sat logo" /> MURSAT1 Mission Dashboard
+ <a href="mmd">
+ <img src="http://sat.mur.at/pics/sat-logo-notext.png" alt="mur.sat logo" />
+ </a>
+ MURSAT1 Mission Dashboard
<div id="info">
- Hello {0} from {1}! Local time is {2}
+ Hello {0} with session id '{1}'! Local time is {2}
</div>
'''.format (user, ip, time.strftime ('%c'))
return html
-def indexWidget (lcol, rcol, status = statusWidget (None)):
+def indexWidget (lcol, rcol, status):
html = '''
<!Doctype html>
<html>
@@ -158,5 +161,8 @@ def dataWidget (longitude = 15.44226, latitude = 47.06576):
return html
+if __name__ == "__main__":
+ pass
+
# vim: ft=html tw=0 ts=2 expandtab
# EOF