diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index b0a8f1259..e2d82ba82 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -26,7 +26,7 @@ $utopia->post('/v1/functions') ->param('vars', [], function () { return new Assoc();}, 'Key-value JSON object.', true) ->param('events', [], function () { return new ArrayList(new Text(256)); }, 'Events list.', true) ->param('schedule', '', function () { return new Cron(); }, 'Schedule CRON syntax.', true) - ->param('timeout', 15, function () { return new Range(0, 60); }, 'Function maximum execution time in seconds.', true) + ->param('timeout', 15, function () { return new Range(1, 900); }, 'Function maximum execution time in seconds.', true) ->action( function ($name, $vars, $events, $schedule, $timeout) use ($response, $projectDB) { $function = $projectDB->createDocument([ @@ -120,7 +120,7 @@ $utopia->put('/v1/functions/:functionId') ->param('vars', [], function () { return new Assoc();}, 'Key-value JSON object.', true) ->param('events', [], function () { return new ArrayList(new Text(256)); }, 'Events list.', true) ->param('schedule', '', function () { return new Cron(); }, 'Schedule CRON syntax.', true) - ->param('timeout', 15, function () { return new Range(0, 60); }, 'Function maximum execution time in seconds.', true) + ->param('timeout', 15, function () { return new Range(1, 900); }, 'Function maximum execution time in seconds.', true) ->action( function ($functionId, $name, $vars, $events, $schedule, $timeout) use ($response, $projectDB) { $function = $projectDB->getDocument($functionId); diff --git a/app/views/console/functions/function.phtml b/app/views/console/functions/function.phtml index 5b63b3d42..094a7c480 100644 --- a/app/views/console/functions/function.phtml +++ b/app/views/console/functions/function.phtml @@ -3,7 +3,6 @@ $events = array_keys($this->getParam('events', [])); ?> -
getParam('events', [])); data-service="functions.listTags" data-scope="sdk" data-event="load,functions.createTag,functions.deleteTag" - data-name="project-functions" + data-name="project-function-tags" data-param-project-id="{{router.params.project}}" data-success="trigger" - data-success-param-trigger-events="functions.list"> + data-success-param-trigger-events="functions.listTags"> -
+

No Tags Found

-

You haven't uploaded any tags for your function yet.

+

You haven't deployed any tags for your function yet.

-
+
-
    +
    • Set Default @@ -106,32 +105,14 @@ $events = array_keys($this->getParam('events', []));
- @@ -224,15 +205,9 @@ $events = array_keys($this->getParam('events', [])); - - + + +
Max value is 900 seconds (15 minutes)
@@ -258,7 +233,7 @@ $events = array_keys($this->getParam('events', []));
-
+
@@ -271,7 +246,7 @@ $events = array_keys($this->getParam('events', []));
-
+
diff --git a/public/dist/scripts/app-all.js b/public/dist/scripts/app-all.js index 34af6ccdb..38f5c0cad 100644 --- a/public/dist/scripts/app-all.js +++ b/public/dist/scripts/app-all.js @@ -2363,7 +2363,8 @@ object=object[path.shift()];} let shift=path.shift();if(value!==null&&value!==undefined&&object&&shift&&(object[shift]!==undefined||object[shift]!==null)){switch(type){case'append':if(!Array.isArray(object[shift])){object[shift]=[];} object[shift].push(value);break;case'prepend':if(!Array.isArray(object[shift])){object[shift]=[];} object[shift].unshift(value);break;case'splice':if(!Array.isArray(object[shift])){object[shift]=[];} -object[shift].splice(value,1);break;default:object[shift]=value;} +object[shift].splice(value,1);break;case'merge':if(!typeof object[shift]!=='object'){object[shift]={};} +console.log('object[shift]',object[shift]);console.log('object',object);console.log('shift',shift);console.log('value',value);console.log('result',{...object[shift],...value});object[shift]={...object[shift],...value};break;default:object[shift]=value;} return true;} if(!object){return null;} if(!shift){result=object;}else{return object[shift];} diff --git a/public/dist/scripts/app.js b/public/dist/scripts/app.js index 941ba5afb..21cd3e54a 100644 --- a/public/dist/scripts/app.js +++ b/public/dist/scripts/app.js @@ -22,7 +22,8 @@ object=object[path.shift()];} let shift=path.shift();if(value!==null&&value!==undefined&&object&&shift&&(object[shift]!==undefined||object[shift]!==null)){switch(type){case'append':if(!Array.isArray(object[shift])){object[shift]=[];} object[shift].push(value);break;case'prepend':if(!Array.isArray(object[shift])){object[shift]=[];} object[shift].unshift(value);break;case'splice':if(!Array.isArray(object[shift])){object[shift]=[];} -object[shift].splice(value,1);break;default:object[shift]=value;} +object[shift].splice(value,1);break;case'merge':if(!typeof object[shift]!=='object'){object[shift]={};} +console.log('object[shift]',object[shift]);console.log('object',object);console.log('shift',shift);console.log('value',value);console.log('result',{...object[shift],...value});object[shift]={...object[shift],...value};break;default:object[shift]=value;} return true;} if(!object){return null;} if(!shift){result=object;}else{return object[shift];}