File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ qx.Class.define("osparc.data.model.Node", {
136136 outputs : {
137137 check : "Object" ,
138138 nullable : false ,
139- event : "changeOutputs"
139+ event : "changeOutputs" ,
140+ apply : "__applyOutputs" ,
140141 } ,
141142
142143 status : {
@@ -166,6 +167,12 @@ qx.Class.define("osparc.data.model.Node", {
166167 apply : "__applyPropsForm"
167168 } ,
168169
170+ outputsForm : {
171+ check : "osparc.widget.NodeOutputs" ,
172+ init : null ,
173+ nullable : true
174+ } ,
175+
169176 marker : {
170177 check : "qx.core.Object" ,
171178 init : null ,
@@ -612,6 +619,13 @@ qx.Class.define("osparc.data.model.Node", {
612619 } , this ) ;
613620 } ,
614621
622+ __applyOutputs : function ( ) {
623+ if ( ! this . isPropertyInitialized ( "outputsForm" ) || ! this . getOutputsForm ( ) ) {
624+ const nodeOutputs = new osparc . widget . NodeOutputs ( this , this . getMetaData ( ) . outputs ) ;
625+ this . setOutputsForm ( nodeOutputs ) ;
626+ }
627+ } ,
628+
615629 removeNodePortConnections : function ( inputNodeId ) {
616630 let inputs = this . __getInputData ( ) ;
617631 for ( const portId in inputs ) {
Original file line number Diff line number Diff line change @@ -1032,11 +1032,12 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
10321032
10331033 // OUTPUTS
10341034 const outputsBox = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( spacing ) ) ;
1035- if ( node . hasOutputs ( ) ) {
1036- const nodeOutputs = new osparc . widget . NodeOutputs ( node , node . getMetaData ( ) . outputs ) . set ( {
1035+ const outputsForm = node . getOutputsForm ( ) ;
1036+ if ( node . hasOutputs ( ) && outputsForm ) {
1037+ outputsForm . set ( {
10371038 offerProbes : true
10381039 } ) ;
1039- outputsBox . add ( nodeOutputs ) ;
1040+ outputsBox . add ( outputsForm ) ;
10401041 }
10411042
10421043 const nodeFilesBtn = new qx . ui . form . Button ( this . tr ( "Service data" ) , "@FontAwesome5Solid/folder-open/14" ) . set ( {
Original file line number Diff line number Diff line change @@ -92,9 +92,12 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
9292 _addOutputs : function ( ) {
9393 this . _outputsLayout . removeAll ( ) ;
9494
95- const nodeOutputs = new osparc . widget . NodeOutputs ( this . getNode ( ) , this . getNode ( ) . getMetaData ( ) . outputs ) ;
96- this . _mainView . bind ( "backgroundColor" , nodeOutputs , "backgroundColor" ) ;
97- this . _outputsLayout . add ( nodeOutputs ) ;
95+ const node = this . getNode ( ) ;
96+ const outputsForm = node . getOutputsForm ( ) ;
97+ if ( node . hasOutputs ( ) && outputsForm ) {
98+ this . _mainView . bind ( "backgroundColor" , outputsForm , "backgroundColor" ) ;
99+ this . _outputsLayout . add ( outputsForm ) ;
100+ }
98101
99102 this . _outputsBtn . set ( {
100103 value : false ,
You can’t perform that action at this time.
0 commit comments