@@ -98,44 +98,7 @@ qx.Class.define("osparc.study.CreateFunction", {
9898 column = 0 ;
9999 row ++ ;
100100
101- const filePickers = osparc . study . Utils . extractFilePickers ( this . __studyData [ "workbench" ] ) ;
102- filePickers . forEach ( filePicker => {
103- const fpLabel = new qx . ui . basic . Label ( filePicker [ "label" ] ) ;
104- inputsLayout . add ( fpLabel , {
105- row,
106- column,
107- } ) ;
108- column ++ ;
109-
110- const fpType = new qx . ui . basic . Label ( "FileID" ) ;
111- inputsLayout . add ( fpType , {
112- row,
113- column,
114- } ) ;
115- column ++ ;
116-
117- const fpExposed = new qx . ui . form . CheckBox ( ) . set ( { value : true } ) ;
118- inputsLayout . add ( fpExposed , {
119- row,
120- column,
121- } ) ;
122- exposedInputs [ filePicker [ "label" ] ] = true ;
123- fpExposed . addListener ( "changeValue" , e => exposedInputs [ filePicker [ "label" ] ] = e . getData ( ) ) ;
124- column ++ ;
125-
126- const outputValue = osparc . file . FilePicker . getOutput ( filePicker ) ;
127- const fpDefaultValue = new qx . ui . basic . Label ( outputValue && outputValue [ "path" ] ? outputValue [ "path" ] : "" ) ;
128- inputsLayout . add ( fpDefaultValue , {
129- row,
130- column,
131- } ) ;
132- column ++ ;
133-
134- column = 0 ;
135- row ++ ;
136- } ) ;
137-
138- const parameters = osparc . study . Utils . extractParameters ( this . __studyData [ "workbench" ] ) ;
101+ const parameters = osparc . study . Utils . extractFunctionableParameters ( this . __studyData [ "workbench" ] ) ;
139102 parameters . forEach ( parameter => {
140103 const parameterLabel = new qx . ui . basic . Label ( parameter [ "label" ] ) ;
141104 inputsLayout . add ( parameterLabel , {
@@ -208,7 +171,7 @@ qx.Class.define("osparc.study.CreateFunction", {
208171 column = 0 ;
209172 row ++ ;
210173
211- const probes = osparc . study . Utils . extractProbes ( this . __studyData [ "workbench" ] ) ;
174+ const probes = osparc . study . Utils . extractFunctionableProbes ( this . __studyData [ "workbench" ] ) ;
212175 probes . forEach ( probe => {
213176 const parameterLabel = new qx . ui . basic . Label ( probe [ "label" ] ) ;
214177 outputsLayout . add ( parameterLabel , {
@@ -305,19 +268,7 @@ qx.Class.define("osparc.study.CreateFunction", {
305268 "default_inputs" : { } ,
306269 } ;
307270
308- const filePickers = osparc . study . Utils . extractFilePickers ( templateData [ "workbench" ] ) ;
309- filePickers . forEach ( filePicker => {
310- const fpLabel = filePicker [ "label" ] ;
311- if ( exposedInputs [ fpLabel ] ) {
312- functionData [ "input_schema" ] [ "schema_dict" ] [ "properties" ] [ fpLabel ] = {
313- "type" : "FileID" ,
314- } ;
315- const outputValue = osparc . file . FilePicker . getOutput ( filePicker ) ;
316- functionData [ "default_inputs" ] [ fpLabel ] = outputValue && outputValue [ "path" ] ? outputValue [ "path" ] : null ;
317- }
318- } ) ;
319-
320- const parameters = osparc . study . Utils . extractParameters ( templateData [ "workbench" ] ) ;
271+ const parameters = osparc . study . Utils . extractFunctionableParameters ( templateData [ "workbench" ] ) ;
321272 parameters . forEach ( parameter => {
322273 const parameterLabel = parameter [ "label" ] ;
323274 if ( exposedInputs [ parameterLabel ] ) {
@@ -331,7 +282,7 @@ qx.Class.define("osparc.study.CreateFunction", {
331282 }
332283 } ) ;
333284
334- const probes = osparc . study . Utils . extractProbes ( templateData [ "workbench" ] ) ;
285+ const probes = osparc . study . Utils . extractFunctionableProbes ( templateData [ "workbench" ] ) ;
335286 probes . forEach ( probe => {
336287 const probeLabel = probe [ "label" ] ;
337288 if ( exposedOutputs [ probeLabel ] ) {
0 commit comments