Skip to content

Commit

Permalink
Merge pull request #93 from mzacharioudakis/v3.1
Browse files Browse the repository at this point in the history
minor change in disk chart
  • Loading branch information
mzacharioudakis authored Feb 16, 2018
2 parents ff00615 + e1f85d3 commit 7a7d380
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 45 deletions.
71 changes: 36 additions & 35 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions app/js/controllers/VmMonitoringController.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,13 @@ $scope.historyCPU = function(){

$scope.prdata = [];

data.data[0].values.forEach(function(element, index) {
position = 0;
data.data.forEach(function(el,ind){
if(el.metric.core=='cpu')
position=ind;
})

data.data[position].values.forEach(function(element, index) {

var timestamp = $rootScope.FixTimestamp(element[0]);
$scope.prdata.push([timestamp,parseFloat(element[1])]);
Expand Down Expand Up @@ -863,7 +869,7 @@ $scope.historyHardDisk = function(){
},

series:[{
type: 'area', color: '#454e5d',
type: 'line', color: '#454e5d',
name: 'Disk',
data: $scope.kam_disk
}]
Expand Down
20 changes: 12 additions & 8 deletions app/js/controllers/VnfMonitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ $scope.historyRAM = function(){

var m = Monitoring.getData(encodeURI(url));
m.then(function(datas){
console.log("HISTORY RAM");
console.log(datas);

$scope.ramdata = [];
$scope.vnf.currentMemoryUsage = 100-datas.data[0].values[datas.data[0].values.length-1][1];
Expand Down Expand Up @@ -600,11 +602,7 @@ $scope.historyRAM = function(){
$scope.vnf.currentMemoryUsage = 100-y;
$scope.drawGaugesRAM();

})




})

}, 5000));

Expand Down Expand Up @@ -696,10 +694,16 @@ $scope.historyCPU = function(){

var m = Monitoring.getData(encodeURI(url));
m.then(function(data){

console.log("HISTORY CPU");
console.log(data);
position = 0;
data.data.forEach(function(el,ind){
if(el.metric.core=='cpu')
position=ind;
})
$scope.prdata = [];
$scope.vnf.currentCPUUsage = data.data[0].values[data.data[0].values.length-1][1];
data.data[0].values.forEach(function(element, index) {
$scope.vnf.currentCPUUsage = data.data[position].values[data.data[position].values.length-1][1];
data.data[position].values.forEach(function(element, index) {

var timestamp = $rootScope.FixTimestamp(element[0]);
$scope.prdata.push([timestamp,parseFloat(element[1])]);
Expand Down

0 comments on commit 7a7d380

Please sign in to comment.