mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-17 03:35:07 -04:00
Added more comprehensive logging to FlowControl ops and added '>' prefix to all ChefWorker logs to improve clarity
This commit is contained in:
parent
8684bc0158
commit
fa6905ef00
9 changed files with 66 additions and 13 deletions
|
@ -49,9 +49,11 @@ App.prototype.setup = function() {
|
|||
this.manager.setup();
|
||||
this.resetLayout();
|
||||
this.setCompileMessage();
|
||||
this.loadURIParams();
|
||||
|
||||
log.debug("App loaded");
|
||||
this.appLoaded = true;
|
||||
|
||||
this.loadURIParams();
|
||||
this.loaded();
|
||||
};
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ Manager.prototype.initialiseEventListeners = function() {
|
|||
this.addDynamicListener(".op-list .op-icon", "mouseover", this.ops.opIconMouseover, this.ops);
|
||||
this.addDynamicListener(".op-list .op-icon", "mouseleave", this.ops.opIconMouseleave, this.ops);
|
||||
this.addDynamicListener(".op-list", "oplistcreate", this.ops.opListCreate, this.ops);
|
||||
this.addDynamicListener("li.operation", "operationadd", this.recipe.opAdd.bind(this.recipe));
|
||||
this.addDynamicListener("li.operation", "operationadd", this.recipe.opAdd, this.recipe);
|
||||
|
||||
// Recipe
|
||||
this.addDynamicListener(".arg:not(select)", "input", this.recipe.ingChange, this.recipe);
|
||||
|
|
|
@ -253,7 +253,7 @@ RecipeWaiter.prototype.breakpointClick = function(e) {
|
|||
*/
|
||||
RecipeWaiter.prototype.operationDblclick = function(e) {
|
||||
e.target.remove();
|
||||
window.dispatchEvent(this.manager.statechange);
|
||||
this.opRemove(e);
|
||||
};
|
||||
|
||||
|
||||
|
@ -266,7 +266,7 @@ RecipeWaiter.prototype.operationDblclick = function(e) {
|
|||
*/
|
||||
RecipeWaiter.prototype.operationChildDblclick = function(e) {
|
||||
e.target.parentNode.remove();
|
||||
window.dispatchEvent(this.manager.statechange);
|
||||
this.opRemove(e);
|
||||
};
|
||||
|
||||
|
||||
|
@ -421,6 +421,7 @@ RecipeWaiter.prototype.dropdownToggleClick = function(e) {
|
|||
* @param {event} e
|
||||
*/
|
||||
RecipeWaiter.prototype.opAdd = function(e) {
|
||||
log.debug(`'${e.target.querySelector(".arg-title").textContent}' added to recipe`);
|
||||
window.dispatchEvent(this.manager.statechange);
|
||||
};
|
||||
|
||||
|
@ -433,6 +434,7 @@ RecipeWaiter.prototype.opAdd = function(e) {
|
|||
* @param {event} e
|
||||
*/
|
||||
RecipeWaiter.prototype.opRemove = function(e) {
|
||||
log.debug("Operation removed from recipe");
|
||||
window.dispatchEvent(this.manager.statechange);
|
||||
};
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ WorkerWaiter.prototype.handleChefMessage = function(e) {
|
|||
log.debug("Receiving '" + r.action + "' from ChefWorker");
|
||||
|
||||
switch (r.action) {
|
||||
case "bakeSuccess":
|
||||
case "bakeComplete":
|
||||
this.bakingComplete(r.data);
|
||||
break;
|
||||
case "bakeError":
|
||||
|
@ -56,6 +56,7 @@ WorkerWaiter.prototype.handleChefMessage = function(e) {
|
|||
break;
|
||||
case "workerLoaded":
|
||||
this.app.workerLoaded = true;
|
||||
log.debug("ChefWorker loaded");
|
||||
this.app.loaded();
|
||||
break;
|
||||
case "statusMessage":
|
||||
|
@ -118,6 +119,7 @@ WorkerWaiter.prototype.bakingComplete = function(response) {
|
|||
this.app.progress = response.progress;
|
||||
this.manager.recipe.updateBreakpointIndicator(response.progress);
|
||||
this.manager.output.set(response.result, response.type, response.duration);
|
||||
log.debug("--- Bake complete ---");
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue