From 9753635775e3673cb66c69305e8037340723c864 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 6 Aug 2018 17:33:53 +0200 Subject: [PATCH] Improve web page --- html/index.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/html/index.html b/html/index.html index d244852..a1c07d0 100644 --- a/html/index.html +++ b/html/index.html @@ -14,18 +14,18 @@ socket.onopen = function() { console.log("socket open"); - updateLocal("socket open"); + document.getElementById("inputStatus").innerHTML = "connected"; } socket.onclose = function() { console.log("socket closed"); - updateLocal("socket closed"); + document.getElementById("inputStatus").innerHTML = "disconnected"; delete socket; setTimeout(connect, 10000); } socket.onmessage = function(msg) { - updateLocal(msg.data); + updateJSONmsg(msg.data); if (typeof updateRemote === "function") { updateRemote(msg.data); } else { @@ -40,7 +40,7 @@ connect(); - function updateLocal(msg) { + function updateJSONmsg(msg) { document.getElementById("localJSON").innerHTML = msg; } function printLocalStorage() { @@ -57,7 +57,7 @@ output += "localStorage not supported"; } - updateLocal(output); + updateJSONmsg(output); } function clearLocalStorage() { @@ -78,10 +78,16 @@ +
+

IID Coffee Terminal

+
+ +
No data from server.
+
-

Merica Terminal

+

Debug area

@@ -91,11 +97,10 @@ -

no data received

+

Input: , JSON message: no data received


-
all alone in a danger zone...
-- 2.39.2