File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,10 @@ qx.Class.define("osparc.data.Resources", {
303303 method : "POST" ,
304304 url : statics . API + "/projects/{studyId}/workspaces/{workspaceId}:move"
305305 } ,
306+ updateMetadata : {
307+ method : "PATCH" ,
308+ url : statics . API + "/projects/{studyId}/metadata"
309+ } ,
306310 }
307311 } ,
308312 "conversations" : {
Original file line number Diff line number Diff line change @@ -299,6 +299,7 @@ qx.Class.define("osparc.study.CreateFunction", {
299299 . then ( task => {
300300 task . addListener ( "resultReceived" , e => {
301301 const templateData = e . getData ( ) ;
302+ this . __updateTemplateMetadata ( templateData ) ;
302303 this . __registerFunction ( templateData , exposedInputs , exposedOutputs ) ;
303304 } ) ;
304305 } )
@@ -308,6 +309,20 @@ qx.Class.define("osparc.study.CreateFunction", {
308309 } ) ;
309310 } ,
310311
312+ __updateTemplateMetadata : function ( templateData ) {
313+ const patchData = {
314+ "hidden" : "Base template for function" ,
315+ } ;
316+ const params = {
317+ url : {
318+ "studyId" : templateData [ "uuid" ] ,
319+ } ,
320+ data : patchData
321+ } ;
322+ osparc . data . Resources . fetch ( "studies" , "updateMetadata" , params )
323+ . catch ( err => console . error ( err ) ) ;
324+ } ,
325+
311326 __registerFunction : function ( templateData , exposedInputs , exposedOutputs ) {
312327 const nameField = this . __form . getItem ( "name" ) ;
313328 const descriptionField = this . __form . getItem ( "description" ) ;
You can’t perform that action at this time.
0 commit comments