aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuji7 <lu.ji3@zte.com.cn>2016-10-31 14:23:42 +0800
committerLuji7 <lu.ji3@zte.com.cn>2016-10-31 14:23:42 +0800
commitfa82d0aead62f6bb78ab6c4de1bb5a3f8e4c239b (patch)
tree912c373bf9100168362723dc13b9cc9803af6568
parent4a683664b595dd3ad688f81c98f97122ad7f7606 (diff)
Fix Issue-Id: GSO-81
Change-Id: I33c400bb7f67568616fc5d797319a41798c68c75 Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html1
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js33
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 7fbc77d3..6f3023a2 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
@@ -28,6 +28,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 afc459c3..23f0a8d2 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) {