aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-11 00:21:59 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-11 00:21:59 +0200
commitdd3fce423ed7ad019b49bb2dad58467b9e8383c3 (patch)
tree9dfce7b3435f6e88493c0dd4eac9a69281217a5b /templates
parent1599d900a498f7575b47b3dbfe8d52613cbe3f50 (diff)
downloadglutte-serial-web-dd3fce423ed7ad019b49bb2dad58467b9e8383c3.tar.gz
glutte-serial-web-dd3fce423ed7ad019b49bb2dad58467b9e8383c3.tar.bz2
glutte-serial-web-dd3fce423ed7ad019b49bb2dad58467b9e8383c3.zip
Use gevent to serve
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..1b68ce2
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>Moniteur de Glutte</title>
+ <link rel="stylesheet" href="static/style.css" type="text/css" media="screen" charset="utf-8"/>
+ </head>
+<body>
+ <h1>Ceci n'est pas une Glutte</h1>
+<pre id="output"></pre>
+<script>
+ var output = document.getElementById('output');
+
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', '{{ url_for('stream') }}');
+ xhr.send();
+
+ setInterval(function() {
+ output.textContent = xhr.responseText;
+ window.scrollTo(0, document.body.scrollHeight);
+ }, 1000);
+</script>
+</body></html>