mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Improve handling of OperationErrors.
Make output filter refresh when changing stale or errored checkboxes
This commit is contained in:
parent
413e80ed3e
commit
0cff7bdd04
@ -205,6 +205,8 @@ class Manager {
|
||||
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-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("keyup", this.output.filterTabSearch.bind(this.output));
|
||||
document.getElementById("output-num-results").addEventListener("change", this.output.filterTabSearch.bind(this.output));
|
||||
|
@ -1287,13 +1287,13 @@ class OutputWaiter {
|
||||
|
||||
if (output.status === "pending" && showPending ||
|
||||
output.status === "baking" && showBaking ||
|
||||
output.status === "errored" && showErrored ||
|
||||
output.status === "error" && showErrored ||
|
||||
output.status === "stale" && showStale ||
|
||||
output.status === "inactive" && showStale) {
|
||||
const outDisplay = {
|
||||
"pending": "Not baked yet",
|
||||
"baking": "Baking",
|
||||
"errored": "Errored",
|
||||
"error": output.error || "Errored",
|
||||
"stale": "Stale (output is out of date)",
|
||||
"inactive": "Not baked yet"
|
||||
};
|
||||
@ -1303,6 +1303,7 @@ class OutputWaiter {
|
||||
});
|
||||
} else if (output.status === "baked" && showBaked) {
|
||||
let data = this.getOutput(iNum, false).slice(0, 4096);
|
||||
log.error(output);
|
||||
if (typeof data !== "string") {
|
||||
data = Utils.arrayBufferToStr(data);
|
||||
}
|
||||
|
@ -146,11 +146,12 @@ class WorkerWaiter {
|
||||
if (r.data.error) {
|
||||
this.app.handleError(r.data.error);
|
||||
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 {
|
||||
this.updateOutput(r.data, r.data.inputNum, r.data.bakeId, r.data.progress);
|
||||
this.workerFinished(currentWorker);
|
||||
}
|
||||
this.workerFinished(currentWorker);
|
||||
break;
|
||||
case "bakeError":
|
||||
this.app.handleError(r.data.error);
|
||||
|
Loading…
Reference in New Issue
Block a user