summaryrefslogtreecommitdiffstats
path: root/openo-portal
diff options
context:
space:
mode:
authorjin xin <j00101220@huawei.com>2016-11-01 01:17:16 +0000
committerGerrit Code Review <gerrit@open-o.org>2016-11-01 01:17:16 +0000
commit790043e91ca321f7b78d5bed6f58410619680fb5 (patch)
treeecedb898fd40255527988b9a3a8ae092e453b25c /openo-portal
parent865fbe14f6d128bccb2c79f5d33e4119116604cd (diff)
parent71c614aba26915202140d71a962621cab7029ccf (diff)
Merge "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"
Diffstat (limited to 'openo-portal')
-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');
},