From 46c625505ef01ea23c807e37237e3af5a9a23373 Mon Sep 17 00:00:00 2001 From: thuva4 Date: Fri, 23 Feb 2018 11:57:55 +0530 Subject: Add resource name in confirm modal Add resorce(Pod) name in delete confime modal in a line JIRA: RELENG-342 Change-Id: I629afc85bc7868fca19dce64c2c57eb195eaade7 Signed-off-by: thuva4 --- testapi/opnfv_testapi/ui/components/pods/podsController.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'testapi/opnfv_testapi/ui/components/pods') diff --git a/testapi/opnfv_testapi/ui/components/pods/podsController.js b/testapi/opnfv_testapi/ui/components/pods/podsController.js index 95e3571..38e084d 100644 --- a/testapi/opnfv_testapi/ui/components/pods/podsController.js +++ b/testapi/opnfv_testapi/ui/components/pods/podsController.js @@ -137,7 +137,6 @@ function batchDelete(){ var index; var checkedBox = []; - console.log(ctrl.checkBox) for(index in ctrl.checkBox){ if(!ctrl.showError){ if(ctrl.checkBox[index]){ @@ -153,7 +152,13 @@ * message */ function openBatchDeleteModal() { - confirmModal("Delete",ctrl.batchDelete); + var deleteObjects = [] + for(var index in ctrl.checkBox){ + if(ctrl.checkBox[index]){ + deleteObjects.push(ctrl.data.pods[index].name) + } + } + confirmModal("Delete", 'pods', ctrl.batchDelete, deleteObjects); } /** @@ -162,7 +167,7 @@ */ function openDeleteModal(name) { console.log(name) - confirmModal("Delete", ctrl.podDelete, name); + confirmModal("Delete", 'pod', ctrl.podDelete, name); } /** -- cgit 1.2.3-korg