From ed112005d1b1fd69e96a902f7f08d9f9ddb143b1 Mon Sep 17 00:00:00 2001 From: thuva4 Date: Wed, 28 Feb 2018 23:38:58 +0530 Subject: Add resource name in scenario page confirm modal Add the name of the insatllers, versions, projects and customs in the delete confirm modal add tests Change-Id: I91e115f484726d98c357de844197189b22f66584 Signed-off-by: thuva4 --- .../opnfv_testapi/ui/shared/alerts/confirmModalFactory.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'testapi/opnfv_testapi/ui/shared/alerts/confirmModalFactory.js') diff --git a/testapi/opnfv_testapi/ui/shared/alerts/confirmModalFactory.js b/testapi/opnfv_testapi/ui/shared/alerts/confirmModalFactory.js index c115a3c..0286341 100644 --- a/testapi/opnfv_testapi/ui/shared/alerts/confirmModalFactory.js +++ b/testapi/opnfv_testapi/ui/shared/alerts/confirmModalFactory.js @@ -54,7 +54,7 @@ if (typeof ctrl.data.name === 'string') { ctrl.deleteObjects = ctrl.data.name } - else{ + else if (ctrl.data.name instanceof Array){ for(var index in ctrl.data.name){ if(index==0){ ctrl.deleteObjects += ctrl.data.name[index] @@ -65,6 +65,17 @@ } } + else{ + for(var index in ctrl.data.name[ctrl.data.resource]){ + if(index==0){ + ctrl.deleteObjects += ctrl.data.name[ctrl.data.resource][index] + } + else{ + ctrl.deleteObjects += ", "+ ctrl.data.name[ctrl.data.resource][index] + } + + } + } } /** * Initiate confirmation and call the success handler with the -- cgit 1.2.3-korg