1.0.37 - added progressbar

pull/110/head
openbuilds-engineer 2018-08-01 22:20:17 +02:00
rodzic a9c2f812d7
commit 292b341d84
5 zmienionych plików z 27 dodań i 14 usunięć

Wyświetl plik

@ -498,7 +498,7 @@
<div id="_target_1">
<div id="editor"></div>
<div class="fixed-bottom m-3 mb-8">
<div class="fixed-bottom m-3 mb-9">
<button data-toggle="tooltip" data-placement="bottom" title="Find and Replace" class="button dark" onclick="editor.execCommand('replace')"><i class="fas fa-search"></i></button>
<button data-toggle="tooltip" data-placement="bottom" title="Select All" class="button dark" onclick="editor.execCommand('selectall')"><i class="far fa-check-square"></i></button>
<button data-toggle="tooltip" data-placement="bottom" title="Undo" class="button dark" onclick="editor.execCommand('undo')"><i class="fas fa-undo"></i></button>
@ -511,7 +511,7 @@
</div>
<div id="_target_2">
<div id="console"></div>
<div class="fixed-bottom m-3 mb-8">
<div class="fixed-bottom m-3 mb-9">
<form class="inline-form">
<input data-prepend="&nbsp;<i class='fas fa-terminal'></i>" data-role="input" data-clear-button="false" data-role="input" id="command" type="text" autocomplete="on" class="needs-connection" style="width: calc(100vw - 170px);" />
<button id="sendCommand" class="button dark needs-connection" type="button" data-role="hint" data-hint-position="top" data-hint-text="Execute Command" data-cls-hint="bg-light fg-dark drop-shadow">
@ -564,6 +564,11 @@
</div>
</div>
</div>
<div class="row">
<div class="cell-12">
<div data-role="progress" id="progressbar" data-value="0"></div>
</div>
</div>
</div>
</div>
</div>

Wyświetl plik

@ -130,8 +130,8 @@ function setJogPanel(val, status) {
if (val == 0) { // Not Connected Yet
// Show panel and resize editor
$("#jogcontrols").slideUp("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 210 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 210 + 'px)');
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', true);
@ -141,8 +141,8 @@ function setJogPanel(val, status) {
} else if (val == 0 || val == 2) { // Connected, but not Playing yet
// Show panel and resize editor
$("#jogcontrols").slideDown("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 450 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 490 + 'px)');
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 460 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 500 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', false);
@ -151,8 +151,8 @@ function setJogPanel(val, status) {
}
} else if (val == 3) { // Busy Streaming GCODE
// Show panel and resize editor
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 450 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 490 + 'px)');
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 460 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 500 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$("#jogcontrols").slideDown("fast");
@ -163,8 +163,8 @@ function setJogPanel(val, status) {
} else if (val == 4) { // Paused
// Show panel and resize editor
$("#jogcontrols").slideDown("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 450 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 490 + 'px)');
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 460 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 500 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', true);
@ -174,8 +174,8 @@ function setJogPanel(val, status) {
} else if (val == 5) { // Alarm State
// Show panel and resize editor
$("#jogcontrols").slideUp("fast");
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 210 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 210 + 'px)');
$("#editor").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$("#console").css('height', 'calc(' + 100 + 'vh - ' + 270 + 'px)');
$('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height());
editor.resize()
$('.jogbtn').attr('disabled', true);

Wyświetl plik

@ -154,6 +154,14 @@ function initSocket() {
}
}
$('#gcodesent').html("Queue: " + parseInt(data[0]));
// calc percentage
var left = parseInt(data[0])
var total = parseInt(data[1])
var done = total - left;
var donepercent = parseInt(done / total * 100)
var progressbar = $("#progressbar").data("progress");
progressbar.val(donepercent);
// }
sduploading = data[2];
if (sduploading) {

Wyświetl plik

@ -2287,7 +2287,7 @@ if (electronApp) {
// Create the browser window.
jogWindow = new BrowserWindow({
width: 660,
height: 710,
height: 730,
fullscreen: false,
center: true,
resizable: true,

Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "OpenBuildsMachineDriver",
"version": "1.0.36",
"version": "1.0.37",
"license": "AGPL-3.0",
"description": "Machine Interface Driver for OpenBuilds",
"author": "github.com/openbuilds <webmaster@openbuilds.com>",