@@ -65,7 +65,6 @@ function EditorPage({ selectedFile }) {
6565 const viewOptions = [
6666 { label : "Source View" , value : "source" } ,
6767 { label : "Graph View" , value : "graph" } ,
68- { label : "Configurator" , value : "configurator" } ,
6968 ] ;
7069
7170 function initializeWorker ( ) {
@@ -248,23 +247,28 @@ function EditorPage({ selectedFile }) {
248247 await validateModel ( ) ;
249248 }
250249 if ( validation . valid ) {
251- worker . postMessage ( {
252- action : "executeActionWithConf" ,
253- data : { action, configuration } ,
254- } ) ;
255- setIsRunning ( true ) ;
256- setOutput ( { label : action . label , result : "Executing operation" } ) ;
257- worker . onmessage = ( event ) => {
258- if ( event . data . results !== undefined ) {
259- setOutput ( event . data . results ) ;
260- } else if ( event . data . error ) {
261- setOutput ( {
262- label : action . label ,
263- result : `An exception has occurred when trying to execute the operation. Please check if the model is well defined.` ,
264- } ) ;
265- }
266- setIsRunning ( false ) ;
267- } ;
250+ if ( action . isOperationWithConf ) {
251+ worker . postMessage ( {
252+ action : "executeActionWithConf" ,
253+ data : { action, configuration } ,
254+ } ) ;
255+ setIsRunning ( true ) ;
256+ setOutput ( { label : action . label , result : "Executing operation" } ) ;
257+ worker . onmessage = ( event ) => {
258+ if ( event . data . results !== undefined ) {
259+ setOutput ( event . data . results ) ;
260+ } else if ( event . data . error ) {
261+ setOutput ( {
262+ label : action . label ,
263+ result : `An exception has occurred when trying to execute the operation. Please check if the model is well defined.` ,
264+ } ) ;
265+ }
266+ setIsRunning ( false ) ;
267+ } ;
268+
269+ } else {
270+ toggleView ( action )
271+ }
268272 } else {
269273 setOutput ( {
270274 label : action . label ,
0 commit comments