From 894f0cf2c525220050d5c171ddcb585b22be7c1a Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Sat, 2 Dec 2017 22:02:52 -0500 Subject: [PATCH] update current workflow copy implementation to be compatible with recent api changes --- .../src/templates/copy-template/template-copy.service.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/templates/copy-template/template-copy.service.js b/awx/ui/client/src/templates/copy-template/template-copy.service.js index d4ac1e8adf..e55e0d2da3 100644 --- a/awx/ui/client/src/templates/copy-template/template-copy.service.js +++ b/awx/ui/client/src/templates/copy-template/template-copy.service.js @@ -61,13 +61,16 @@ Rest.setUrl(url); return Rest.get(); }, - copyWorkflow: function(id) { + getWorkflowCopyName: function(baseName) { + return `${baseName}@${moment().format('h:mm:ss a')}`; + }, + copyWorkflow: function(id, name) { let url = GetBasePath('workflow_job_templates'); url = url + id + '/copy'; Rest.setUrl(url); - return Rest.post(); + return Rest.post({ name }); } }; }