summaryrefslogtreecommitdiffstats
path: root/esr
diff options
context:
space:
mode:
Diffstat (limited to 'esr')
-rw-r--r--esr/src/main/webapp/extsys/sdncontroller/js/sdncController.js17
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;