diff options
Diffstat (limited to 'openo-portal/portal-extsys/src/main')
-rw-r--r-- | openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html | 2 | ||||
-rw-r--r-- | openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html index 62bc2d9a..1d38c414 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html @@ -42,7 +42,7 @@ window.operateEvents = {
'click .siteDeleteImg': function (e, value, row, index) {
// TO DO ajex call for delete
- deleteController(row.id, row);
+ deleteController(row["sdnControllerId"]);
}
};
</script>
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js index df0fef51..b420c604 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js @@ -37,7 +37,7 @@ function deleteController(objectId) { contentType: "application/json",
success: function (jsonobj) {
$('#controller').bootstrapTable('remove', {
- field: 'id',
+ field: 'sdnControllerId',
values: [objectId]
});
alert("Delete Controller successfull !!!");
@@ -144,7 +144,6 @@ $(function () { $('#createController').click(function () {
var formData = JSON.stringify($("#controllerForm").serializeObject());
- var jsonobj = JSON.parse(formData);
var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "POST",
@@ -154,8 +153,7 @@ $(function () { data: formData,
success: function (jsonResp) {
alert("Controller saved successfully!!!");
- jsonobj["id"] = jsonResp.sdnControllerId;
- $('#controller').bootstrapTable("append", jsonobj);
+ $('#controller').bootstrapTable("append", jsonResp);
$('#vmAppDialog').removeClass('in').css('display', 'none');
},
|