Qrome - updated some of the HTML display for hostname and offline
parent
9f23894ecb
commit
1d624db136
|
|
@ -629,10 +629,13 @@ void displayPrinterStatus() {
|
||||||
|
|
||||||
html += "<div class='w3-cell-row' style='width:100%'><h2>Time: " + displayTime + "</h2></div><div class='w3-cell-row'>";
|
html += "<div class='w3-cell-row' style='width:100%'><h2>Time: " + displayTime + "</h2></div><div class='w3-cell-row'>";
|
||||||
html += "<div class='w3-cell w3-container' style='width:100%'><p>";
|
html += "<div class='w3-cell w3-container' style='width:100%'><p>";
|
||||||
|
html += "Host Name: " + OctoPrintHostName + "<br>";
|
||||||
if (printerClient.getError() != "") {
|
if (printerClient.getError() != "") {
|
||||||
html += "Error: " + printerClient.getError() + "<br>";
|
html += "Error: " + printerClient.getError() + "<br>";
|
||||||
}
|
}
|
||||||
html += "Status: " + printerClient.getState() + "<br>";
|
html += "Status: " + printerClient.getState() + "<br>";
|
||||||
|
|
||||||
|
if (printerClient.isPrinting()) {
|
||||||
html += "File: " + printerClient.getFileName() + "<br>";
|
html += "File: " + printerClient.getFileName() + "<br>";
|
||||||
float fileSize = printerClient.getFileSize().toFloat();
|
float fileSize = printerClient.getFileSize().toFloat();
|
||||||
if (fileSize > 0) {
|
if (fileSize > 0) {
|
||||||
|
|
@ -663,6 +666,10 @@ void displayPrinterStatus() {
|
||||||
html += "Printing Time: " + zeroPad(hours) + ":" + zeroPad(minutes) + ":" + zeroPad(seconds) + "<br>";
|
html += "Printing Time: " + zeroPad(hours) + ":" + zeroPad(minutes) + ":" + zeroPad(seconds) + "<br>";
|
||||||
html += "<style>#myProgress {width: 100%;background-color: #ddd;}#myBar {width: " + printerClient.getProgressCompletion() + "%;height: 30px;background-color: #4CAF50;}</style>";
|
html += "<style>#myProgress {width: 100%;background-color: #ddd;}#myBar {width: " + printerClient.getProgressCompletion() + "%;height: 30px;background-color: #4CAF50;}</style>";
|
||||||
html += "<div id=\"myProgress\"><div id=\"myBar\" class=\"w3-medium w3-center\">" + printerClient.getProgressCompletion() + "%</div></div>";
|
html += "<div id=\"myProgress\"><div id=\"myBar\" class=\"w3-medium w3-center\">" + printerClient.getProgressCompletion() + "%</div></div>";
|
||||||
|
} else {
|
||||||
|
html += "<hr>";
|
||||||
|
}
|
||||||
|
|
||||||
html += "</p></div></div>";
|
html += "</p></div></div>";
|
||||||
|
|
||||||
server.sendContent(html); // spit out what we got
|
server.sendContent(html); // spit out what we got
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue