Fix hostname reading for Qt < 5.6
This commit is contained in:
parent
191936e235
commit
cc858b4d0a
@ -67,13 +67,13 @@ function connectWebsocket() {
|
||||
webSocket = new WebSocket(urlString);
|
||||
|
||||
webSocket.onopen = function(openEvent) {
|
||||
console.log("WebSocket connected: " + JSON.stringify(openEvent, null, 4));
|
||||
console.log("WebSocket connected");
|
||||
webSocketConnected = true;
|
||||
document.getElementById("toggleLogsButton").innerHTML = "Stop logs";
|
||||
};
|
||||
|
||||
webSocket.onclose = function(closeEvent) {
|
||||
console.log("WebSocket disconnected: " + JSON.stringify(closeEvent, null, 4));
|
||||
console.log("WebSocket disconnected");
|
||||
webSocketConnected = false;
|
||||
document.getElementById("toggleLogsButton").innerHTML = "Start logs";
|
||||
};
|
||||
@ -84,7 +84,6 @@ function connectWebsocket() {
|
||||
|
||||
webSocket.onmessage = function (messageEvent) {
|
||||
var message = messageEvent.data;
|
||||
console.log("WebSocket data received: " + message);
|
||||
document.getElementById("logsTextArea").value += message;
|
||||
document.getElementById("logsTextArea").scrollTop = document.getElementById("logsTextArea").scrollHeight;
|
||||
};
|
||||
@ -142,17 +141,14 @@ function loadLoggingCategorySettings() {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(request.responseText);
|
||||
var responseMap = JSON.parse(request.responseText);
|
||||
|
||||
for (var loggingCategory in responseMap['loggingCategories']) {
|
||||
console.warn(loggingCategory, responseMap['loggingCategories'][loggingCategory])
|
||||
var loggingCategoryElement = document.getElementById("debug-category-" + loggingCategory)
|
||||
loggingCategoryElement.checked = responseMap['loggingCategories'][loggingCategory]
|
||||
}
|
||||
|
||||
for (var loggingCategory in responseMap['loggingCategoriesPlugins']) {
|
||||
console.warn(loggingCategory, responseMap['loggingCategoriesPlugins'][loggingCategory])
|
||||
var loggingCategoryElement = document.getElementById("debug-category-" + loggingCategory)
|
||||
loggingCategoryElement.checked = responseMap['loggingCategoriesPlugins'][loggingCategory]
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* Copyright (C) 2018 Simon Stürz <simon.stuerz@guh.io> *
|
||||
* Copyright (C) 2018-2019 Simon Stürz <simon.stuerz@nymea.io> *
|
||||
* *
|
||||
* This file is part of nymea. *
|
||||
* *
|
||||
@ -39,6 +39,14 @@ h1, h2, h3, h4, h5, h6 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table {
|
||||
display: table;
|
||||
border-collapse: colapse;
|
||||
border-color: #efefef;
|
||||
min-height: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 3px;
|
||||
padding-left: 10px;
|
||||
@ -52,28 +60,10 @@ hr {
|
||||
color: #efefef;
|
||||
}
|
||||
|
||||
table {
|
||||
display: table;
|
||||
border-collapse: colapse;
|
||||
border-color: #efefef;
|
||||
min-height: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background-color: #3a4055;
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
min-height: 100px;
|
||||
text-align: left;
|
||||
border-radius: 10px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.tab {
|
||||
overflow: hidden;
|
||||
background-color: #efefef;
|
||||
@ -107,8 +97,18 @@ textarea {
|
||||
}
|
||||
|
||||
@keyframes fadeEffect {
|
||||
from {opacity: 0;}
|
||||
to {opacity: 1;}
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
textarea {
|
||||
background-color: #3a4055;
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
min-height: 100px;
|
||||
text-align: left;
|
||||
border-radius: 10px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.console-textarea {
|
||||
@ -349,7 +349,6 @@ input:checked + .slider:before {
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
/* Rounded sliders */
|
||||
.slider.round {
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* Copyright (C) 2018 Simon Stürz <simon.stuerz@guh.io> *
|
||||
* Copyright (C) 2018-2019 Simon Stürz <simon.stuerz@nymea.io> *
|
||||
* *
|
||||
* This file is part of nymea. *
|
||||
* *
|
||||
@ -415,7 +415,7 @@ HttpReply *DebugServerHandler::processDebugRequest(const QString &requestPath, c
|
||||
}
|
||||
|
||||
bool enabled = QVariant(requestQuery.queryItems().at(i).second).toBool();
|
||||
qCDebug(dcDebugServer()) << "Category" << category << enabled;
|
||||
qCDebug(dcDebugServer()) << "Logging category" << category << (enabled ? "enabled" : "disabled");
|
||||
settings.setValue(QString("%1.debug").arg(category), (enabled ? "true" : "false"));
|
||||
}
|
||||
|
||||
@ -433,7 +433,6 @@ HttpReply *DebugServerHandler::processDebugRequest(const QString &requestPath, c
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (requestPath.startsWith("/debug/report")) {
|
||||
|
||||
// The client can poll this url in order to get information about the current report generating process.
|
||||
@ -902,7 +901,6 @@ QByteArray DebugServerHandler::createDebugXmlDocument()
|
||||
writer.writeStartElement("div");
|
||||
writer.writeAttribute("class", "body");
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
writer.writeStartElement("div");
|
||||
writer.writeAttribute("class", "tabcontent");
|
||||
|
||||
Reference in New Issue
Block a user