Skip to content

Commit b592659

Browse files
committed
Fixed UI bugs on printer manager
Fixed OctoFarm#19
1 parent 319de2f commit b592659

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ All notable changes to this project will be documented in this file.
1414

1515
- Offline Polling is now back. System -> Server Settings to change and click save to update.
1616
- Updated the note on the settings screen to better reflect this and it's affect. Yes I like potato's.
17-
- Changed the whole websocket implementation to help with issue #15. NOTE: If you add your printer to the farm offline, you may still need to re-sync it to get it detected by the farm. I'm working on why this is happening still. Printers added Online then going Offline do not encounter this. This is also the case for restarting the server with offline printers.
18-
17+
- Changed the whole websocket implementation to help with issue #15. NOTE: If you add your printer to the farm offline, you may still need to re-sync (dashboard re-sync button) it to get it detected by the farm. I'm working on why this is happening still. Printers added Online then going Offline do not encounter this. This is also the case for restarting the server with offline printers.
1918

2019
### Removed
2120

@@ -25,7 +24,8 @@ All notable changes to this project will be documented in this file.
2524

2625
- Fixed the errant " displayed on all views
2726
- Fixed the errant . when loading offline printers.
28-
- Fixed issue with printer's not collecting correct data #15 ie _default bug... Should no longer exist.
27+
- Fixed issue with printer's not collecting correct data issue #15 ie _default bug... Should no longer exist.
28+
- Fixed issue with retract button not working issue #18
2929

3030
### Security
3131

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ EOF
4141

4242
fi
4343

44-
node app.js > /app/logs/production.log 2> /app/logs/productionError.log
44+
node app.js

runners/state.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ WebSocketClient.prototype.reconnect = function(e){
7878
}
7979
WebSocketClient.prototype.onopen = async function(e){
8080
//console.log("WebSocketClient: open",arguments);
81+
await Runner.getProfile(this.index);
8182
await Runner.getState(this.index);
8283
await Runner.getFiles(this.index, "files?recursive=true");
8384
await Runner.getSystem(this.index);
8485
await Runner.getSettings(this.index);
85-
await Runner.getProfile(this.index);
86+
8687
let Polling = await ServerSettings.check();
8788
var data = {};
8889
data["auth"] = farmPrinters[this.index].currentUser + ":" + farmPrinters[this.index].apikey;
@@ -281,11 +282,12 @@ static async init() {
281282
index +
282283
" socket is either Closing/Connecting please await that to finish before attempting a reconnect...";
283284
}else{
285+
await Runner.getProfile(index);
284286
await Runner.getState(index);
285287
await Runner.getFiles(index, "files?recursive=true");
286288
await Runner.getSystem(index);
287289
await Runner.getSettings(index);
288-
await Runner.getProfile(index);
290+
289291
result.status = "success";
290292
result.msg =
291293
"Printer: " +

views/js/lib/modules/printerManager.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export default class PrinterManager {
487487
</div>
488488
</div>
489489
<div class="row">
490-
<div class="col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5">
490+
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-4">
491491
<div class="row">
492492
<div class="col-12">
493493
<center>
@@ -515,7 +515,7 @@ export default class PrinterManager {
515515
</div>
516516
</div>
517517
</div>
518-
<div class="col-12 col-sm-12 col-md-12 col-lg-3 col-xl-3">
518+
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-4">
519519
<div class="row">
520520
<div class="col-12">
521521
<center>
@@ -992,6 +992,7 @@ export default class PrinterManager {
992992
if (select) {
993993
let value = elements.printerControls.extruder.value;
994994
let opt = {
995+
995996
command: "extrude",
996997
amount: parseInt(value)
997998
};
@@ -1024,13 +1025,15 @@ export default class PrinterManager {
10241025
let select = OctoPrintClient.selectTool(printer, "tool0");
10251026
if (select) {
10261027
let value = elements.printerControls.extruder.value;
1028+
value = "-"+value;
10271029
let opt = {
10281030
command: "extrude",
10291031
amount: parseInt(value)
10301032
};
1033+
console.log(opt)
10311034
let post = await OctoPrintClient.post(
10321035
printer,
1033-
"printer/command",
1036+
"printer/tool",
10341037
opt
10351038
);
10361039
if (post.status === 204) {

0 commit comments

Comments
 (0)