summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-21 16:24:23 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-21 16:24:23 +0100
commit56cdd18ff289f9f730465cbd50a0bc9f3c6a0bc6 (patch)
treee6f48cf835ce742b7bf774906d7d6b55a471dfd6 /index.html
downloadbridge-56cdd18ff289f9f730465cbd50a0bc9f3c6a0bc6.tar.gz
bridge-56cdd18ff289f9f730465cbd50a0bc9f3c6a0bc6.zip
first implementation of updater
Diffstat (limited to 'index.html')
-rw-r--r--index.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..b31ad37
--- /dev/null
+++ b/index.html
@@ -0,0 +1,30 @@
+<!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>
+ $("#update-form").submit(function(e) {
+ $.get("/api/player/" + $("input:first").val()).done(function() {
+ $("#updates").append($("<li>").text("(found)"));
+ }).fail(function() {
+ $("#updates").append($("<li>").text("(not found)"));
+ });
+ e.preventDefault();
+ });
+ var socket = io();
+ socket.on("job update", function(msg) {
+ $("#updates").append($("<li>").text(msg));
+ });
+ </script>
+ </body>
+</html>