Add resource name in testcase confirm modal 27/52727/1
authorthuva4 <tharma.thuva@gmail.com>
Tue, 27 Feb 2018 11:28:12 +0000 (16:58 +0530)
committerthuva4 <tharma.thuva@gmail.com>
Tue, 27 Feb 2018 11:28:12 +0000 (16:58 +0530)
Add the name of the testcases in the delete confirm
modal

Change-Id: I03815865aaedf590c99fdb3a887a4b8cf07652d9
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
testapi/opnfv_testapi/ui/components/projects/project/testCases/testCasesController.js

index 6d3c245..9a865d3 100644 (file)
          * message
          */
         function openBatchDeleteModal() {
-            confirmModal("Delete",ctrl.batchDelete);
+            var deleteObjects = []
+            ctrl.checkBox.forEach(function(testcase, index){
+                if(!ctrl.showError){
+                    if(testcase){
+                        deleteObjects.push(ctrl.data.testcases[index].name)
+                    }
+                }
+              });
+            confirmModal("Delete", 'testcases', ctrl.batchDelete, deleteObjects);
         }
 
         /**
          * message
          */
         function openDeleteTestModal(name) {
-            confirmModal("Delete", ctrl.deleteTestCase, name);
+            confirmModal("Delete",  'testcases', ctrl.deleteTestCase, name);
         }
 
         /**