Skip to content

Commit 43333b2

Browse files
committed
#496 mitigate kernel autorestart, remove spinner when error happens
1 parent cf81c8a commit 43333b2

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

webapp/components/NetPyNE.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ class NetPyNE extends React.Component {
107107

108108
openPythonCallDialog (event) {
109109
if (event?.evalue && event?.traceback) {
110-
this.props.geppettoError();
111110
this.props.pythonCallErrorDialogBox({
112111
errorMessage: event.evalue,
113112
errorDetails: event.traceback.join('\n'),

webapp/components/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
updateWidget,
1010
newWidget,
1111
maximiseWidget,
12-
hideSpinner,
1312
} from '@metacell/geppetto-meta-client/common/actions';
1413
import { TOPBAR_CONSTANTS } from '../constants';
1514
import PythonControlledCapability from './general/PythonControlledCapability';
@@ -159,7 +158,6 @@ export const NetPyNE = connect(
159158
setDefaultWidgets: () => dispatch(setDefaultWidgets),
160159
modelLoaded: () => dispatch(modelLoaded),
161160
getExperiments: () => dispatch(getExperiments()),
162-
geppettoError: () => dispatch(hideSpinner()),
163161
}),
164162
)(_NetPyNE);
165163

webapp/redux/middleware/middleware.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
showNetwork,
2626
addInstancesToCanvas,
2727
} from '../actions/general';
28-
import { openBackendErrorDialog } from '../actions/errors';
28+
import { OPEN_BACKEND_ERROR_DIALOG, openBackendErrorDialog } from '../actions/errors';
2929
import { closeDrawerDialogBox } from '../actions/drawer';
3030
import Utils from '../../Utils';
3131
import { downloadJsonResponse, downloadPythonResponse } from './utils';
@@ -179,6 +179,10 @@ export default (store) => (next) => (action) => {
179179
// next(GeppettoActions.waitData('Loading the NetPyNE Model', GeppettoActions.clientActions.MODEL_LOADED));
180180
// next(action);
181181
// break;
182+
case OPEN_BACKEND_ERROR_DIALOG:
183+
next(GeppettoActions.setWidgets(store.getState().widgets));
184+
next(action);
185+
break;
182186
case GeppettoActions.clientActions.MODEL_LOADED:
183187
if (store.getState()?.general?.modelState === Constants.MODEL_STATE.NOT_INSTANTIATED) {
184188
const networkPath = window.Instances.getInstance('network');

0 commit comments

Comments
 (0)