diff options
author | qin.liang(10184303) <qin.liang13@zte.com.cn> | 2017-08-24 10:25:52 +0800 |
---|---|---|
committer | qin.liang(10184303) <qin.liang13@zte.com.cn> | 2017-08-24 10:25:52 +0800 |
commit | b385ed38d9b2547d1825bac5da4d803e4ee902b2 (patch) | |
tree | 491105b158a200571b8b832813445f14eb663ace | |
parent | 8f6e16f7d9177f45d4df10d42f88366e2f033107 (diff) |
AAI-181 verification SDNC
Change-Id: I6605ec89dd24919d4b61a314e0ab523cb8ebe279
Issue-ID: AAI-181
Signed-off-by: qin.liang(10184303) <qin.liang13@zte.com.cn>
-rw-r--r-- | esr/src/main/webapp/extsys/sdncontroller/js/sdncController.js | 17 |
1 files changed, 16 insertions, 1 deletions
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; |