aboutsummaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js
diff options
context:
space:
mode:
authorLuji7 <lu.ji3@zte.com.cn>2016-11-04 10:25:10 +0800
committerLuji7 <lu.ji3@zte.com.cn>2016-11-04 10:25:10 +0800
commitcf298fc4149e52135d5a712b345ac206abfc88cb (patch)
tree41c9e479aff0fdd1f243e14e7a3b683d0e8720f0 /openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js
parent140ae02914dbe36648c0d4e4c85b670f558b66b5 (diff)
Issue ID: GSO-60 merge changes from sun release
Change-Id: I9949e242644711a07a8da7a22dfbaf19ee7d74bd Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
Diffstat (limited to 'openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js')
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/brs.js2
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js43
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.bootstrap-growl.min.js1
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js6
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js20
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js2
6 files changed, 42 insertions, 32 deletions
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/brs.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/brs.js
index 17648d34..3dbc7ebd 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/brs.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/brs.js
@@ -346,4 +346,4 @@ $(function () {
});
});
-}) \ No newline at end of file
+})
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 d5549ebb..498a86c0 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
@@ -118,11 +118,11 @@ function initParameterTab() {
).then(
function(template) {
if(template.serviceType === 'GSO') {
- return fetchGsoTemplateInputParameters(templateId);
+ return fetchGsoTemplateInputParameters(templateId, template);
} else if(template.serviceType === 'NFVO') {
- return fetchNfvoTemplateInputParameters(templateId);
+ return fetchNfvoTemplateInputParameters(templateId, template);
} else if(template.serviceType === 'SDNO') {
- return fetchSdnoTemplateInputParameters(templateId);
+ return fetchSdnoTemplateInputParameters(templateId, template);
}
}
).then(
@@ -148,6 +148,7 @@ function fetchServiceTemplateBy(templateId) {
template.name = response.templateName;
template.gsarId = response.csarId;
template.id = response.id;
+ template.nodeType = '';
return fetchCsar(template.gsarId);
}
).then(
@@ -174,7 +175,7 @@ function fetchCsar(csarId) {
});
}
-function fetchGsoTemplateInputParameters(templateId) {
+function fetchGsoTemplateInputParameters(templateId, template) {
var defer = $.Deferred();
$.when(
fetchTemplateParameterDefinitions(templateId),
@@ -185,6 +186,11 @@ function fetchGsoTemplateInputParameters(templateId) {
function (templateParameterResponse, nestingTempatesParas, vimInfoResponse, sdnControllersResponse) {
var inputs = templateParameterResponse[0].inputs.map(function(input) {
input.showName = input.name;
+ if(template.nodeType === null || template.nodeType === undefined || template.nodeType.length === 0) {
+ input.i18nKey = input.name;
+ } else {
+ input.i18nKey = template.nodeType + '.' +input.name;
+ }
return input;
});
var inputParas = concat(inputs, nestingTempatesParas);
@@ -232,6 +238,7 @@ function fetchGsoNestingTemplateParameters(templateId) {
var inputs = serviceTemplate.inputs.map(function(input) {
input.showName = input.name;
input.name = nodeTemplate.type + '.' + input.name;
+ input.i18nKey = nodeTemplate.type + '.' + input.name;
return input;
});
$.when(
@@ -244,14 +251,16 @@ function fetchGsoNestingTemplateParameters(templateId) {
type: 'location',
description: nodeTemplate.name + ' Location',
required: 'true',
- showName: nodeTemplate.name + ' Location'
+ showName: nodeTemplate.name + ' Location',
+ i18nKey: nodeTemplate.name + ' Location'
});
inputs.push({
name: nodeTemplate.type + '.sdncontroller',
type: 'sdncontroller',
description: nodeTemplate.name + ' SDN Controller',
required: 'true',
- showName: nodeTemplate.name + ' SDN Controller'
+ showName: nodeTemplate.name + ' SDN Controller',
+ i18nKey: nodeTemplate.name + ' SDN Controller'
});
}
nodeAggregatation.notify(inputs);
@@ -321,7 +330,7 @@ function translateToTemplateParameters(inputs, vims, controllers) {
return {changed: false, parameters: inputParameters, vimInfos: vims, sdnControllers: controllers};
}
-function fetchNfvoTemplateInputParameters(templateId) {
+function fetchNfvoTemplateInputParameters(templateId, template) {
var defer = $.Deferred();
$.when(
fetchTemplateParameterDefinitions(templateId),
@@ -334,6 +343,7 @@ function fetchNfvoTemplateInputParameters(templateId) {
var inputParas = templateParameterResponse[0].inputs;
inputParas = inputParas.map(function(input) {
input.showName = input.name;
+ input.i18nKey = template.nodeType + '.' + input.name;
return input;
});
inputParas.push({
@@ -341,14 +351,16 @@ function fetchNfvoTemplateInputParameters(templateId) {
type: 'location',
description: 'Location',
required: 'true',
- showName: 'Location'
+ showName: 'Location',
+ i18nKey: 'Location'
});
inputParas.push({
name: 'sdncontroller',
type: 'sdncontroller',
description: 'SDN Controller',
required: 'true',
- showName: 'SDN Controller'
+ showName: 'SDN Controller',
+ i18nKey: 'SDN Controller'
});
templateParameters = translateToTemplateParameters(inputParas, vims, sdnControllers);
defer.resolve(templateParameters);
@@ -357,7 +369,7 @@ function fetchNfvoTemplateInputParameters(templateId) {
return defer;
}
-function fetchSdnoTemplateInputParameters(templateId) {
+function fetchSdnoTemplateInputParameters(templateId, template) {
var defer = $.Deferred();
$.when(
fetchTemplateParameterDefinitions(templateId)
@@ -365,6 +377,7 @@ function fetchSdnoTemplateInputParameters(templateId) {
function (templateParameterResponse) {
var inputs = templateParameterResponse.inputs.map(function(input) {
input.showName = input.name;
+ input.i18nKey = template.nodeType + '.' + input.name;
return input;
})
templateParameters = translateToTemplateParameters(inputs, [], []);
@@ -520,7 +533,7 @@ function createGsoServiceInstance(gatewayService, serviceInstance, serviceTempla
serviceInstance.serviceId = response.serviceId;
var gsoServiceUri = '/openoapi/gso/v1/services/' + response.serviceId;
var timerDefer = $.Deferred();
- var timeout = 600000;
+ var timeout = 3600000;
var fun = function() {
if(timeout === 0) {
timerDefer.resolve({
@@ -620,7 +633,7 @@ function createServiceInstance(gatewayService, lcmUri, serviceInstance) {
var jobId = response.serviceId;
var jobStatusUri = lcmUri + '/jobs/' + jobId;
var timerDefer = $.Deferred();
- var timeout = 600000;
+ var timeout = 3600000;
var fun = function() {
if(timeout === 0) {
timerDefer.resolve({
@@ -715,7 +728,7 @@ function deleteNe(rowId, row) {
} else if (serviceType === 'NFVO') {
var nfvoLcmUri = '/openoapi/nslcm/v1';
deleteNonGsoServiceInstance(gatewayService, nfvoLcmUri, instanceId, remove, failFun);
- } else if (serviceType === 'SDNO' || serviceType === 'SSAR') {
+ } else if (serviceType === 'SDNO') {
var sdnoLcmUri = '/openoapi/sdnonslcm/v1';
deleteNonGsoServiceInstance(gatewayService, sdnoLcmUri, instanceId, remove, failFun);
}
@@ -732,7 +745,7 @@ function deleteGsoServiceInstance(gatewayService, instanceId, remove, failFun) {
function(response) {
var gsoServiceUri = '/openoapi/gso/v1/services/toposequence/' + instanceId;
var timerDefer = $.Deferred();
- var timeout = 600000;
+ var timeout = 3600000;
var fun = function() {
if(timeout === 0) {
timerDefer.resolve({
@@ -779,7 +792,7 @@ function deleteNonGsoServiceInstance(gatewayService, lcmUri, instanceId, remove,
var jobId = response.jobId;
var jobStatusUri = lcmUri + '/jobs/' + jobId;
var timerDefer = $.Deferred();
- var timeout = 600000;
+ var timeout = 3600000;
var fun = function() {
if(timeout === 0) {
timerDefer.resolve({
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.bootstrap-growl.min.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.bootstrap-growl.min.js
new file mode 100644
index 00000000..67837e50
--- /dev/null
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.bootstrap-growl.min.js
@@ -0,0 +1 @@
+(function(){var c;c=jQuery;c.bootstrapGrowl=function(f,a){var b,e,d;a=c.extend({},c.bootstrapGrowl.default_options,a);b=c("<div>");b.attr("class","bootstrap-growl alert");a.type&&b.addClass("alert-"+a.type);a.allow_dismiss&&(b.addClass("alert-dismissible"),b.append('<button class="close" data-dismiss="alert" type="button"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>'));b.append(f);a.top_offset&&(a.offset={from:"top",amount:a.top_offset});d=a.offset.amount;c(".bootstrap-growl").each(function(){return d= Math.max(d,parseInt(c(this).css(a.offset.from))+c(this).outerHeight()+a.stackup_spacing)});e={position:"body"===a.ele?"fixed":"absolute",margin:0,"z-index":"9999",display:"none"};e[a.offset.from]=d+"px";b.css(e);"auto"!==a.width&&b.css("width",a.width+"px");c(a.ele).append(b);switch(a.align){case "center":b.css({left:"50%","margin-left":"-"+b.outerWidth()/2+"px"});break;case "left":b.css("left","20px");break;default:b.css("right","20px")}b.fadeIn();0<a.delay&&b.delay(a.delay).fadeOut(function(){return c(this).alert("close")}); return b};c.bootstrapGrowl.default_options={ele:"body",type:"info",offset:{from:"top",amount:20},align:"right",width:250,delay:4E3,allow_dismiss:!0,stackup_spacing:10}}).call(this);
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js
index 1510d129..6f1235a6 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js
@@ -35,7 +35,7 @@ var vm = avalon.define({
}
},
$restUrl: {
- queryNodeInstanceUrl: "/openoapi/nslcm/v1/ns/"
+ queryNodeInstanceUrl: "/openoapi/nslcm/v1.0/ns/"
},
$init: function () {
vm.$initInstanceData();
@@ -147,7 +147,7 @@ var vm = avalon.define({
],
"aaData": tableData
});
- },
+ };
//nodes list table
nodesList :{
@@ -186,7 +186,7 @@ var initParam = function () {
var instanceId = params[0].substring(params[0].indexOf('=') + 1);
vm.instanceId = instanceId;
- vm.$restUrl.queryNodeInstanceUrl = vm.$restUrl.queryNodeInstanceUrl + instanceId;
+ vm.$restUrl.queryNodeInstanceUrl = commonUtil.format(vm.$restUrl.queryNodeInstanceUrl, instanceId);
vm.$init();
}
};
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js
index e52d0150..d7451a13 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js
@@ -20,23 +20,21 @@ $.getJSON("./conf/dataconfig.json", function (jsonData){
console.log("URL = " + JSON.stringify(url));
});
-function loadUnderlayData(serviceId) {
- var requestUrl = "/openoapi/sdnol3vpn/v1/l3vpns/" + serviceId;
- var returnObj;
+function loadUnderlayData() {
+ var requestUrl = "/openoapi/sdnol3vpn/v1/l3vpns";
$
.ajax({
type: "GET",
url: requestUrl,
- async: false,
contentType: "application/json",
success: function (jsonobj) {
- returnObj = jsonobj;
+ alert("loading underlay data");
+ //TODO: Update the table
},
error: function (xhr, ajaxOptions, thrownError) {
//alert("Error on getting underlay data : " + xhr.responseText);
}
});
- return returnObj;
}
function deleteUnderlayData(objectId) {
var requestUrl = "/openoapi/sdnol3vpn/v1/l3vpns/" + objectId;
@@ -54,23 +52,21 @@ function deleteUnderlayData(objectId) {
}
});
}
-function loadOverlayData(serviceId) {
- var requestUrl = "/openoapi/sdnooverlay/v1/site2dc-vpn/" + serviceId;
- var returnObj;
+function loadOverlayData() {
+ var requestUrl = "/openoapi/sdnooverlayvpn/v1/site2dc-vpn";
$
.ajax({
type: "GET",
url: requestUrl,
- async: false,
contentType: "application/json",
success: function (jsonobj) {
- returnObj = jsonobj;
+ alert("loading Overlay data...");
+ //TODO: Update the table
},
error: function (xhr, ajaxOptions, thrownError) {
//alert("Error on getting Overlayvpn data : " + xhr.responseText);
}
});
- return returnObj;
}
function refressTpDataTable(overlayTable, TpTable) {
alert("refesssing Tp data table");
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js
index a1656b9f..e309d3e6 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js
@@ -309,4 +309,4 @@ $(function () {
});
});
-}) \ No newline at end of file
+})