diff --git a/watcher/requirements.txt b/watcher/requirements.txt index 7e10602..23c5fdc 100644 --- a/watcher/requirements.txt +++ b/watcher/requirements.txt @@ -1 +1,2 @@ flask +python-socketio diff --git a/watcher/static/index.js b/watcher/static/index.js index 1999b8b..b69f147 100644 --- a/watcher/static/index.js +++ b/watcher/static/index.js @@ -1,3 +1,8 @@ -const io = require('socket.io-client'); -// or with import syntax import io from 'socket.io-client'; + +$(function() { + var socket = io(); + socket.on('link_arrived', function(link_id) { + $('#current_run').append($('
').text(link_id)); + }); +}); diff --git a/watcher/templates/index.html b/watcher/templates/index.html index fb794d5..85d710d 100644 --- a/watcher/templates/index.html +++ b/watcher/templates/index.html @@ -1,43 +1,41 @@ - - - - - - + + + + + + + + +
-
-
-
- 1 -
-
- time -
-
- -
+
+
+
+ 1 +
+
+ time +
+
+ +
+
+
+
hoi
+
hoi
+
hoi
+
hoi
+
hoi
+
+
+
hoi
+
+
+
hoi
-
-
hoi
-
hoi
-
hoi
-
hoi
-
hoi
-
-
-
hoi
-
-
-
hoi
-
- + +