diff options
author | Sunil Shetye | 2025-03-12 20:35:53 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-03-17 11:21:14 +0530 |
commit | baa85ee87da41b8a0f0c9744ce33470f2c65a0bf (patch) | |
tree | aba355364d659eac555144a51534ecbde912cddd | |
parent | 16440da786285062383df500cbbb8fc40628399e (diff) | |
download | Common-Interface-Project-baa85ee87da41b8a0f0c9744ce33470f2c65a0bf.tar.gz Common-Interface-Project-baa85ee87da41b8a0f0c9744ce33470f2c65a0bf.tar.bz2 Common-Interface-Project-baa85ee87da41b8a0f0c9744ce33470f2c65a0bf.zip |
add code for case
-rw-r--r-- | blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js | 7 | ||||
-rw-r--r-- | blocks/simulationAPI/helpers/config.py | 4 | ||||
-rw-r--r-- | blocks/simulationAPI/helpers/scilab_manager.py | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js index be73f061..e9323e00 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js @@ -632,9 +632,14 @@ export default function SimulationScreen ({ open, close }) { case 'FAILURE': case 'CANCELED': + if (timeoutRef.current !== null) { + clearTimeout(timeoutRef.current) + timeoutRef.current = null + } + break default: - console.log('Unhandled case:', res) + console.log('unhandled case', res) if (timeoutRef.current !== null) { clearTimeout(timeoutRef.current) timeoutRef.current = null diff --git a/blocks/simulationAPI/helpers/config.py b/blocks/simulationAPI/helpers/config.py index 372ba581..9bc8bce3 100644 --- a/blocks/simulationAPI/helpers/config.py +++ b/blocks/simulationAPI/helpers/config.py @@ -2,7 +2,6 @@ import os # The location to keep the session data on server. SESSIONDIR = '/tmp/sessiondir' -IMAGEDIR = 'images' SESSIONTIMEOUT = 21600 # the instances @@ -19,3 +18,6 @@ SYSTEM_COMMANDS = ( r'|newfun|execstr|ascii|mputl|dir\(\)' ) SPECIAL_CHARACTERS = r'["\'\\]' + +# The directory where images are created +IMAGEDIR = 'images' diff --git a/blocks/simulationAPI/helpers/scilab_manager.py b/blocks/simulationAPI/helpers/scilab_manager.py index 1ba43f58..8129a6db 100644 --- a/blocks/simulationAPI/helpers/scilab_manager.py +++ b/blocks/simulationAPI/helpers/scilab_manager.py @@ -30,6 +30,7 @@ IMAGEDIR = join(BASEDIR, config.IMAGEDIR) SESSIONDIR = abspath(config.SESSIONDIR) SYSTEM_COMMANDS = re.compile(config.SYSTEM_COMMANDS) +SPECIAL_CHARACTERS = re.compile(config.SPECIAL_CHARACTERS) # This is the path to the upload directory and values directory UPLOAD_FOLDER = 'uploads' # to store xcos file |