File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
services/static-webserver/client/source/class/osparc/data/model Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -27,18 +27,14 @@ qx.Class.define("osparc.data.model.NodeStatus", {
2727 this . base ( arguments ) ;
2828
2929 this . setNode ( node ) ;
30-
31- if ( node . isDynamic ( ) ) {
32- const progressSequence = new osparc . data . model . NodeProgressSequence ( ) ;
33- this . setProgressSequence ( progressSequence ) ;
34- }
3530 } ,
3631
3732 properties : {
3833 node : {
3934 check : "osparc.data.model.Node" ,
4035 init : null ,
41- nullable : false
36+ nullable : false ,
37+ apply : "__applyNode" ,
4238 } ,
4339
4440 progress : {
@@ -142,6 +138,21 @@ qx.Class.define("osparc.data.model.NodeStatus", {
142138 } ,
143139
144140 members : {
141+ __applyNode : function ( node ) {
142+ const addNodeProgressSequence = ( ) => {
143+ if ( node . isDynamic ( ) ) {
144+ const progressSequence = new osparc . data . model . NodeProgressSequence ( ) ;
145+ this . setProgressSequence ( progressSequence ) ;
146+ }
147+ } ;
148+
149+ if ( node . getMetadata ( ) ) {
150+ addNodeProgressSequence ( ) ;
151+ } else {
152+ node . addListenerOnce ( "changeMetadata" , ( ) => addNodeProgressSequence ( ) , this ) ;
153+ }
154+ } ,
155+
145156 __transformProgress : function ( value ) {
146157 const oldP = this . getProgress ( ) ;
147158 if ( this . getNode ( ) . isFilePicker ( ) && oldP === 100 && value !== 0 && value !== 100 ) {
You can’t perform that action at this time.
0 commit comments