mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 08:16:17 -04:00
Abort the previous bake when attempting the next autobake
This commit is contained in:
parent
33a473c09b
commit
a81b2064d4
3 changed files with 54 additions and 1 deletions
|
@ -322,6 +322,28 @@ class WorkerWaiter {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the current bake making it possible to autobake again
|
||||
*/
|
||||
cancelBakeForAutoBake() {
|
||||
if (this.totalOutputs > 1) {
|
||||
this.cancelBake();
|
||||
} else {
|
||||
// In this case the UI changes can be skipped
|
||||
|
||||
for (let i = this.chefWorkers.length - 1; i >= 0; i--) {
|
||||
if (this.chefWorkers[i].active) {
|
||||
this.removeChefWorker(this.chefWorkers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
this.inputs = [];
|
||||
this.inputNums = [];
|
||||
this.totalOutputs = 0;
|
||||
this.loadingOutputs = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the current bake by terminating and removing all ChefWorkers
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue