aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html23
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js33
2 files changed, 32 insertions, 24 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..9c2f8509 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
@@ -15,6 +15,7 @@
limitations under the License.
-->
+
<!DOCTYPE html>
<html lang="en">
<head>
@@ -28,19 +29,21 @@
<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>
<script type="text/javascript">
$(document).ready(function () {
- /* $('.modal-content').resizable({
-
- minHeight: 300,
- minWidth: 300
- });*/
+
$('.modal-dialog').draggable();
$("#detailCont").show();
var jsondata = loadGetServiceData();
+
+ $.each(jsondata,function(k,v){
+ jsondata[k].createTime= new Date(jsondata[key].createTime).toUTCString();
+ });
+
$('#sai').bootstrapTable({
//Assigning data to table
data: jsondata
@@ -68,8 +71,8 @@
//loadIframe("topoFrame", "chartTopo.html?serviceId="+row.serviceId);
document.getElementById("topoCont").setAttribute('data', 'chartTopo.html?serviceId='+row.serviceId);
- document.getElementById('inputcontent').setAttribute('data', 'inputData.html?json='+ JSON.stringify(row));
- document.getElementById('inputcontentDlg').setAttribute('data', 'inputData.html?json='+ JSON.stringify(row));
+ document.getElementById('inputcontent').setAttribute('data', 'InputData.html?json='+ JSON.stringify(row));
+ document.getElementById('inputcontentDlg').setAttribute('data', 'InputData.html?json='+ JSON.stringify(row));
});
new lcmHandler();
});
@@ -358,11 +361,11 @@
</iframe>-->
</div>
<div id="inpContMod" style="display:none;">
- <object id="inputcontentDlg" data="inputData.html" width="100%" height="300"
+ <object id="inputcontentDlg" data="InputData.html" width="100%" height="300"
type="text/html">
</object>
- <!--<iframe src="inputData.html" name="" style="width:100%" allowTransparency="true" scrolling="no" frameborder="0">
+ <!--<iframe src="InputData.html" name="" style="width:100%" allowTransparency="true" scrolling="no" frameborder="0">
</iframe>
</iframe>-->
</div>
@@ -431,7 +434,7 @@
</object>
</div>
<div id="inpCont" style="display:none;">
- <object id="inputcontent" src="inputData.html" width="100%" height="300" type="text/html">
+ <object id="inputcontent" src="InputData.html" width="100%" height="300" type="text/html">
</object>
</div>
</div>
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) {