aboutsummaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-extsys/src/main
diff options
context:
space:
mode:
authoryuhao10 <yuhao10@huawei.com>2016-10-31 21:19:00 +0800
committeryuhao10 <yuhao10@huawei.com>2016-10-31 21:19:00 +0800
commit71c614aba26915202140d71a962621cab7029ccf (patch)
tree3616ccb14ae07a5403574649d35b2404aac24de6 /openo-portal/portal-extsys/src/main
parent81c3fd964071c0d1d4804ca07dbc2cc09c5b6b16 (diff)
fix controller can not delete bug
controller can not delete cause we use sdncontrollerid as uuid in brs model but we use id as index to delete controller in html SDNO-805 Change-Id: Ibdb69b1d10b24725a9847953ce3a2b838362c518 Signed-off-by: yuhao10 <yuhao10@huawei.com>
Diffstat (limited to 'openo-portal/portal-extsys/src/main')
-rw-r--r--openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html2
-rw-r--r--openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js6
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');
},