Addingle single server log tab.
parent
3c6119369d
commit
2e7422eede
|
@ -44,6 +44,10 @@ function IrcClient(sockJs, nick, userName, realName) {
|
||||||
|
|
||||||
this.sockJs.onmessage = function (e) {
|
this.sockJs.onmessage = function (e) {
|
||||||
console.log("Received message: " + e.data);
|
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 ")) {
|
if (e.data.startsWith("PING ")) {
|
||||||
ircClientRef.handlePongMessage(e.data, e.data.substr(7));
|
ircClientRef.handlePongMessage(e.data, e.data.substr(7));
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,15 @@
|
||||||
<link type="text/css" rel="stylesheet" href="/webjars/bootstrap/3.3.7-1/css/bootstrap.css"/>
|
<link type="text/css" rel="stylesheet" href="/webjars/bootstrap/3.3.7-1/css/bootstrap.css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="active"><a data-toggle="tab" href="#server">Server</a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content">
|
||||||
|
<div id="server" class="tab-pane fade in active">
|
||||||
|
Contents
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<input id="message" type="text" />
|
<input id="message" type="text" />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue