summaryrefslogtreecommitdiff
path: root/updater/index.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-24 18:15:01 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-24 18:15:01 +0100
commita141ab8ae4a1cb14144e224369a89e2376a10fa6 (patch)
tree5460689c73fcda7c00beca9297768b09bd1e545b /updater/index.html
parent54b8482223288a4d5df41267f3c9235bab06c15e (diff)
downloadmeta-a141ab8ae4a1cb14144e224369a89e2376a10fa6.tar.gz
meta-a141ab8ae4a1cb14144e224369a89e2376a10fa6.zip
update to 1.5.1
Diffstat (limited to 'updater/index.html')
-rw-r--r--updater/index.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/updater/index.html b/updater/index.html
new file mode 100644
index 0000000..b97d287
--- /dev/null
+++ b/updater/index.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Vainsocial backend status</title>
+ </head>
+ <body>
+ <form id="update-form">
+ <input type="text">
+ <input type="submit" value="Update">
+ </form>
+
+ <ul id="updates"></ul>
+ <script src="/socket.io/socket.io.js"></script>
+ <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
+ <script>
+ var socket = io();
+ $("#update-form").submit(function(e) {
+ var name = $("input:first").val();
+ $.get("/api/player/name/" + name).done(function() {
+ $("#updates").append(
+ $("<li>")
+ .text("(found)")
+ .css("color", "black")
+ );
+ /* subscribe to socket notifications */
+ socket.on(name, function(msg) {
+ if (msg == "grab_failed") {
+ $("#updates").append(
+ $("<li>")
+ .text(name + ": no new data")
+ .css("color", "red")
+ );
+ }
+ if (msg == "process_finished") {
+ $("#updates").append(
+ $("<li>")
+ .text(name + ": processed")
+ .css("color", "green")
+ );
+ }
+ if (msg == "compile_finished") {
+ $("#updates").append(
+ $("<li>")
+ .text(name + ": compiled")
+ .css("color", "orange")
+ );
+ }
+ });
+ }).fail(function() {
+ $("#updates").append(
+ $("<li>")
+ .text("(not found)")
+ .css("color", "red")
+ );
+ });
+ e.preventDefault();
+ });
+ </script>
+ </body>
+</html>