diff options
author | yuhao10 <yuhao10@huawei.com> | 2016-10-31 21:19:00 +0800 |
---|---|---|
committer | Li Hua <uranus.lihua@huawei.com> | 2016-10-31 15:04:53 +0000 |
commit | 65a0462abaa783ff8dca0bbbb1479cd41bbdc1ff (patch) | |
tree | d9d77e33a076821b9c211c7a5fc395d56b6f985b /openo-portal | |
parent | 9aabb355e40fbbc1db8846118de2898fc22d359e (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')
-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');
},
|