File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
services/static-webserver/client/source/class/osparc/study Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ qx.Class.define("osparc.study.CreateFunction", {
5656 } ) ;
5757 form . add ( description , this . tr ( "Description" ) , null , "description" ) ;
5858
59- const createFunctionBtn = this . __createFunctionBtn = new qx . ui . form . FetchButton ( ) . set ( {
59+ const createFunctionBtn = this . __createFunctionBtn = new osparc . ui . form . FetchButton ( ) . set ( {
6060 appearance : "strong-button" ,
6161 label : this . tr ( "Create" ) ,
6262 allowGrowX : false ,
@@ -131,9 +131,14 @@ qx.Class.define("osparc.study.CreateFunction", {
131131 "input1" : 5
132132 } ,
133133 } ;
134- console . log ( "Creating function with data: " , functionData ) ;
135134
136- this . __createFunctionBtn . setFetching ( false ) ;
135+ const params = {
136+ data : functionData ,
137+ } ;
138+ osparc . data . Resources . fetch ( "functions" , "create" , params )
139+ . then ( ( ) => osparc . FlashMessenger . logAs ( this . tr ( "Function created" ) , "INFO" ) )
140+ . catch ( err => osparc . FlashMessenger . logError ( err ) )
141+ . finally ( ( ) => this . __createFunctionBtn . setFetching ( false ) ) ;
137142 } ,
138143
139144 getCreateFunctionButton : function ( ) {
You can’t perform that action at this time.
0 commit comments