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"
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js
index 3b19d23..714d953 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js
@@ -83,6 +83,7 @@
setting.language = vm.$language;
setting.paginate = true;
setting.info = true;
+ setting.sort = true;
setting.columns = vm.$packageTableFields.table;
setting.restUrl = vm.$restUrl.queryPackageInfoUrl;
setting.tableId = vm.$tableId;
@@ -120,15 +121,13 @@
vm.packageDetail.detailData[index].isActive = true;
},
$initPackageDetailTable : function (csarId) {
- var data;
- for(var i=0; i<vm.resource.packageInfo.length; i++) {
- if (vm.resource.packageInfo[i].csarId == csarId) {
- data = vm.resource.packageInfo[i];
- break;
+ var url=vm.$restUrl.queryPackageInfoUrl + "/" + csarId;
+ commonUtil.get(url,null,function(resp) {
+ if (resp) {
+ vm.resource.packageDetails=resp;
}
- }
- vm.resource.packageDetails = data;
- vm.resource.relationInfo = [];
+ })
+
},
$isRowDeletingStatus : function(name) {
var table = $("#" + vm.$tableId).dataTable();
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js
index d69be0a..80067ab 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js
@@ -110,8 +110,13 @@
}
refreshByCond();
},
- error : function() {
- commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
+ error : function(resp) {
+ if(resp != "" && resp.responseText == "success") {
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoarded"), "success");
+ refreshByCond();
+ } else {
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
+ }
}
});
}
@@ -132,7 +137,7 @@
}
refreshByCond();
},
- error : function() {
+ error : function(resp) {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
}
});
@@ -151,7 +156,7 @@
}
refreshByCond();
},
- error : function() {
+ error : function(resp) {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
}
});
@@ -182,7 +187,7 @@
pmUtil.nameRender = function(obj) {
return '<a href="#" onclick="vm.packageDetail.$showDetails('
- + '\'block\',\'' + obj.aData.id + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
+ + '\'block\',\'' + obj.aData.csarId + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
}
pmUtil.onBoardRender = function(obj) {
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
index 2c0561e..47bd9a5 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
@@ -388,7 +388,7 @@
nodeTemplate.currentLinkNum = 0;
var relationShips = data.relationShips || []; //some nodes may not have relationships
$.each(relationShips, function(index, obj){
- if (obj.sourceNodeId == data.id) {
+ if (obj.sourceNodeId == data.name) {
switch(obj.type) {
case "containedIn" :
case "tosca.relationships.nfv.ContainedIn" :
@@ -414,7 +414,7 @@
break;
}
}
- if (obj.targetNodeId == data.id) {
+ if (obj.targetNodeId == data.name) {
switch(obj.type) {
case "connectedTo" :
case "tosca.relationships.nfv.ConnectsTo" :
diff --git a/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties b/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties
index bb94f53..0e39ee7 100644
--- a/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties
+++ b/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties
@@ -37,4 +37,4 @@
openo_menu_manage_view=Manage View
openo_menu_manage_view_vim_manage=VIM Manage
openo_menu_manage_view_vnfm=VNFM
-
+openo_menu_manage_view_sdn_controller=SDN Controller
diff --git a/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
index 0f9cc3d..859c69b 100644
--- a/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
+++ b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
@@ -1,96 +1,102 @@
{
- "parentMenus":[
- {
- "id":"openo_menu_service",
- "url":"",
- "iconClass":"fa fa-comments"
- },
- {
- "id":"openo_menu_resource_mgr",
- "url":"",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "id":"openo_menu_user",
- "url":"",
- "iconClass":"fa fa-puzzle-piece"
- },
- {
- "id":"openo_menu_orchestrator",
- "url":"",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "id":"openo_menu_manage_view",
- "url":"",
- "iconClass":"fa fa-coffee"
- },
- {
- "id":"openo_menu_performance",
- "url":"",
- "iconClass":"fa fa-bar-chart"
- }
- ],
- "childMenus":[
- {
- "parentId":"openo_menu_service",
- "id":"openo_menu_service_service_management",
- "url":"../lifecyclemgr/gsolcmmain.html",
- "iconClass":"fa fa-comments"
- },
+ "parentMenus":[
+ {
+ "id":"openo_menu_service",
+ "url":"",
+ "iconClass":"fa fa-comments"
+ },
+ {
+ "id":"openo_menu_resource_mgr",
+ "url":"",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "id":"openo_menu_user",
+ "url":"",
+ "iconClass":"fa fa-puzzle-piece"
+ },
+ {
+ "id":"openo_menu_orchestrator",
+ "url":"",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "id":"openo_menu_manage_view",
+ "url":"",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "id":"openo_menu_performance",
+ "url":"",
+ "iconClass":"fa fa-bar-chart"
+ }
+ ],
+ "childMenus":[
+ {
+ "parentId":"openo_menu_service",
+ "id":"openo_menu_service_service_management",
+ "url":"../lifecyclemgr/gsolcmmain.html",
+ "iconClass":"fa fa-comments"
+ },
{
"parentId":"openo_menu_resource_mgr",
- "id":"openo_menu_resource_mgr",
+ "id":"openo_menu_resource_mgr_sdno",
"url":"../resmgr-sdn/resource.html",
"iconClass":"fa fa-folder-open-o"
},
{
- "parentId":"openo_menu_user",
- "id":"openo_menu_user_user_management",
- "url":"../user/user.html",
- "iconClass":"fa fa-puzzle-piece"
- },
- {
- "parentId":"openo_menu_orchestrator",
- "id":"openo_menu_orchestrator_model_design",
- "url":"/winery/servicetemplates.html",
+ "parentId":"openo_menu_resource_mgr",
+ "id":"openo_menu_resource_mgr_nfvo",
+ "url":"../resmgr-nfv/resource.html",
"iconClass":"fa fa-folder-open-o"
},
- {
- "parentId":"openo_menu_orchestrator",
- "id":"openo_menu_orchestrator_package",
- "url":"../catalog/csarPackage.html",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "parentId":"openo_menu_orchestrator",
- "id":"openo_menu_orchestrator_service_template",
- "url":"../catalog/template.html",
- "iconClass":"fa fa-list-alt"
- },
- {
- "parentId":"openo_menu_manage_view",
- "id":"openo_menu_manage_view_vim_manage",
- "url":"../extsys/vim/vimView.html",
- "iconClass":"fa fa-coffee"
- },
- {
- "parentId":"openo_menu_manage_view",
- "id":"openo_menu_manage_view_vnfm",
- "url":"../extsys/vnfm/vnfmView.html",
- "iconClass":"fa fa-coffee"
- },
- {
- "parentId":"openo_menu_performance",
- "id":"openo_menu_performance_performance_query",
- "url":"../performance/performance_view.html",
- "iconClass":"fa fa-bar-chart"
- },
- {
- "parentId":"openo_menu_performance",
- "id":"openo_menu_alarm_alarm_query",
- "url":"../performance/alarm_view.html",
- "iconClass":"fa fa-bell"
- }
- ]
+ {
+ "parentId":"openo_menu_user",
+ "id":"openo_menu_user_user_management",
+ "url":"../user/user.html",
+ "iconClass":"fa fa-puzzle-piece"
+ },
+ {
+ "parentId":"openo_menu_orchestrator",
+ "id":"openo_menu_orchestrator_package",
+ "url":"../catalog/csarPackage.html",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "parentId":"openo_menu_orchestrator",
+ "id":"openo_menu_orchestrator_service_template",
+ "url":"../catalog/template.html",
+ "iconClass":"fa fa-list-alt"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_vim_manage",
+ "url":"../extsys/vim/vimView.html",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_vnfm",
+ "url":"../extsys/vnfm/vnfmView.html",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_sdn_controller",
+ "url":"../extsys/sdncontroller/controller.html",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "parentId":"openo_menu_performance",
+ "id":"openo_menu_performance_performance_query",
+ "url":"../performance/performance_view.html",
+ "iconClass":"fa fa-bar-chart"
+ },
+ {
+ "parentId":"openo_menu_performance",
+ "id":"openo_menu_alarm_alarm_query",
+ "url":"../performance/alarm_view.html",
+ "iconClass":"fa fa-bell"
+ }
+ ]
}
\ No newline at end of file
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html
index 917cff1..b5a2d98 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html
@@ -40,7 +40,25 @@
if (jsonData != null) {
$("body").empty();
for(var key in jsonData.inputParameters){
- $("body").append('<div class="mT15 form-group row" style="margin-top:35px;margin-left:25%"><div class="col-sm-6" align="right"><label class="control-label"><span style="font-size:16px;">'+ key + ':</span></label></div><div class="col-sm-6"><input type="text" name="" maxlength="256" style="margin-left:10px;width:250px;" data-toggle="tooltip" data-placement="top" title="'+ jsonData.inputParameters[key] + '" value="'+ jsonData.inputParameters[key] + '" readonly disabled/></div></div>');
+ var name = key;
+ if(name.includes('.'))
+ {
+ name = key.substring(key.lastIndexOf('.')+1,key.length);
+ }
+ var paramValue = jsonData.inputParameters[key];
+ if(name.indexOf('location') != -1) {
+ var vimObj = getVimNameById(paramValue);
+ if(vimObj != undefined){
+ paramValue = vimObj.name;
+ }
+ }
+ else if(name.indexOf('sdncontroller') != -1){
+ var sdnControllerObj = getSdnControllerNameById(paramValue);
+ if(sdnControllerObj != undefined){
+ paramValue = sdnControllerObj.name;
+ }
+ }
+ $("body").append('<div class="mT15 form-group row" style="margin-top:35px;margin-left:25%"><div class="col-sm-6" align="right"><label class="control-label"><span style="font-size:16px;">'+ name + ':</span></label></div><div class="col-sm-6"><input type="text" name="" maxlength="256" style="margin-left:10px;width:250px;" data-toggle="tooltip" data-placement="top" title="'+ paramValue + '" value="'+ paramValue + '" readonly disabled/></div></div>');
}
}
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 7fbc77d..ad3b597 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[k].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 deab7c9..eb66796 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
@@ -146,12 +146,14 @@
$.when(
fetchTemplateParameterDefinitions(templateId),
fetchGsoNestingTemplateParameters(templateId),
- fetchVimInfo()
+ fetchVimInfo(),
+ fetchSdnController()
).then(
- function (templateParameterResponse, nestingTempatesParas, vimInfoResponse) {
+ function (templateParameterResponse, nestingTempatesParas, vimInfoResponse, sdnControllersResponse) {
var inputParas = concat(templateParameterResponse[0].inputs, nestingTempatesParas);
var vims = translateToVimInfo(vimInfoResponse[0]);
- templateParameters = translateToTemplateParameters(inputParas, vims);
+ var sdnControllers = translateToSdnControllers(sdnControllersResponse[0]);
+ templateParameters = translateToTemplateParameters(inputParas, vims, sdnControllers);
defer.resolve(templateParameters);
}
);
@@ -205,7 +207,13 @@
description: nodeTemplate.name + ' Location',
required: 'true'
});
- }
+ inputs.push({
+ name: nodeTemplate.type + '.sdncontroller',
+ type: 'sdncontroller',
+ description: nodeTemplate.name + ' SDN Controller',
+ required: 'true'
+ });
+ }
nodeAggregatation.notify(inputs);
}
);
@@ -255,7 +263,7 @@
return result;
}
-function translateToTemplateParameters(inputs, vims) {
+function translateToTemplateParameters(inputs, vims, controllers) {
var inputParameters = [];
var i;
for (i = 0; i < inputs.length; i += 1) {
@@ -269,17 +277,19 @@
value: inputs[i].defaultValue || ''
};
}
- return {changed: false, parameters: inputParameters, vimInfos: vims};
+ return {changed: false, parameters: inputParameters, vimInfos: vims, sdnControllers: controllers};
}
function fetchNfvoTemplateInputParameters(templateId) {
var defer = $.Deferred();
$.when(
fetchTemplateParameterDefinitions(templateId),
- fetchVimInfo()
+ fetchVimInfo(),
+ fetchSdnController()
).then(
- function (templateParameterResponse, vimInfoResponse) {
+ function (templateParameterResponse, vimInfoResponse, sdnControllerResponse) {
var vims = translateToVimInfo(vimInfoResponse[0]);
+ var sdnControllers = translateToSdnControllers(sdnControllerResponse[0]);
var inputParas = templateParameterResponse[0].inputs;
inputParas.push({
name: 'location',
@@ -287,7 +297,13 @@
description: 'Location',
required: 'true'
});
- templateParameters = translateToTemplateParameters(inputParas, vims);
+ inputParas.push({
+ name: 'sdncontroller',
+ type: 'sdncontroller',
+ description: 'SDN Controller',
+ required: 'true'
+ });
+ templateParameters = translateToTemplateParameters(inputParas, vims, sdnControllers);
defer.resolve(templateParameters);
}
);
@@ -300,7 +316,7 @@
fetchTemplateParameterDefinitions(templateId)
).then(
function (templateParameterResponse) {
- templateParameters = translateToTemplateParameters(templateParameterResponse.inputs, []);
+ templateParameters = translateToTemplateParameters(templateParameterResponse.inputs, [], []);
defer.resolve(templateParameters);
}
);
@@ -323,30 +339,50 @@
});
}
+function fetchSdnController() {
+ var sdnControllerUri = '/openoapi/extsys/v1/sdncontrollers';
+ return $.ajax({
+ type: "GET",
+ url: sdnControllerUri
+ });
+}
+
function translateToVimInfo(vims) {
return vims.map(function (vim) {
return {
- vimId: vim.vimId,
- vimName: vim.name
+ optionId: vim.vimId,
+ optionName: vim.name
};
});
}
+function translateToSdnControllers(controllers) {
+ return controllers.map(function(controller) {
+ return {
+ optionId: controller.sdnControllerId,
+ optionName: controller.name
+ };
+ });
+}
+
function transformToComponents(templateParas) {
var inputs = templateParas.parameters;
var vimInfos = templateParas.vimInfos;
+ var sdnControllers = templateParas.sdnControllers;
var components = '';
inputs.forEach(function (inputPara) {
if(inputPara.type === 'location') {
- components = components + generateLocationComponent(inputPara, vimInfos);
- } else {
+ components = components + generateComboxComponent(inputPara, vimInfos);
+ } else if(inputPara.type === 'sdncontroller') {
+ components = components + generateComboxComponent(inputPara, sdnControllers);
+ } else {
components = components + generateComponent(inputPara);
}
});
return components;
}
-function generateLocationComponent(inputPara, vimInfos) {
+function generateComboxComponent(inputPara, items) {
var component = '<div class="form-group" style="margin-left:25px;margin-bottom:15px;">' +
'<label class="col-sm-3 control-label">' +
'<span>'+ inputPara.description +'</span>' +
@@ -354,17 +390,17 @@
'</label>' +
'<div class="col-sm-7">' +
'<select class="form-control" style ="padding-top: 0px;padding-bottom: 0px;"' +
- ' id="' + inputPara.id + '" name="vim_location">' +
- transformToOptions(vimInfos) +
+ ' id="' + inputPara.id + '" name="'+ inputPara.name +'">' +
+ transformToOptions(items) +
'</select></div></div>';
return component;
}
-function transformToOptions(vims) {
+function transformToOptions(items) {
var options = '<option value="select">--select--</option>';
var i;
- for (i = 0; i < vims.length; i += 1) {
- var option = '<option value="' + vims[i].vimId + '">' + vims[i].vimName + '</option>';
+ for (i = 0; i < items.length; i += 1) {
+ var option = '<option value="' + items[i].optionId + '">' + items[i].optionName + '</option>';
options = options + option;
}
return options;
@@ -502,21 +538,26 @@
}
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) {
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js
index 7590bdf..ddeabf7 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js
@@ -174,7 +174,7 @@
var parameter = {
'sort': [],
'pagination': 0,
- 'pagesize': 25,
+ 'pagesize': 10000,
'condition': {},
'serviceId': ""
};
@@ -220,6 +220,54 @@
return returnObj;
}
+//get the vim name by id.
+function getVimNameById(vimId){
+
+ // TODO re-confirm the latest url.
+ var requestUrl ="/openoapi/extsys/v1/vims/" + vimId;
+ var returnObj;
+ $
+ .ajax({
+ type : "GET",
+ async: false,
+ url : requestUrl,
+ contentType : "application/json",
+ success : function(jsonobj) {
+ // TODO return according to the json data received.
+ returnObj = jsonobj;
+ },
+ error : function(xhr, ajaxOptions, thrownError) {
+ alert("Error on getting link data : " + xhr.responseText);
+ }
+ });
+ return returnObj;
+}
+
+// get the sdn controller name by id.
+function getSdnControllerNameById(sdnControllerId){
+
+ // TODO re-confirm the latest url.
+ var requestUrl ="/openoapi/extsys/v1/sdncontrollers/" + sdnControllerId;
+ var returnObj;
+ $
+ .ajax({
+ type : "GET",
+ async: false,
+ url : requestUrl,
+ contentType : "application/json",
+ success : function(jsonobj) {
+ // TODO return according to the json data received.
+ returnObj = jsonobj;
+ },
+ error : function(xhr, ajaxOptions, thrownError) {
+ alert("Error on getting link data : " + xhr.responseText);
+ }
+ });
+ return returnObj;
+}
+
+
+
function anchorClick(serviceId){
var jsonData = loadServiceDetails(serviceId);
//TODO populate the modal according to json response