@@ -33,13 +33,14 @@ qx.Class.define("osparc.study.CreateFunction", {
3333 } ,
3434
3535 statics : {
36- isPotentialFunction : function ( workbench ) {
37- // in order to create a function , the pipeline needs:
38- // - at least one parameter AND one probe
39- // - for now, only float types are allowed
40- // - at least one computational service
41- // - no dynamic services
36+ CREATE_FUNCTION_TEXT : qx . locale . Manager . tr ( `
37+ In order to Create a Function , the pipeline needs:
38+ <br> - at least one parameter and one probe (numbers)
39+ <br>- at least one computational app
40+ <br>- no dynamic apps
41+ ` ) ,
4242
43+ isPotentialFunction : function ( workbench ) {
4344 // const filePickers = osparc.study.Utils.extractFilePickers(workbench);
4445 // const parameters = osparc.study.Utils.extractParameters(workbench);
4546 // const probes = osparc.study.Utils.extractProbes(workbench);
@@ -50,15 +51,15 @@ qx.Class.define("osparc.study.CreateFunction", {
5051 const computationals = osparc . study . Utils . extractComputationalServices ( workbench ) ;
5152 const dynamics = osparc . study . Utils . extractDynamicServices ( workbench ) ;
5253
53- return (
54+ return Boolean (
5455 ( parameters . length && probes . length ) &&
5556 computationals . length > 0 &&
5657 dynamics . length === 0
5758 ) ;
5859 } ,
5960
6061 checkExposedInputsOutputs : function ( exposedInputs , exposedOutputs ) {
61- return Object . values ( exposedInputs ) . some ( exposedInputValue => exposedInputValue ) && Object . values ( exposedOutputs ) . some ( exposedOutputValue => exposedOutputValue ) ;
62+ return Boolean ( Object . values ( exposedInputs ) . some ( exposedInputValue => exposedInputValue ) && Object . values ( exposedOutputs ) . some ( exposedOutputValue => exposedOutputValue ) ) ;
6263 } ,
6364 } ,
6465
0 commit comments