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