mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
Improve handling of errors in operations.
Remove unused dependencies.
This commit is contained in:
parent
689d08416b
commit
f72749304d
5 changed files with 38 additions and 42 deletions
|
@ -172,7 +172,6 @@ class OutputWaiter {
|
|||
|
||||
if (status !== "error") {
|
||||
delete this.outputs[inputNum].error;
|
||||
delete this.outputs[inputNum].progress;
|
||||
}
|
||||
|
||||
this.set(inputNum);
|
||||
|
@ -189,6 +188,17 @@ class OutputWaiter {
|
|||
this.outputs[inputNum].bakeId = bakeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the stored progress value for the output in the output array
|
||||
*
|
||||
* @param {number} progress
|
||||
* @param {number} inputNum
|
||||
*/
|
||||
updateOutputProgress(progress, inputNum) {
|
||||
if (this.getOutput(inputNum) === -1) return;
|
||||
this.outputs[inputNum].progress = progress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes an output from the output array.
|
||||
*
|
||||
|
@ -240,7 +250,11 @@ class OutputWaiter {
|
|||
this.manager.controls.hideStaleIndicator();
|
||||
}
|
||||
|
||||
this.manager.recipe.updateBreakpointIndicator(false);
|
||||
if (output.progress !== undefined) {
|
||||
this.manager.recipe.updateBreakpointIndicator(output.progress);
|
||||
} else {
|
||||
this.manager.recipe.updateBreakpointIndicator(false);
|
||||
}
|
||||
|
||||
document.getElementById("show-file-overlay").style.display = "none";
|
||||
|
||||
|
@ -263,8 +277,6 @@ class OutputWaiter {
|
|||
|
||||
outputText.value = output.error;
|
||||
outputHtml.innerHTML = "";
|
||||
|
||||
this.manager.recipe.updateBreakpointIndicator(output.progress);
|
||||
} else if (output.status === "baked" || output.status === "inactive") {
|
||||
this.displayTabInfo(inputNum);
|
||||
this.toggleLoader(false);
|
||||
|
@ -1122,7 +1134,6 @@ class OutputWaiter {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Handler for copy click events.
|
||||
* Copies the output to the clipboard
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue