styles: Log display
This commit is contained in:
parent
f28e1459ef
commit
676f5ab0e8
|
@ -5,8 +5,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.plugin_klipper_log {
|
.plugin_klipper_log {
|
||||||
|
padding: 0.5em;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 100%;
|
height: 400px;
|
||||||
|
background-color: #efefef;
|
||||||
|
border: 1px #eee;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plugin_klipper_log .log-item {
|
.plugin_klipper_log .log-item {
|
||||||
|
|
|
@ -13,19 +13,17 @@ $(function() {
|
||||||
self.logMessages = ko.observableArray();
|
self.logMessages = ko.observableArray();
|
||||||
|
|
||||||
self.onGetStatus = function() {
|
self.onGetStatus = function() {
|
||||||
self.shortStatus("Update Status")
|
self.shortStatus("Updating Status ...")
|
||||||
OctoPrint.control.sendGcode("Status")
|
OctoPrint.control.sendGcode("Status")
|
||||||
}
|
}
|
||||||
|
|
||||||
self.onRestartFirmware = function() {
|
self.onRestartFirmware = function() {
|
||||||
self.logMessage("Restarted Firmware");
|
self.shortStatus("Restarting Firmware ...");
|
||||||
self.shortStatus("Restarting Firmware");
|
|
||||||
OctoPrint.control.sendGcode("FIRMWARE_RESTART")
|
OctoPrint.control.sendGcode("FIRMWARE_RESTART")
|
||||||
};
|
};
|
||||||
|
|
||||||
self.onRestartHost = function() {
|
self.onRestartHost = function() {
|
||||||
self.logMessage("Restarted Host");
|
self.shortStatus("Restarting Host ...");
|
||||||
self.shortStatus("Restarting Host");
|
|
||||||
OctoPrint.control.sendGcode("RESTART")
|
OctoPrint.control.sendGcode("RESTART")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
<hr>
|
<label>Log</label>
|
||||||
<div class="plugin_klipper_log" data-bind="foreach: logMessages">
|
<div class="plugin_klipper_log" data-bind="foreach: logMessages">
|
||||||
<div class="log-item"><i data-bind="text: time"></i> <span data-bind="text: msg, css: type"></span></div>
|
<div class="log-item"><i data-bind="text: time"></i> <span data-bind="text: msg, css: type"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue