Clean
This commit is contained in:
parent
cbee1cb4b2
commit
80ba6b40e8
|
|
@ -86,9 +86,8 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(value);
|
for (let line of value.split('\n')) {
|
||||||
let { status, id, ratio } = JSON.parse(value);
|
let { status, id, ratio } = JSON.parse(line);
|
||||||
console.log(status, id, ratio);
|
|
||||||
progress = Math.ceil(1000 * parseFloat(ratio));
|
progress = Math.ceil(1000 * parseFloat(ratio));
|
||||||
|
|
||||||
if (status === "ready") {
|
if (status === "ready") {
|
||||||
|
|
@ -101,6 +100,7 @@
|
||||||
grid.appendChild(cell);
|
grid.appendChild(cell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
calibrateButton.addEventListener('click', async () => {
|
calibrateButton.addEventListener('click', async () => {
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,8 @@
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { status, id, ratio } = JSON.parse(value);
|
for (let line of value.split('\n')) {
|
||||||
|
let { status, id, ratio } = JSON.parse(line);
|
||||||
progress = Math.ceil(1000 * parseFloat(ratio));
|
progress = Math.ceil(1000 * parseFloat(ratio));
|
||||||
|
|
||||||
if (status === "ready") {
|
if (status === "ready") {
|
||||||
|
|
@ -169,6 +170,7 @@
|
||||||
grid.appendChild(cell);
|
grid.appendChild(cell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function refreshProgressBar() {
|
function refreshProgressBar() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue