Skip to content

Commit 5fdc39e

Browse files
Merge pull request #503 from MetaCell/feature/486
#486 fixing spinner/loader for experiment or single model
2 parents 9044402 + 972037f commit 5fdc39e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

webapp/redux/middleware/middleware.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
VIEW_EXPERIMENTS_RESULTS,
99
TRIAL_LOAD_MODEL_SPEC,
1010
} from 'root/redux/actions/experiments';
11-
import { NETPYNE_COMMANDS } from 'root/constants';
11+
import { NETPYNE_COMMANDS, EDIT_WIDGETS } from 'root/constants';
1212
import * as GeppettoActions from '@metacell/geppetto-meta-client/common/actions';
1313
import * as ExperimentsApi from 'root/api/experiments';
1414
import {
@@ -285,7 +285,11 @@ export default (store) => (next) => (action) => {
285285
break;
286286
}
287287
case SIMULATE_NETWORK: {
288-
next(GeppettoActions.waitData('Simulating the NetPyNE Model', GeppettoActions.layoutActions.SET_WIDGETS));
288+
if (!action.payload) {
289+
next(GeppettoActions.waitData('Simulating the NetPyNE Model', GeppettoActions.layoutActions.SET_WIDGETS));
290+
} else {
291+
next(GeppettoActions.activateWidget(EDIT_WIDGETS.experimentManager.id));
292+
}
289293
let allParams = true;
290294
ExperimentsApi.getParameters()
291295
.then((params) => {

0 commit comments

Comments
 (0)