diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index 2a5776e23..97a494a7a 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -109,7 +109,6 @@ function newRestartSimulation () { await graphQlRestartSimulation(simulationParams) thisObject.status = 'Calculating' counterTillNextState = 2000 - turnOffProductCards() } else { thisObject.status = 'Error' counterTillNextState = 500 @@ -159,6 +158,11 @@ function newRestartSimulation () { break case 'Calculating': + thisObject.status = 'Refreshing' + turnOffProductCards() + counterTillNextState = 250 + break + case 'Refreshing': thisObject.status = 'Ready' turnOnProductCards() break @@ -203,11 +207,14 @@ function newRestartSimulation () { break } case 'Saving': - params.backgroundColor = UI_COLOR.GREY + params.backgroundColor = UI_COLOR.MANGANESE_PURPLE break case 'Restarting': params.backgroundColor = UI_COLOR.GREY break + case 'Refreshing': + params.backgroundColor = UI_COLOR.GOLDEN_ORANGE + break case 'Calculating': params.backgroundColor = UI_COLOR.TITANIUM_YELLOW break @@ -243,6 +250,9 @@ function newRestartSimulation () { case 'Restarting': label = 'RESTARTING TRADING ENGINE...' break + case 'Refreshing': + label = 'RE-LOADING...' + break case 'Calculating': label = 'CALCULATING...' break @@ -261,4 +271,3 @@ function newRestartSimulation () { browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y) } } - diff --git a/Spaces/StrategySpace.js b/Spaces/StrategySpace.js index 05a58780d..98ca23a62 100644 --- a/Spaces/StrategySpace.js +++ b/Spaces/StrategySpace.js @@ -143,8 +143,10 @@ function newStrategySpace () { function deploydTradingSystem () { thisObject.workspace = newWorkspace() - thisObject.workspace.initialize(thisObject.strategizerGateway.strategizerData) - thisObject.isDeployed = true + if (thisObject.strategizerGateway.strategizerData !== undefined) { + thisObject.workspace.initialize(thisObject.strategizerGateway.strategizerData) + thisObject.isDeployed = true + } } function makeInvisible () { @@ -173,3 +175,4 @@ function newStrategySpace () { } } } +