diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2018-02-28 01:53:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-28 01:53:57 +0000 |
commit | 30c27c5b753413f397a9123bfc45d44de2c3579b (patch) | |
tree | 5c2ddd07656fae9e6d83ccce0271486b6c11cb10 /testapi/opnfv_testapi/ui | |
parent | 1c7e9a05b0f868e9492200beb79fd999673db629 (diff) | |
parent | e09fdd880ab641026c744a9d8871d90cc692e620 (diff) |
Merge "Add resource name in scenario confirm modal"
Diffstat (limited to 'testapi/opnfv_testapi/ui')
-rw-r--r-- | testapi/opnfv_testapi/ui/components/scenarios/scenariosController.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/testapi/opnfv_testapi/ui/components/scenarios/scenariosController.js b/testapi/opnfv_testapi/ui/components/scenarios/scenariosController.js index fd137e5..dff9f26 100644 --- a/testapi/opnfv_testapi/ui/components/scenarios/scenariosController.js +++ b/testapi/opnfv_testapi/ui/components/scenarios/scenariosController.js @@ -65,7 +65,7 @@ } function openDeleteModal(name){ - confirmModal("Delete",ctrl.deleteScenario,name); + confirmModal("Delete", 'scenarios', ctrl.deleteScenario,name); } function deleteScenario(name){ @@ -82,15 +82,23 @@ } function openBatchDeleteModal(){ - confirmModal("Delete",ctrl.deleteBatchScenario); + var deleteObjects = [] + ctrl.checkBox.forEach(function(scenario, index){ + if(!ctrl.showError){ + if(scenario){ + deleteObjects.push(ctrl.data.scenarios[index].name); + } + } + }); + confirmModal("Delete", 'scenarios', ctrl.deleteBatchScenario, deleteObjects); } function deleteBatchScenario(){ var index; var checkedBox = []; - ctrl.checkBox.forEach(function(project, index){ + ctrl.checkBox.forEach(function(scenario, index){ if(!ctrl.showError){ - if(project){ + if(scenario){ deleteScenario(ctrl.data.scenarios[index].name); } } |