From 2e7422eede38be005bda761da8dfb96ff987b39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Sun, 10 Sep 2017 12:35:42 +0200 Subject: [PATCH] Addingle single server log tab. --- src/main/resources/static/IrcClient.js | 4 ++++ src/main/resources/static/index.html | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/main/resources/static/IrcClient.js b/src/main/resources/static/IrcClient.js index c207746..1df7955 100644 --- a/src/main/resources/static/IrcClient.js +++ b/src/main/resources/static/IrcClient.js @@ -44,6 +44,10 @@ function IrcClient(sockJs, nick, userName, realName) { this.sockJs.onmessage = function (e) { console.log("Received message: " + e.data); + var server = document.getElementById("server"); + var logRow = document.createElement("div"); + logRow.innerHTML = e.data; + server.appendChild(logRow); if (e.data.startsWith("PING ")) { ircClientRef.handlePongMessage(e.data, e.data.substr(7)); } diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index aabe0a6..1741570 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -13,6 +13,15 @@ + +
+
+ Contents +
+
+ \ No newline at end of file