diff options
22 files changed, 609 insertions, 370 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..cd0fd32b 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,26 +276,47 @@ </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>
</div>
+
</div>
</div>
</div>
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 b7357c52..3e7d167d 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html @@ -30,6 +30,8 @@ <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="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+ <script type="text/javascript" src="js/jquery.bootstrap-growl.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" />
@@ -72,7 +74,7 @@ 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));
});
@@ -455,7 +457,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/i18n/lcm-template-parameters-i18n-en-US.properties b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/i18n/lcm-template-parameters-i18n-en-US.properties new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/i18n/lcm-template-parameters-i18n-en-US.properties 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 ceb62ad9..fb554463 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 @@ -21,6 +21,12 @@ var templateParameters = { var lcmHandler = function () { this._addOwnEvents(); + jQuery.i18n.properties({ + language:'en-US', + name:'lcm-template-parameters-i18n', + path:'i18n/', + mode:'map' + }); }; lcmHandler.prototype = { @@ -49,15 +55,40 @@ lcmHandler.prototype = { return createNetworkServiceInstance(template, serviceInstance, gatewayService); } ).then( - function(serviceInstance) { - updateTable(serviceInstance); + function(response) { $.isLoading('hide'); - $('#vmAppDialog').removeClass('in').css('display', 'none'); + 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; @@ -429,15 +460,23 @@ 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.showName + '</span>' + generateRequiredLabel(inputPara) + + '<span>' + showName(inputPara) + '</span>' + generateRequiredLabel(inputPara) + '</label>' + '<div class="col-sm-7">' + '<input type="text" id="' + inputPara.id + '" name="parameter description" class="form-control" placeholder="' + - inputPara.showName + '" value="' + inputPara.value + '" />' + + showName(inputPara) + '" value="' + inputPara.value + '" />' + '</div></div>'; return component; } +function showName(inputPara) { + var name = $.i18n.prop(inputPara.name) + if(name.length === 0 || name.slice(0, 1) === '[') { + name = inputPara.showName; + } + return name; +} + function generateRequiredLabel(parameter) { var requiredLabel = ''; if (parameter.required === 'true') { @@ -477,25 +516,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, @@ -510,23 +596,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; } @@ -568,43 +706,131 @@ function deleteNe(rowId, row) { $.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.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">×</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/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/conf/globalconfig.json b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/conf/globalconfig.json index 93714d49..9df8207a 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/conf/globalconfig.json +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/conf/globalconfig.json @@ -1,5 +1,3 @@ { - "url": "http://127.0.0.1", - "port": "8080", - "context_name":"/resmgr" + "url": "http://127.0.0.1:8080/resmgr" }
\ No newline at end of file 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 b796708d..43160f5a 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,18 +1,3 @@ -/* 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 1ade87f3..25653069 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,18 +1,3 @@ -/* 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 37074d13..e79d125a 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,18 +1,3 @@ -/* 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 fc3de5d7..f0ae9679 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,18 +1,3 @@ -<!-- - 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 97c57506..e42c0333 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,17 +1,3 @@ -/* 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 8dd613f7..3a74ce10 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,17 +1,3 @@ -/* 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(); @@ -112,7 +98,7 @@ function loadHostData() { function fillCountryData() { var requestUrl = app_url+"/openoapi/resmgr/v1/locations/country"; - var htmlContent = ""; + var htmlContent = "<option value=''>--select--</option>"; $.ajax({ type: "GET", url: requestUrl, @@ -133,7 +119,7 @@ function fillCountryData() { function fillVimNameData() { - var requestUrl = app_url+"/openoapi/resmgr/v1/locations/cloudservice"; + var requestUrl = app_url+"/openoapi/resmgr/v1/datacenters/vims"; var htmlContent = ""; $.ajax({ type: "GET", @@ -142,7 +128,7 @@ function fillVimNameData() { success: function (jsonobj) { var str = jsonobj.data.replace('[', '').replace(']', '').split(',') $.each(str, function (n, v) { - htmlContent += "<option value='" + v + "'>" + v + "</option>"; + htmlContent += "<option value='" + v.vimId + "'>" + v.name + "</option>"; $("#vimName").html(htmlContent); }); @@ -241,12 +227,11 @@ $(function () { type: "GET", url: requestUrl, contentType: "application/json", - success: function (jsonobj) { - $.each(jsonobj.data, function (n, v) { - htmlContent += "<option value='" + v + "'>" + v + "</option>"; - $("#location").html(htmlContent); - - }); + success: function (jsonobj) {var str = jsonobj.data.replace('[', '').replace(']', '').split(',') + $.each(str, function (n, v) { + htmlContent += "<option value='" + v + "'>" + v + "</option>"; + $("#location").html(htmlContent); + }); }, error: function (xhr, ajaxOptions, thrownError) { diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/gconf.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/gconf.js index bf8f829c..06814d15 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/gconf.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/gconf.js @@ -22,7 +22,7 @@ function getUrl(){ async:false, dataType:"json", success:function(jsonData) { - url = jsonData.url + ":" + jsonData.port +jsonData.context_name; + url = jsonData.url; console.log("url = " + url); } }); 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 41ed432c..5a6e66cb 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,17 +1,3 @@ -/* 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 4989ea3a..d6e47d27 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,17 +1,3 @@ -/* 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 ff6277d1..bf55aaee 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,17 +1,22 @@ -/* 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 loadDatacenterData() { + var requestUrl = app_url+"/openoapi/resmgr/v1/datacenters"; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $.each(jsonobj.datacenters, function (n, v) { + printCharts(v.usedCPU, v.totalCPU, v.usedMemory, v.totalMemory, v.usedDisk, v.totalDisk,v.name); + }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting site data : " + xhr.responseText); + printCharts(11, 12, 21, 22, 31, 32,1); + } + }); +} + + function loadVimData() { var requestUrl = app_url+"/v1/resmanage/vim/vimInfo"; $.ajax({ @@ -20,22 +25,29 @@ function loadVimData() { contentType: "application/json", success: function (jsonobj) { printCharts(jsonobj.data[0].used.cpu, - jsonobj.data[0].total.cpu, jsonobj.data[0].used.memory, jsonobj.data[0].total.memory, jsonobj.data[0].used.disk, jsonobj.data[0].total.disk); + jsonobj.data[0].total.cpu, jsonobj.data[0].used.memory, jsonobj.data[0].total.memory, jsonobj.data[0].used.disk, jsonobj.data[0].total.disk,1); }, error: function (xhr, ajaxOptions, thrownError) { bootbox.alert("Error on getting data (here display the test data) : " + xhr.responseText); - printCharts(11, 12, 21, 22, 31, 32); + printCharts(11, 12, 21, 22, 31, 32,1); } }); } -function printCharts(v11, v12, v21, v22, v31, v32) { - var cpuChart = new Chart($("#cpuChart"), { + +function addHtmlTemplate(dc_id){ + var htmlTemplate= '<div><br/><div>DataCenter[ '+dc_id+' ]</div><div style="width: 33%; float: left; text-align: center; display: inline"> <canvas id="cpuChart_'+dc_id+'"></canvas> <br> <label style="font-size: 14px;">Cpu status</label> </div> <div style="width: 33%; float: left; text-align: center; display: inline"> <canvas id="memoryChart_'+dc_id+'"></canvas> <br> <label style="font-size: 14px;">Memory status</label> </div> <div style="width: 34%; float: left; text-align: center; display: inline"> <canvas id="diskChart_'+dc_id+'"></canvas> <br> <label style="font-size: 14px;">Disk status</label> </div> </div>'; + $('#chartArea').append(htmlTemplate); +} + +function printCharts(v11, v12, v21, v22, v31, v32,dc_id) { + addHtmlTemplate(dc_id); + var cpuChart = new Chart($("#cpuChart_"+dc_id+""), { type: 'doughnut', data: { labels: ["used", "available"], datasets: [{ - data: [v11, v12], + data: [v11, v12-v11], backgroundColor: ["#FFCE56", "#36A2EB"], hoverBackgroundColor: ["#FFCE56", "#36A2EB"] }] @@ -48,12 +60,12 @@ function printCharts(v11, v12, v21, v22, v31, v32) { } } }); - var memoryChart = new Chart($("#memoryChart"), { + var memoryChart = new Chart($("#memoryChart_"+dc_id+""), { type: 'doughnut', data: { labels: ["used", "available"], datasets: [{ - data: [v21, v22], + data: [v21, v22-v21], backgroundColor: ["#FF6384", "#36A2EB"], hoverBackgroundColor: ["#FF6384", "#36A2EB"] }] @@ -67,12 +79,12 @@ function printCharts(v11, v12, v21, v22, v31, v32) { } } }); - var diskChart = new Chart($("#diskChart"), { + var diskChart = new Chart($("#diskChart_"+dc_id+""), { type: 'doughnut', data: { labels: ["used", "available"], datasets: [{ - data: [v31, v32], + data: [v31, v32-v31], backgroundColor: ["#FF6384", "green"], hoverBackgroundColor: ["#FF6384", "green"] }] @@ -88,6 +100,6 @@ function printCharts(v11, v12, v21, v22, v31, v32) { } $(function () { - loadVimData(); + loadDatacenterData(); })
\ No newline at end of file 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 61bd7c09..b6647abc 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,19 +1,3 @@ -<!-- - 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 5998250e..281e86c5 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,21 +1,3 @@ -<!-- - - 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 aaef6251..7bdb9b9c 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,69 +1,56 @@ -<!-- - 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> - <head lang="en"> - <meta charset="UTF-8"> - <title></title> - <link href="css/bootstrap.min.css" rel="stylesheet"/> - <link href="css/VMMain.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/bootstrap-table.min.js"></script> - <script type="text/javascript" src="js/bootbox.min.js"></script> - <script type="text/javascript" src="js/jquery.validate.min.js"></script> - <script type="text/javascript" src="js/chart.min.js"></script> - - <script type="text/javascript" src="js/gconf.js"></script> - <script type="text/javascript" src="js/vim.js"></script> - - <style type="text/css"> - </style> - - </head> +<head lang="en"> +<meta charset="UTF-8"> +<title></title> +<link href="css/bootstrap.min.css" rel="stylesheet" /> +<link href="css/VMMain.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/bootstrap-table.min.js"></script> +<script type="text/javascript" src="js/bootbox.min.js"></script> +<script type="text/javascript" src="js/jquery.validate.min.js"></script> +<script type="text/javascript" src="js/chart.min.js"></script> + +<script type="text/javascript" src="js/gconf.js"></script> +<script type="text/javascript" src="js/vim.js"></script> + +<style type="text/css"> +</style> + +</head> <body id="open_base_site_cotentBody" class="cotentBody ng-scope"> -<div class="container-fluid ms-controller"> - <br> - <div style="font-size:18px">resource using status:</div> - <hr> - <!-- chart area --> - <div style="width:30%;float: left;text-align:center;display: inline"> - <canvas id="cpuChart"></canvas> - <br> - <label style="font-size:14px;">Cpu status</label> - </div> - <div style="width:30%;float: left;text-align:center;display: inline"> - <canvas id="memoryChart"></canvas> - <br> - <label style="font-size:14px;">Memory status</label> - </div> - <div style="width:30%;float: left;text-align:center;display: inline"> - <canvas id="diskChart"></canvas> - <br> - <label style="font-size:14px;">Disk status</label> - </div> - <script type="text/javascript"> - - - </script> -</div> + <div class="container-fluid ms-controller"> + <br> + <div style="font-size: 18px">Resource using status:</div> + <hr> + <!-- chart area --> + <div id="chartArea"> + <!-- <div> + <div + style="width: 30%; float: left; text-align: center; display: inline"> + <canvas id="cpuChart"></canvas> + <br> <label style="font-size: 14px;">Cpu status</label> + </div> + <div + style="width: 30%; float: left; text-align: center; display: inline"> + <canvas id="memoryChart"></canvas> + <br> <label style="font-size: 14px;">Memory status</label> + </div> + <div + style="width: 30%; float: left; text-align: center; display: inline"> + <canvas id="diskChart"></canvas> + <br> <label style="font-size: 14px;">Disk status</label> + </div> + </div> --> + </div> + <script type="text/javascript"> + + </script> + </div> </body> </html>
\ No newline at end of file |