Clean
This commit is contained in:
parent
cbee1cb4b2
commit
80ba6b40e8
|
|
@ -86,19 +86,19 @@
|
|||
break;
|
||||
}
|
||||
|
||||
console.log(value);
|
||||
let { status, id, ratio } = JSON.parse(value);
|
||||
console.log(status, id, ratio);
|
||||
progress = Math.ceil(1000 * parseFloat(ratio));
|
||||
for (let line of value.split('\n')) {
|
||||
let { status, id, ratio } = JSON.parse(line);
|
||||
progress = Math.ceil(1000 * parseFloat(ratio));
|
||||
|
||||
if (status === "ready") {
|
||||
let cell = document.createElement('div');
|
||||
cell.classList.add('cell');
|
||||
let img = document.createElement('img');
|
||||
img.classList.add('is-loading');
|
||||
img.src = '/data/calibrations/{{ calibration.id }}/' + id + '.jpg?v=' + scanIndex;
|
||||
cell.appendChild(img);
|
||||
grid.appendChild(cell);
|
||||
if (status === "ready") {
|
||||
let cell = document.createElement('div');
|
||||
cell.classList.add('cell');
|
||||
let img = document.createElement('img');
|
||||
img.classList.add('is-loading');
|
||||
img.src = '/data/calibrations/{{ calibration.id }}/' + id + '.jpg?v=' + scanIndex;
|
||||
cell.appendChild(img);
|
||||
grid.appendChild(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -156,17 +156,19 @@
|
|||
continue;
|
||||
}
|
||||
|
||||
let { status, id, ratio } = JSON.parse(value);
|
||||
progress = Math.ceil(1000 * parseFloat(ratio));
|
||||
for (let line of value.split('\n')) {
|
||||
let { status, id, ratio } = JSON.parse(line);
|
||||
progress = Math.ceil(1000 * parseFloat(ratio));
|
||||
|
||||
if (status === "ready") {
|
||||
let cell = document.createElement('div');
|
||||
cell.classList.add('cell');
|
||||
let img = document.createElement('img');
|
||||
img.classList.add('is-loading');
|
||||
img.src = '/data/objects/{{ object.id }}/' + acquisitionId + '/' + id + '.jpg?v=' + scanIndex;
|
||||
cell.appendChild(img);
|
||||
grid.appendChild(cell);
|
||||
if (status === "ready") {
|
||||
let cell = document.createElement('div');
|
||||
cell.classList.add('cell');
|
||||
let img = document.createElement('img');
|
||||
img.classList.add('is-loading');
|
||||
img.src = '/data/objects/{{ object.id }}/' + acquisitionId + '/' + id + '.jpg?v=' + scanIndex;
|
||||
cell.appendChild(img);
|
||||
grid.appendChild(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue