diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
index 1bfd941..68e55ed 100644
--- a/src/main/resources/static/index.html
+++ b/src/main/resources/static/index.html
@@ -34,10 +34,9 @@
Subscribe to topic
Log Text
-
+
+
@@ -140,7 +139,7 @@ Log Text
function refreshTokenAndReconnect() {
- updateAccessToken().then(newAccessToken => {
+ updateAccessToken().then(() => {
if (stompClient) {
stompClient.disconnect(() => {
console.log('Disconnected from WebSocket');
@@ -201,26 +200,24 @@ Log Text
if (topicId.trim() === '') {
console.log('topicId is empty');
stompClient.subscribe(subToTopicDest, function (messages) {
- let parseMessage = JSON.parse(messages.body);
+ JSON.parse(messages.body);
});
} else {
stompClient.subscribe(subToTopicDest + topicId, function (messages) {
- let parseMessage = JSON.parse(messages.body);
+ JSON.parse(messages.body);
});
}
}
function addToLog(destination, object) {
- let logtextElement = document.getElementById('logtext');
-
- let now = new Date();
- let formattedDateTime = now.toLocaleString();
+ let logTextElement = document.getElementById('logText');
+ let formattedDateTimeNow = new Date().toLocaleString();
- logtextElement.append(formattedDateTime + ' ' + destination + '\n');
- logtextElement.append('\n' + JSON.stringify(object, null, 2) + '\n');
- logtextElement.append('=================================================================== \n');
+ logTextElement.append(formattedDateTimeNow + ' ' + destination + '\n');
+ logTextElement.append('\n' + JSON.stringify(object, null, 2) + '\n');
+ logTextElement.append('=================================================================== \n');
- logtextElement.scrollTop = logtextElement.scrollHeight;
+ logTextElement.scrollTop = logTextElement.scrollHeight;
}