1
0
mirror of synced 2024-11-17 03:27:13 +01:00

Improve handling of OperationErrors.

Make output filter refresh when changing stale or errored checkboxes
This commit is contained in:
j433866 2019-05-15 16:24:49 +01:00
parent 413e80ed3e
commit 0cff7bdd04
3 changed files with 8 additions and 4 deletions

View File

@ -205,6 +205,8 @@ class Manager {
document.getElementById("output-show-pending").addEventListener("change", this.output.filterTabSearch.bind(this.output)); document.getElementById("output-show-pending").addEventListener("change", this.output.filterTabSearch.bind(this.output));
document.getElementById("output-show-baking").addEventListener("change", this.output.filterTabSearch.bind(this.output)); document.getElementById("output-show-baking").addEventListener("change", this.output.filterTabSearch.bind(this.output));
document.getElementById("output-show-baked").addEventListener("change", this.output.filterTabSearch.bind(this.output)); document.getElementById("output-show-baked").addEventListener("change", this.output.filterTabSearch.bind(this.output));
document.getElementById("output-show-stale").addEventListener("change", this.output.filterTabSearch.bind(this.output));
document.getElementById("output-show-errored").addEventListener("change", this.output.filterTabSearch.bind(this.output));
document.getElementById("output-content-filter").addEventListener("change", this.output.filterTabSearch.bind(this.output)); document.getElementById("output-content-filter").addEventListener("change", this.output.filterTabSearch.bind(this.output));
document.getElementById("output-content-filter").addEventListener("keyup", this.output.filterTabSearch.bind(this.output)); document.getElementById("output-content-filter").addEventListener("keyup", this.output.filterTabSearch.bind(this.output));
document.getElementById("output-num-results").addEventListener("change", this.output.filterTabSearch.bind(this.output)); document.getElementById("output-num-results").addEventListener("change", this.output.filterTabSearch.bind(this.output));

View File

@ -1287,13 +1287,13 @@ class OutputWaiter {
if (output.status === "pending" && showPending || if (output.status === "pending" && showPending ||
output.status === "baking" && showBaking || output.status === "baking" && showBaking ||
output.status === "errored" && showErrored || output.status === "error" && showErrored ||
output.status === "stale" && showStale || output.status === "stale" && showStale ||
output.status === "inactive" && showStale) { output.status === "inactive" && showStale) {
const outDisplay = { const outDisplay = {
"pending": "Not baked yet", "pending": "Not baked yet",
"baking": "Baking", "baking": "Baking",
"errored": "Errored", "error": output.error || "Errored",
"stale": "Stale (output is out of date)", "stale": "Stale (output is out of date)",
"inactive": "Not baked yet" "inactive": "Not baked yet"
}; };
@ -1303,6 +1303,7 @@ class OutputWaiter {
}); });
} else if (output.status === "baked" && showBaked) { } else if (output.status === "baked" && showBaked) {
let data = this.getOutput(iNum, false).slice(0, 4096); let data = this.getOutput(iNum, false).slice(0, 4096);
log.error(output);
if (typeof data !== "string") { if (typeof data !== "string") {
data = Utils.arrayBufferToStr(data); data = Utils.arrayBufferToStr(data);
} }

View File

@ -146,11 +146,12 @@ class WorkerWaiter {
if (r.data.error) { if (r.data.error) {
this.app.handleError(r.data.error); this.app.handleError(r.data.error);
this.manager.output.updateOutputError(r.data.error, inputNum, r.data.progress); this.manager.output.updateOutputError(r.data.error, inputNum, r.data.progress);
this.workerFinished(currentWorker); } else if (r.data.progress !== this.manager.recipe.getConfig().length) {
this.manager.output.updateOutputError(r.data.result, inputNum, r.data.progress);
} else { } else {
this.updateOutput(r.data, r.data.inputNum, r.data.bakeId, r.data.progress); this.updateOutput(r.data, r.data.inputNum, r.data.bakeId, r.data.progress);
this.workerFinished(currentWorker);
} }
this.workerFinished(currentWorker);
break; break;
case "bakeError": case "bakeError":
this.app.handleError(r.data.error); this.app.handleError(r.data.error);