From b385ed38d9b2547d1825bac5da4d803e4ee902b2 Mon Sep 17 00:00:00 2001 From: "qin.liang(10184303)" Date: Thu, 24 Aug 2017 10:25:52 +0800 Subject: AAI-181 verification SDNC Change-Id: I6605ec89dd24919d4b61a314e0ab523cb8ebe279 Issue-ID: AAI-181 Signed-off-by: qin.liang(10184303) --- .../webapp/extsys/sdncontroller/js/sdncController.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'esr/src/main/webapp/extsys') diff --git a/esr/src/main/webapp/extsys/sdncontroller/js/sdncController.js b/esr/src/main/webapp/extsys/sdncontroller/js/sdncController.js index 1c9b7bd..ef663b0 100644 --- a/esr/src/main/webapp/extsys/sdncontroller/js/sdncController.js +++ b/esr/src/main/webapp/extsys/sdncontroller/js/sdncController.js @@ -127,7 +127,7 @@ var vm = avalon.define({ updateSDNC: function (index) { vm.saveType = "update"; vm.currentIndex = index; - vm.currentElement = vm.sdncList[index]; + vm.fillElement(vm.sdncList[vm.currentIndex], vm.currentElement) vm.$showTable(); }, validate: function () { @@ -204,6 +204,7 @@ var vm = avalon.define({ }, putSDNC: function () { console.log(vm.getSDNCSave()); + vm.fillElement(vm.currentElement, vm.sdncList[vm.currentIndex]); return true; /* $.ajax({ type: "PUT", @@ -243,6 +244,20 @@ var vm = avalon.define({ } });*/ }, + fillElement: function (sourceElement, targetElement) { + targetElement["sdnControllerId"] = sourceElement["sdnControllerId"]; + targetElement["name"] = sourceElement["name"]; + targetElement["status"] = sourceElement["status"]; + targetElement["url"] = sourceElement["url"]; + targetElement["userName"] = sourceElement["userName"]; + targetElement["password"] = sourceElement["password"]; + targetElement["version"] = sourceElement["version"]; + targetElement["vendor"] = sourceElement["vendor"]; + targetElement["description"] = sourceElement["description"]; + targetElement["protocol"] = sourceElement["protocol"]; + targetElement["productName"] = sourceElement["productName"]; + targetElement["type"] = sourceElement["type"]; + }, getSDNCSave: function () { var emsSave = $.extend(true, {}, vm.currentElement.$model); return emsSave; -- cgit 1.2.3-korg