diff options
author | jin xin <j00101220@huawei.com> | 2016-10-31 06:51:52 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@open-o.org> | 2016-10-31 06:51:52 +0000 |
commit | e9a90860f1b661cfc85020d6b85be5ff08852c7b (patch) | |
tree | a0bb551fc9f3596eaef7292aa7fc5675aa422e8c | |
parent | e873fa663c4d103b360d3fd9e796869325da1363 (diff) | |
parent | 6206d3ed32b19ecec46a80fe9d18afebff8199a3 (diff) |
Merge "Fix Issue-Id: GSO-81"
-rw-r--r-- | openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html | 1 | ||||
-rw-r--r-- | openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js | 33 |
2 files changed, 20 insertions, 14 deletions
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html index 8b5677ea..9c2f8509 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html @@ -29,6 +29,7 @@ <script type="text/javascript" src="js/rest.js"></script>
<script type="text/javascript" src="js/bootstrap-table.min.js"></script>
<script type="text/javascript" src="js/gsolcm.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootbox/bootbox.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.12.1.min.js"></script>
<link href="css/jquery-ui-1.12.1.min.css" rel="stylesheet" />
<script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js index c675ba47..eb667968 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js @@ -538,21 +538,26 @@ function formatDate(date) { } function deleteNe(rowId, row) { - var instanceId = row.serviceId; - var serviceType = row.serviceType; - var gatewayService = '/openoapi/servicegateway/v1/services/' + instanceId + '/terminate'; - var remove = function () { - $('#sai').bootstrapTable('remove', {field: 'serviceId', values: [instanceId]}); + var deleteHandle = function(result) { + if(result) { + var instanceId = row.serviceId; + var serviceType = row.serviceType; + var gatewayService = '/openoapi/servicegateway/v1/services/' + instanceId + '/terminate'; + var remove = function () { + $('#sai').bootstrapTable('remove', {field: 'serviceId', values: [instanceId]}); + }; + if(serviceType === 'GSO') { + deleteGsoServiceInstance(gatewayService, instanceId, remove); + } else if (serviceType === 'NFVO') { + var nfvoNsUri = '/openoapi/nslcm/v1/ns'; + deleteNonGsoServiceInstance(gatewayService, nfvoNsUri, instanceId, remove); + } else if (serviceType === 'SDNO') { + var sdnoNsUri = '/openoapi/sdnonslcm/v1/ns'; + deleteNonGsoServiceInstance(gatewayService, sdnoNsUri, instanceId, remove); + } + } }; - if(serviceType === 'GSO') { - deleteGsoServiceInstance(gatewayService, instanceId, remove) - } else if (serviceType === 'NFVO') { - var nfvoNsUri = '/openoapi/nslcm/v1/ns'; - deleteNonGsoServiceInstance(gatewayService, nfvoNsUri, instanceId, remove); - } else if (serviceType === 'SDNO') { - var sdnoNsUri = '/openoapi/sdnonslcm/v1/ns'; - deleteNonGsoServiceInstance(gatewayService, sdnoNsUri, instanceId, remove); - } + bootbox.confirm("Do you confirm to delete service?", deleteHandle); } function deleteGsoServiceInstance(gatewayService, instanceId, remove) { |