diff options
Diffstat (limited to 'openo-portal')
22 files changed, 800 insertions, 139 deletions
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/TopoAccor.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/TopoAccor.html new file mode 100644 index 00000000..4b4ae9ef --- /dev/null +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/TopoAccor.html @@ -0,0 +1,143 @@ +<!DOCTYPE html>
+<html>
+<head>
+ <link href="css/bootstrap.min.css" rel="stylesheet" />
+
+ <link href="css/bootstrap-table.min.css" rel="stylesheet" />
+
+ <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
+ <script type="text/javascript" src="js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="js/rest.js"></script>
+ <script type="text/javascript" src="js/bootstrap-table.min.js"></script>
+ <script>
+ $(document).ready(function () {
+ var serviceId = getQueryStringValue("serviceId");
+ console.log("TOPOAccor - serviceId : " + serviceId);
+
+ $("#topoContObj").attr('data', 'chartTopo.html?serviceId='+serviceId);
+ $("#nfvotopoContObj").attr('data', 'lcm_detail_nfvo_topology.html?serviceId='+serviceId);
+ });
+
+ function getQueryStringValue (key) {
+ var params = new URLSearchParams(window.location.search.slice(1));
+ return params.get(key);
+ }
+ </script>
+ <meta charset="utf-8">
+ <title>JS Bin</title>
+ <style>
+
+.panel-group .panel-heading + .panel-collapse > .panel-body {
+ border: 1px solid #ddd;
+}
+.panel-group,
+.panel-group .panel,
+.panel-group .panel-heading,
+.panel-group .panel-heading a,
+.panel-group .panel-title,
+.panel-group .panel-title a,
+.panel-group .panel-body,
+.panel-group .panel-group .panel-heading + .panel-collapse > .panel-body {
+ border-radius: 2px;
+ border: 0;
+}
+.panel-group .panel-heading {
+ padding: 0;
+}
+.panel-group .panel-heading a {
+ display: block;
+ background: #428bca;
+ color: #ffffff;
+ padding: 15px;
+ text-decoration: none;
+ position: relative;
+}
+
+.panel-group .panel-heading a:hover {
+ border: 1px solid #4AC9FF;
+
+}
+
+
+.panel-group .panel-heading a.collapsed {
+ background: #eeeeee;
+ color: inherit;
+}
+.panel-group .panel-heading a:after {
+ content: '-';
+ position: absolute;
+ right: 20px;
+ top:5px;
+ font-size:30px;
+}
+.panel-group .panel-heading a.collapsed:after {
+ content: '+';
+}
+.panel-group .panel-collapse {
+ margin-top: 5px !important;
+}
+.panel-group .panel-body {
+ background: #ffffff;
+ padding: 15px;
+}
+.panel-group .panel {
+ background-color: transparent;
+}
+.panel-group .panel-body p:last-child,
+.panel-group .panel-body ul:last-child,
+.panel-group .panel-body ol:last-child {
+ margin-bottom: 0;
+}
+
+ </style>
+</head>
+<body>
+
+<div class="container" style="margin-top:10px;">
+
+ <div class="panel-group" id="accordion">
+
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
+ SDNO
+ </a>
+ </h4>
+ </div><!--/.panel-heading -->
+ <div id="collapseOne" class="panel-collapse collapse in">
+ <div class="panel-body">
+ <!--iframe src="chartTopo.html" name="" style="width:100%" allowTransparency="true" scrolling="no" frameborder="0">
+ </iframe>-->
+ <object id="topoContObj" data="chartTopo.html" width="100%" height="300" type="text/html">
+
+ </object>
+ </div><!--/.panel-body -->
+ </div><!--/.panel-collapse -->
+ </div><!-- /.panel -->
+
+
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
+ NFVO
+ </a>
+ </h4>
+ </div><!--/.panel-heading -->
+ <div id="collapseThree" class="panel-collapse collapse">
+ <div class="panel-body">
+ <object id="nfvotopoContObj" data="lcm_detail_nfvo_topology.html" width="100%" height="300" type="text/html">
+
+ </object>
+ </div><!--/.panel-body -->
+ </div><!--/.panel-collapse -->
+ </div><!-- /.panel -->
+ </div><!-- /.panel-group -->
+
+</div><!-- /.container -->
+
+
+
+</body>
+</html>
\ No newline at end of file diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html index d23807f4..d3df215a 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html @@ -54,6 +54,11 @@ }
}
+
+ $("#overlayContObj").attr('data', 'overlayvpn.html?serviceId='+serviceId);
+ $("#underlayContObj").attr('data', 'underlayvpn.html?serviceId='+serviceId);
+
+ $("#nfvoContObj").attr('data', 'lcm_detail_nfvo_nodesinfo.html?serviceId='+serviceId);
});
function fnOver() {
@@ -81,6 +86,7 @@ el.classList.add('selected');
switch (panelType) {
case "sdno":
+ $("#nfvo_dashboard").hide();
if(el.id == "overLink") {
$("#dashboard").show();
$("#overDiv").show();
@@ -97,11 +103,13 @@ break;
case "gso":
$("#dashboard").hide();
+ $("#nfvo_dashboard").hide();
$("#overDiv").hide();
$("#underDiv").hide();
break;
case "nfvo":
$("#dashboard").hide();
+ $("#nfvo_dashboard").show();
$("#overDiv").hide();
$("#underDiv").hide();
break;
@@ -138,7 +146,7 @@ content += '<li onClick="fnLoadTblData(this, \''+type+'\');" id="linkgso" class="list-group-item"><span class="glyphicon glyphicon-pencil text-primary"></span><span>OPEN-O</span></li>';
}
else if(type == "nfvo"){
- content += '<li onClick="fnLoadTblData(this, \''+type+'\');" id="linknfvo" class="list-group-item"><span class="glyphicon glyphicon-pencil text-primary"></span><span>ZTE</span></li>';
+ //content += '<li onClick="fnLoadTblData(this, \''+type+'\');" id="linknfvo" class="list-group-item"><span class="glyphicon glyphicon-pencil text-primary"></span><span>ZTE</span></li>';
}
content += '</ul></div></div>';
return content;
@@ -268,22 +276,42 @@ </div>
</div>
- <div class="col-sm-3" id="dashboard" style="width:82%; padding: 0;">
- <div class="panel panel-default">
+ <div class="col-sm-3" style="width:82%; padding: 0;">
+ <div id="dashboard" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">SDNO-VPN Manager</h3>
</div>
<div class="panel-body" style="height: 250px; overflow: auto; padding: 0; background-color: #fafafa">
<div id="overDiv">
- <iframe src="overlayvpn.html" style="width:100%;height:450px;" name="targetframe"
+ <!--<iframe src="overlayvpn.html" style="width:100%;height:450px;" name="targetframe"
allowTransparency="true" scrolling="no" frameborder="0">
- </iframe>
+ </iframe>-->
+ <object id="overlayContObj" data="overlayvpn.html" width="100%" height="450px" type="text/html">
+
+ </object>
</div>
<div id="underDiv">
- <iframe src="underlayvpn.html" style="width:100%;height:500px;" name="targetframe"
+ <!--<iframe src="underlayvpn.html" style="width:100%;height:500px;" name="targetframe"
allowTransparency="true" scrolling="no" frameborder="0">
- </iframe>
+ </iframe>-->
+ <object id="underlayContObj" data="underlayvpn.html" width="100%" height="450px" type="text/html">
+
+ </object>
+ </div>
+ </div>
+ </br>
+ </div>
+
+ <div id="nfvo_dashboard" class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">NFVO</h3>
+ </div>
+ <div class="panel-body" style="height: 250px; overflow: auto; padding: 0; background-color: #fafafa">
+ <div id="nodesInfo">
+ <object id="nfvoContObj" data="lcm_detail_nfvo_nodesinfo.html" width="100%" height="450px" type="text/html">
+
+ </object>
</div>
</div>
</br>
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/chartTopo.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/chartTopo.html index 53fa5709..ab0d71f3 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/chartTopo.html +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/chartTopo.html @@ -96,27 +96,7 @@ var serviceId = getQueryStringValue("serviceId");
console.log("TOPO - serviceId : "+ serviceId);
- var jsonData = loadServiceDetails(serviceId);
- console.log("jsonData length: "+jsonData.length);
- for(i = 0; i < jsonData.length; i++) {
- console.log("jsonData Name: "+jsonData[i].name);
- if(jsonData[i].name == "sdno") {
- //$("#sdnoLink").text(jsonData[i].name.toUpperCase());
- console.log("Adding Accordian to SDNO");
- $("#accordion").append(addAccordionData("sdno", jsonData[i].name.toUpperCase()));
- }
- else if(jsonData[i].name == "gso") {
- console.log("Adding Accordian to GSO");
- $("#accordion").append(addAccordionData("gso", jsonData[i].name.toUpperCase()));
- }
- else if(jsonData[i].name == "nfvo") {
- console.log("Adding Accordian to NFVO");
- $("#accordion").append(addAccordionData("nfvo", jsonData[i].name.toUpperCase()));
- }
- else {
-
- }
- }
+
$('#container').highcharts({
chart: {
@@ -149,7 +129,7 @@ ren.path(rightArrow)
.attr({
'stroke-width': 1,
- stroke: colors[3]
+ stroke: colors[1]
})
.translate(95, 95)
.add();
@@ -211,7 +191,7 @@ ren.path(rightArrow)
.attr({
'stroke-width': 1,
- stroke: colors[3]
+ stroke: colors[1]
})
.translate(300, 95)
.add();
@@ -219,7 +199,7 @@ ren.path(rightArrow)
.attr({
'stroke-width': 1,
- stroke: colors[3]
+ stroke: colors[1]
})
.translate(500, 95)
.add();
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 ad3b5977..a474be8a 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html @@ -30,11 +30,13 @@ <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.isloading.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 () {
+ new lcmHandler();
$('.modal-dialog').draggable();
$("#detailCont").show();
@@ -70,11 +72,11 @@ document.getElementById("tabContainer").style.display = "block";
//loadIframe("topoFrame", "chartTopo.html?serviceId="+row.serviceId);
- document.getElementById("topoCont").setAttribute('data', 'chartTopo.html?serviceId='+row.serviceId);
+ document.getElementById("topoContObj").setAttribute('data', 'TopoAccor.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));
});
- new lcmHandler();
+
});
function operateFormatter(value, row, index) {
@@ -213,6 +215,30 @@ .clearfix {
display: none;
}
+ .isloading-wrapper.isloading-right{
+ margin-left:10px;
+ }
+ .isloading-overlay{
+ position:relative;
+ text-align:center;
+ }
+ .isloading-overlay .isloading-wrapper{
+ background: url("images/loading.gif") 90% 50% no-repeat #FFFFFF;
+ padding:15px 30px;
+ -webkit-border-radius:7px;
+ -webkit-background-clip:padding-box;
+ -moz-border-radius:7px;
+ -moz-background-clip:padding;
+ border-radius:7px;
+ background-clip:padding-box;
+ display:inline-block;
+ margin:0 auto;
+ top:10%;
+ z-index:9000;
+ }
+ .icon-refresh{
+ background: url("images/loading.gif") 50% 50% no-repeat;
+ }
</style>
</head>
<body id="open_base_site_cotentBody" class="cotentBody ng-scope">
@@ -429,7 +455,10 @@ <div id="topoCont" style="display:none;">
<!--<iframe src="chartTopo.html" name="" style="width:100%" allowTransparency="true" scrolling="no" frameborder="0">
</iframe>-->
- <object data="chartTopo.html" width="100%" height="300" type="text/html">
+ <!--<object data="chartTopo.html" width="100%" height="300" type="text/html">
+
+ </object>-->
+ <object id="topoContObj" data="TopoAccor.html" width="100%" height="300" type="text/html">
</object>
</div>
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gif b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gif Binary files differnew file mode 100644 index 00000000..5e28c953 --- /dev/null +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gif 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 eb667968..723ea7dc 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 @@ -32,6 +32,7 @@ lcmHandler.prototype = { alert('Location must be selected in Template Parameters'); return; } + $.isLoading({ text: "Creating service..." }); var serviceInstance = { serviceTemplateId: $("#svcTempl").val(), serviceName: $('#svcName').val(), @@ -48,14 +49,40 @@ lcmHandler.prototype = { return createNetworkServiceInstance(template, serviceInstance, gatewayService); } ).then( - function(serviceInstance) { - updateTable(serviceInstance); - $('#vmAppDialog').removeClass('in').css('display', 'none'); + function(response) { + $.isLoading('hide'); + if(response.status === 'success') { + updateTable(response.instance); + $('#vmAppDialog').removeClass('in').css('display', 'none'); + } else { + showErrorMessage('Create service failed', response.errorResult); + } } ); } }; +function showErrorMessage(title, result) { + var info = '<br/>' + '<h5>' + title + '</h5><hr/>'; + info = info + '<h6>Status: ' + result.status + '</h6><p/>'; + info = info + '<h6>Description: </h6>'; + if(result.statusDescription.forEach === undefined) { + info = info + '<h6>' + result.statusDescription + '</h6><p/>'; + } else { + result.statusDescription.forEach(function(message) { + info = info + '<h6>' + message + '</h6><p/>'; + }); + } + info = info + '<h6>Error code: '+ result.errorCode + '</h6>'; + $.bootstrapGrowl(info, { + type: 'danger', + align: 'center', + width: "auto", + delay: 10000, + allow_dismiss: true + }); +} + function checkLocation(parameters) { var checkPass = true; var i = 0; @@ -150,7 +177,11 @@ function fetchGsoTemplateInputParameters(templateId) { fetchSdnController() ).then( function (templateParameterResponse, nestingTempatesParas, vimInfoResponse, sdnControllersResponse) { - var inputParas = concat(templateParameterResponse[0].inputs, nestingTempatesParas); + var inputs = templateParameterResponse[0].inputs.map(function(input) { + input.showName = input.name; + return input; + }); + var inputParas = concat(inputs, nestingTempatesParas); var vims = translateToVimInfo(vimInfoResponse[0]); var sdnControllers = translateToSdnControllers(sdnControllersResponse[0]); templateParameters = translateToTemplateParameters(inputParas, vims, sdnControllers); @@ -187,12 +218,13 @@ function fetchGsoNestingTemplateParameters(templateId) { nestingParasAggregatation.notify(oneNodeParameters); }); serviceTemplates.forEach(function(serviceTemplate) { - if(serviceTemplate === null || serviceTemplate === undefined || serviceTemplate.inputs === undefined || serviceTemplate.csarId === undefined) - { - nodeAggregatation.notify([]); - return; - } + if(serviceTemplate === null || serviceTemplate === undefined || serviceTemplate.inputs === undefined || serviceTemplate.csarId === undefined) + { + nodeAggregatation.notify([]); + return; + } var inputs = serviceTemplate.inputs.map(function(input) { + input.showName = input.name; input.name = nodeTemplate.type + '.' + input.name; return input; }); @@ -205,13 +237,15 @@ function fetchGsoNestingTemplateParameters(templateId) { name: nodeTemplate.type + '.location', type: 'location', description: nodeTemplate.name + ' Location', - required: 'true' + required: 'true', + showName: nodeTemplate.name + ' Location' }); inputs.push({ name: nodeTemplate.type + '.sdncontroller', type: 'sdncontroller', description: nodeTemplate.name + ' SDN Controller', - required: 'true' + required: 'true', + showName: nodeTemplate.name + ' SDN Controller' }); } nodeAggregatation.notify(inputs); @@ -274,7 +308,8 @@ function translateToTemplateParameters(inputs, vims, controllers) { defaultValue: inputs[i].defaultValue, required: inputs[i].required, id: 'parameters_' + i, - value: inputs[i].defaultValue || '' + value: inputs[i].defaultValue || '', + showName: inputs[i].showName }; } return {changed: false, parameters: inputParameters, vimInfos: vims, sdnControllers: controllers}; @@ -291,17 +326,23 @@ function fetchNfvoTemplateInputParameters(templateId) { var vims = translateToVimInfo(vimInfoResponse[0]); var sdnControllers = translateToSdnControllers(sdnControllerResponse[0]); var inputParas = templateParameterResponse[0].inputs; + inputParas = inputParas.map(function(input) { + input.showName = input.name; + return input; + }); inputParas.push({ name: 'location', type: 'location', description: 'Location', - required: 'true' + required: 'true', + showName: 'Location' }); inputParas.push({ name: 'sdncontroller', type: 'sdncontroller', description: 'SDN Controller', - required: 'true' + required: 'true', + showName: 'SDN Controller' }); templateParameters = translateToTemplateParameters(inputParas, vims, sdnControllers); defer.resolve(templateParameters); @@ -316,7 +357,11 @@ function fetchSdnoTemplateInputParameters(templateId) { fetchTemplateParameterDefinitions(templateId) ).then( function (templateParameterResponse) { - templateParameters = translateToTemplateParameters(templateParameterResponse.inputs, [], []); + var inputs = templateParameterResponse.inputs.map(function(input) { + input.showName = input.name; + return input; + }) + templateParameters = translateToTemplateParameters(inputs, [], []); defer.resolve(templateParameters); } ); @@ -385,7 +430,7 @@ function transformToComponents(templateParas) { 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>' + + '<span>'+ inputPara.showName +'</span>' + '<span class="required">*</span>' + '</label>' + '<div class="col-sm-7">' + @@ -409,11 +454,11 @@ function transformToOptions(items) { function generateComponent(inputPara) { var component = '<div class="mT15 form-group" style="margin-left:25px;">' + '<label class="col-sm-3 control-label">' + - '<span>' + inputPara.description + '</span>' + generateRequiredLabel(inputPara) + + '<span>' + inputPara.showName + '</span>' + generateRequiredLabel(inputPara) + '</label>' + '<div class="col-sm-7">' + '<input type="text" id="' + inputPara.id + '" name="parameter description" class="form-control" placeholder="' + - inputPara.description + '" value="' + inputPara.value + '" />' + + inputPara.showName + '" value="' + inputPara.value + '" />' + '</div></div>'; return component; } @@ -457,25 +502,72 @@ function createGsoServiceInstance(gatewayService, serviceInstance, serviceTempla dataType: "json", data: JSON.stringify(parameter) })).then(function(response) { - serviceInstance.serviceId = response.serviceId; - defer.resolve(serviceInstance); + if(response.result.status === 'success') { + serviceInstance.serviceId = response.serviceId; + var gsoServiceUri = '/openoapi/gso/v1/services/' + response.serviceId; + var timerDefer = $.Deferred(); + var timeout = 600000; + var fun = function() { + if(timeout === 0) { + timerDefer.resolve({ + status: 'fail', + statusDescription: 'Operation is timeout!', + errorCode: '' + }); + return; + } + timeout = timeout - 1000; + $.when( + $.ajax({ + type: "GET", + url: gsoServiceUri + }) + ).then( + function(response) { + if(response.result === 'success' || response.result === 'failed') { + timerDefer.resolve(response); + } + } + ); + }; + var timerId = setInterval(fun, 1000); + $.when(timerDefer).then( + function(responseDesc) { + clearInterval(timerId); + if(responseDesc.result === 'success') { + defer.resolve({status: 'success', instance: serviceInstance}); + } else { + defer.resolve({ + status: 'fail', + errorResult: { + status: responseDesc.result, + statusDescription: 'fail to create the service', + errorCode: '' + }}); + } + } + ); + } else { + defer.resolve({status: 'fail', errorResult: {status:'fail', statusDescription: 'fail to create the service', errorCode: ''}}); + } }); return defer; } function createNfvoServiceInstance(gatewayService, serviceInstance, template) { - var nfvoLcmNsUri = '/openoapi/nslcm/v1/ns'; + var nfvoLcmUri = '/openoapi/nslcm/v1'; serviceInstance.nsdId = template.id; - return createServiceInstance(gatewayService, nfvoLcmNsUri, serviceInstance); + return createServiceInstance(gatewayService, nfvoLcmUri, serviceInstance); } function createSdnoServiceInstance(gatewayService, serviceInstance) { - var sdnoLcmNsUri = '/openoapi/sdnonslcm/v1/ns'; + var sdnoLcmUri = '/openoapi/sdnonslcm/v1'; serviceInstance.nsdId = serviceInstance.serviceTemplateId; - return createServiceInstance(gatewayService, sdnoLcmNsUri, serviceInstance); + return createServiceInstance(gatewayService, sdnoLcmUri, serviceInstance); } -function createServiceInstance(gatewayService, nsUri, serviceInstance) { +function createServiceInstance(gatewayService, lcmUri, serviceInstance) { + var nsUri = lcmUri + '/ns'; var defer = $.Deferred(); var sParameter = { 'nsdId': serviceInstance.nsdId, @@ -490,23 +582,75 @@ function createServiceInstance(gatewayService, nsUri, serviceInstance) { dataType: "json", data: JSON.stringify(sParameter) })).then(function(response) { - var nsInstanceId = response.serviceId; - serviceInstance.serviceId = nsInstanceId; - var initNsUrl = nsUri + '/' + nsInstanceId + '/instantiate'; - var parameter = { - 'gatewayUri': initNsUrl, - 'nsInstanceId': nsInstanceId, - 'additionalParamForNs': serviceInstance.inputParameters - }; - return $.ajax({ - type: "POST", - url: gatewayService, - contentType: "application/json", - dataType: "json", - data: JSON.stringify(parameter) - }); - }).then(function() { - defer.resolve(serviceInstance); + if(response.result.status === 'success') { + var nsInstanceId = response.serviceId; + serviceInstance.serviceId = nsInstanceId; + var initNsUrl = nsUri + '/' + nsInstanceId + '/instantiate'; + var parameter = { + 'gatewayUri': initNsUrl, + 'nsInstanceId': nsInstanceId, + 'additionalParamForNs': serviceInstance.inputParameters + }; + return $.ajax({ + type: "POST", + url: gatewayService, + contentType: "application/json", + dataType: "json", + data: JSON.stringify(parameter) + }); + } else { + return response; + } + }).then(function(response) { + if(response.result.status === 'success') { + var jobId = response.serviceId; + var jobStatusUri = lcmUri + '/jobs/' + jobId; + var timerDefer = $.Deferred(); + var timeout = 600000; + var fun = function() { + if(timeout === 0) { + timerDefer.resolve({ + status: 'fail', + statusDescription: 'Operation is timeout!', + errorCode: '' + }); + return; + } + timeout = timeout - 1000; + $.when( + $.ajax({ + type: "GET", + url: jobStatusUri + }) + ).then( + function(jobResponse) { + var responseDesc = jobResponse.responseDescriptor; + if(responseDesc.status === 'finished' || responseDesc.status === 'error') { + timerDefer.resolve(responseDesc); + } + } + ); + }; + var timerId = setInterval(fun, 1000); + $.when(timerDefer).then( + function(responseDesc) { + clearInterval(timerId); + if(responseDesc.status === 'finished') { + defer.resolve({status: 'success', instance: serviceInstance}); + } else { + defer.resolve({ + status: 'fail', + errorResult: { + status: responseDesc.status, + statusDescription: responseDesc.statusDescription, + errorCode: responseDesc.errorCode + }}); + } + } + ); + } else { + defer.resolve({status: 'fail', errorResult: response.result}); + } }); return defer; } @@ -540,49 +684,139 @@ function formatDate(date) { function deleteNe(rowId, row) { var deleteHandle = function(result) { if(result) { + $.isLoading({ text: "Deleting service..." }); var instanceId = row.serviceId; var serviceType = row.serviceType; var gatewayService = '/openoapi/servicegateway/v1/services/' + instanceId + '/terminate'; var remove = function () { + $.isLoading( "hide" ); $('#sai').bootstrapTable('remove', {field: 'serviceId', values: [instanceId]}); }; + var failFun = function(responseDesc) { + $.isLoading( "hide" ); + showErrorMessage("Delete service failed", responseDesc); + } if(serviceType === 'GSO') { - deleteGsoServiceInstance(gatewayService, instanceId, remove); + deleteGsoServiceInstance(gatewayService, instanceId, remove, failFun); } else if (serviceType === 'NFVO') { - var nfvoNsUri = '/openoapi/nslcm/v1/ns'; - deleteNonGsoServiceInstance(gatewayService, nfvoNsUri, instanceId, remove); + var nfvoLcmUri = '/openoapi/nslcm/v1'; + deleteNonGsoServiceInstance(gatewayService, nfvoLcmUri, instanceId, remove, failFun); } else if (serviceType === 'SDNO') { - var sdnoNsUri = '/openoapi/sdnonslcm/v1/ns'; - deleteNonGsoServiceInstance(gatewayService, sdnoNsUri, instanceId, remove); + var sdnoLcmUri = '/openoapi/sdnonslcm/v1'; + deleteNonGsoServiceInstance(gatewayService, sdnoLcmUri, instanceId, remove, failFun); } } }; bootbox.confirm("Do you confirm to delete service?", deleteHandle); } -function deleteGsoServiceInstance(gatewayService, instanceId, remove) { +function deleteGsoServiceInstance(gatewayService, instanceId, remove, failFun) { var gsoLcmUri = '/openoapi/gso/v1/services'; $.when( deleteNetworkServiceInstance(gatewayService, gsoLcmUri, instanceId) ).then( - function() { - remove(); + function(response) { + var gsoServiceUri = '/openoapi/gso/v1/services/toposequence/' + instanceId; + var timerDefer = $.Deferred(); + var timeout = 600000; + var fun = function() { + if(timeout === 0) { + timerDefer.resolve({ + status: 'fail', + statusDescription: 'Operation is timeout!', + errorCode: '' + }); + return; + } + timeout = timeout - 1000; + $.when( + $.ajax({ + type: "GET", + url: gsoServiceUri + }) + ).then( + function(response) { + if(response.length == 0) { + timerDefer.resolve({status:'success', statusDescription: 'success to delete the service', errorCode: ''}); + } + } + ); + }; + var timerId = setInterval(fun, 1000); + $.when(timerDefer).then( + function(responseDesc) { + clearInterval(timerId); + remove(); + if(responseDesc.status != 'success'){ + failFun({status: "fail", statusDescription: "delete service failed.", errorCode: "500"}); + } + } + ); } ); } -function deleteNonGsoServiceInstance(gatewayService, nsUri, instanceId, remove) { +function deleteNonGsoServiceInstance(gatewayService, lcmUri, instanceId, remove, failFun) { + var nsUri = lcmUri + '/ns'; $.when( terminateNetworkServiceInstance(gatewayService, nsUri, instanceId) ).then( - function() { - return deleteNetworkServiceInstance(gatewayService, nsUri, instanceId); - } - ).then( - function() { - remove(); + function(response) { + var jobId = response.jobId; + var jobStatusUri = lcmUri + '/jobs/' + jobId; + var timerDefer = $.Deferred(); + var timeout = 600000; + var fun = function() { + if(timeout === 0) { + timerDefer.resolve({ + status: 'fail', + statusDescription: 'Operation is timeout!', + errorCode: '' + }); + return; + } + timeout = timeout - 1000; + $.when( + $.ajax({ + type: "GET", + url: jobStatusUri + }) + ).then( + function(jobResponse) { + var responseDesc = jobResponse.responseDescriptor; + if(responseDesc.status === 'finished' || responseDesc.status === 'error') { + timerDefer.resolve(responseDesc); + } + } + ); + }; + var timerId = setInterval(fun, 1000); + $.when(timerDefer).then( + function(responseDesc) { + clearInterval(timerId); + if(responseDesc.status === 'finished') { + $.when( + deleteNetworkServiceInstance(gatewayService, nsUri, instanceId) + ).then( + function(nsResponse) { + if(nsResponse.status === 'success') { + remove(); + } else { + failFun(nsResponse); + } + } + ).fail(function() { + failFun({status: "fail", statusDescription: "delete service failed.", errorCode: "500"}); + }); + } else { + failFun(responseDesc); + } + } + ); } - ); + ).fail(function() { + failFun({status: "fail", statusDescription: "delete service failed.", errorCode: "500"}); + }); } function deleteNetworkServiceInstance(gatewayService, nsUri, instanceId) { diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.isloading.min.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.isloading.min.js new file mode 100644 index 00000000..87573765 --- /dev/null +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.isloading.min.js @@ -0,0 +1,39 @@ +/** +* Loading plugin for jQuery +* version: v1.0.6 +* +* Small helper to give the user a visual feedback that something is happening +* when fetching/posting data +* +* USAGE: +* - global overlay: $.isLoading(); +* - use javascript: $( selector ).isLoading(); +* - On non-form elements: $("div").isLoading({ text: "Loading", position:'inside'}); +* - remove the loading element: $( selector ).isLoading( "hide" ); +* +* @author Laurent Blanes <laurent.blanes@gmail.com> +* --- +* Copyright 2013, Laurent Blanes ( https://github.com/hekigan/is-loading ) +* +* The MIT License (MIT) +* +* Copyright (c) 2013 Laurent Blanes +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/!function(e,t){function i(t,i){this.element=t,this.options=e.extend({},n,i),this._defaults=n,this._name=o,this._loader=null,this.init()}function s(){e[o]||(e.isLoading=function(t){e("body").isLoading(t)})}var o="isLoading",n={position:"right",text:"","class":"glyphicon glyphicon-refresh",transparency:.5,tpl:'<span class="isloading-wrapper %wrapper%">%text%<i class="%class% glyphicon-spin"></i></span>',disableSource:!0,disableOthers:[]};i.prototype={init:function(){e(this.element).is("body")&&(this.options.position="overlay"),this.show()},show:function(){var i=this,s=i.options.tpl.replace("%wrapper%"," isloading-show isloading-"+i.options.position);switch(s=s.replace("%class%",i.options["class"]),s=s.replace("%text%",""!==i.options.text?i.options.text+" ":""),i._loader=e(s),e(i.element).is("input, textarea")&&!0===i.options.disableSource?e(i.element).attr("disabled","disabled"):!0===i.options.disableSource&&e(i.element).addClass("disabled"),i.options.position){case"inside":e(i.element).html(i._loader);break;case"overlay":var o=null;if(e(i.element).is("body"))o=e('<div class="isloading-overlay" style="position:fixed; left:0; top:0; z-index: 10000; background: rgba(0,0,0,'+i.options.transparency+"); width: 100%; height: "+e(t).height()+'px;" />'),e("body").prepend(o),e(t).on("resize",function(){o.height(e(t).height()+"px"),i._loader.css({top:e(t).height()/2-i._loader.outerHeight()/2+"px"})});else{var n=e(i.element).css("position"),a={},l=e(i.element).outerHeight()+"px",r="100%";a="relative"===n||"absolute"===n?{top:0,left:0}:e(i.element).position(),o=e('<div class="isloading-overlay" style="position:absolute; top: '+a.top+"px; left: "+a.left+"px; z-index: 10000; background: rgba(0,0,0,"+i.options.transparency+"); width: "+r+"; height: "+l+';" />'),e(i.element).prepend(o),e(t).on("resize",function(){o.height(e(i.element).outerHeight()+"px"),i._loader.css({top:o.outerHeight()/2-i._loader.outerHeight()/2+"px"})})}o.html(i._loader),i._loader.css({top:o.outerHeight()/2-i._loader.outerHeight()/2+"px"});break;default:e(i.element).after(i._loader)}i.disableOthers()},hide:function(){"overlay"===this.options.position?e(this.element).find(".isloading-overlay").first().remove():(e(this._loader).remove(),e(this.element).text(e(this.element).attr("data-isloading-label"))),e(this.element).removeAttr("disabled").removeClass("disabled"),this.enableOthers()},disableOthers:function(){e.each(this.options.disableOthers,function(t,i){var s=e(i);s.is("button, input, textarea")?s.attr("disabled","disabled"):s.addClass("disabled")})},enableOthers:function(){e.each(this.options.disableOthers,function(t,i){var s=e(i);s.is("button, input, textarea")?s.removeAttr("disabled"):s.removeClass("disabled")})}},e.fn[o]=function(t){return this.each(function(){if(t&&"hide"!==t||!e.data(this,"plugin_"+o))e.data(this,"plugin_"+o,new i(this,t));else{var s=e.data(this,"plugin_"+o);"hide"===t?s.hide():s.show()}})},s()}(jQuery,window,document); diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html index 58c09586..6d8b545e 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html @@ -105,49 +105,58 @@ //Assigning data to table
data: {}
});
- $('.table tbody tr').click(function () {
- $(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
- });
-
- $('#sai').on('sort.bs.table', function () {
-
-
- }).on('click-row.bs.table', function () {
-
-
- $('.table tbody tr').click(function() {
-
- $(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
- });
-
- });
- });
-
- function operateFormatter(value, row, index) {
- return [
- '<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />'
- ].join('');
- }
- window.operateEvents = {
- 'click .siteDeleteImg': function(e, value, row, index) {
- // TO DO ajex call for delete
- console.log(value, row, index);
- }
- };
- /* function nameFormatter(value, row) {
- jsonForTP = row.json.data;
- var name=JSON.stringify(row.json.data);
- var temp = "<a class='underlayNameLink' onclick='getMethod(this)' name='"+ name + "' data-events='operateEventsU'>" + value + "</a>";
- return temp;
- }*/
- function getMethod(obj) {
- //Update the lower table here
- $('#underlayTpDataTable').bootstrapTable(
- //Assigning data to table
- "append", JSON.parse(obj.name)
- );
- }
- </script>
+ $('.table tbody tr').click(function () {
+ $(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
+ });
+
+ $('#sai').on('sort.bs.table', function () {
+
+
+ }).on('click-row.bs.table', function () {
+
+
+ $('.table tbody tr').click(function() {
+
+ $(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
+ });
+
+ });
+
+ var serviceId = getQueryStringValue("serviceId");
+ console.log("underlayvpn - serviceId : " + serviceId);
+
+ });
+
+ function getQueryStringValue (key) {
+ var params = new URLSearchParams(window.location.search.slice(1));
+ return params.get(key);
+ }
+
+ function operateFormatter(value, row, index) {
+ return [
+ '<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />'
+ ].join('');
+ }
+ window.operateEvents = {
+ 'click .siteDeleteImg': function(e, value, row, index) {
+ // TO DO ajex call for delete
+ console.log(value, row, index);
+ }
+ };
+ /* function nameFormatter(value, row) {
+ jsonForTP = row.json.data;
+ var name=JSON.stringify(row.json.data);
+ var temp = "<a class='underlayNameLink' onclick='getMethod(this)' name='"+ name + "' data-events='operateEventsU'>" + value + "</a>";
+ return temp;
+ }*/
+ function getMethod(obj) {
+ //Update the lower table here
+ $('#underlayTpDataTable').bootstrapTable(
+ //Assigning data to table
+ "append", JSON.parse(obj.name)
+ );
+ }
+ </script>
</head>
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css index 43160f5a..b796708d 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css @@ -1,3 +1,18 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #iemp_layout_container { padding: 0px; margin: 1px auto; diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css index 25653069..1ade87f3 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css @@ -1,3 +1,18 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + body { font-family: '微软雅黑'; font-size: 12px; diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css index e79d125a..37074d13 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css @@ -1,3 +1,18 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + fieldset { width: 680px; } diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html index f0ae9679..fc3de5d7 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html @@ -1,3 +1,18 @@ +<!-- + Copyright 2016, Huawei Technologies Co., Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> <!DOCTYPE html> <html> <head> diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js index e42c0333..97c57506 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js @@ -1,3 +1,17 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ var sendMsg = { get: "get", post: "post" diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js index 8e77f0cf..8dd613f7 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js @@ -1,3 +1,17 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ function hideFirstCol() { // $('table tr').find('th:eq(0)').hide(); // $('table tr').find('td:eq(0)').hide(); diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js index 5a6e66cb..41ed432c 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js @@ -1,3 +1,17 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ function hideFirstCol() { // $('table tr').find('th:eq(0)').hide(); // $('table tr').find('td:eq(0)').hide(); diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js index d6e47d27..4989ea3a 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js @@ -1,3 +1,17 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ $(function () { $.validator.setDefaults({ onkeyup: null, diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js index 68ffe3f3..ff6277d1 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js @@ -1,3 +1,17 @@ +/* Copyright 2016, Huawei Technologies Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ function loadVimData() { var requestUrl = app_url+"/v1/resmanage/vim/vimInfo"; $.ajax({ diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html index b6647abc..61bd7c09 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html @@ -1,3 +1,19 @@ +<!-- + Copyright 2016, Huawei Technologies Co., Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> <!DOCTYPE html> <html> <head> diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html index 281e86c5..5998250e 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html @@ -1,3 +1,21 @@ +<!-- + + Copyright 2016, Huawei Technologies Co., Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> + <!doctype html> <html> <head> diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html index f917489e..aaef6251 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html @@ -1,3 +1,19 @@ +<!-- + Copyright 2016, Huawei Technologies Co., Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> <!DOCTYPE html> <html> <head> diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html index 518da3ee..8eff1cd5 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html @@ -132,7 +132,7 @@ </span>
</div>
</th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ <!-- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="controller" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
<div class="DataTables_sort_wrapper openo-ellipsis ">
@@ -140,7 +140,7 @@ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Controller
</span>
</div>
- </th>
+ </th> -->
<th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="nativeID" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
@@ -159,7 +159,7 @@ </span>
</div>
</th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ <!-- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="neRole" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
<div class="DataTables_sort_wrapper openo-ellipsis ">
@@ -185,7 +185,7 @@ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Operating State
</span>
</div>
- </th>
+ </th> -->
<th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
align="center" data-formatter="operateFormatter" data-events="operateEvents">
<div class="openo-table-th-border"></div>
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html index ba0d5ec2..da7a5cfd 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html @@ -167,6 +167,15 @@ </div>
</th>
<th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="nativeID" data-sortable="true" data-filter-control="input">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
+ <span id="native_Id"
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Native ID
+ </span>
+ </div>
+ </th>
+ <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="adminState" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
<div class="DataTables_sort_wrapper openo-ellipsis ">
@@ -268,6 +277,7 @@ <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
<label class="col-sm-3 control-label">
<span>ME</span>
+ <span class="required">*</span>
</label>
<div class="col-sm-7">
<input type="text" id="meID" name="meID" class="form-control"
@@ -330,6 +340,15 @@ placeholder="255.255.255.255"/>
</div>
</div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">
+ <span>Native ID</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="nativeID" name="nativeID" class="form-control"
+ placeholder="Native ID"/>
+ </div>
+ </div>
</div>
</div>
</div>
|