File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -587,21 +587,14 @@ qx.Class.define("osparc.data.model.Study", {
587587 if ( "disableServiceAutoStart" in this . getDev ( ) ) {
588588 return this . getDev ( ) [ "disableServiceAutoStart" ] ;
589589 }
590- return null ;
590+ return false ;
591591 } ,
592592
593593 openStudy : function ( ) {
594- const params = {
595- url : {
596- "studyId" : this . getUuid ( )
597- } ,
598- data : osparc . utils . Utils . getClientSessionID ( )
599- } ;
600- if ( this . getDisableServiceAutoStart ( ) !== null ) {
601- params [ "url" ] [ "disableServiceAutoStart" ] = this . getDisableServiceAutoStart ( ) ;
602- return osparc . data . Resources . fetch ( "studies" , "openDisableAutoStart" , params ) ;
594+ if ( this . getDisableServiceAutoStart ( ) ) {
595+ return osparc . store . Study . getInstance ( ) . openStudy ( this . getUuid ( ) , false ) ;
603596 }
604- return osparc . data . Resources . fetch ( "studies" , "open" , params ) ;
597+ return osparc . store . Study . getInstance ( ) . openStudy ( this . getUuid ( ) ) ;
605598 } ,
606599
607600 stopStudy : function ( ) {
Original file line number Diff line number Diff line change @@ -63,6 +63,20 @@ qx.Class.define("osparc.store.Study", {
6363 return osparc . data . Resources . fetch ( "studies" , "getOne" , params )
6464 } ,
6565
66+ openStudy : function ( studyId , autoStart = true ) {
67+ const params = {
68+ url : {
69+ studyId,
70+ } ,
71+ data : osparc . utils . Utils . getClientSessionID ( )
72+ } ;
73+ if ( autoStart ) {
74+ return osparc . data . Resources . fetch ( "studies" , "open" , params ) ;
75+ }
76+ params [ "url" ] [ "disableServiceAutoStart" ] = true ;
77+ return osparc . data . Resources . fetch ( "studies" , "openDisableAutoStart" , params ) ;
78+ } ,
79+
6680 createStudy : function ( studyData ) {
6781 const params = {
6882 data : studyData
You can’t perform that action at this time.
0 commit comments