Make it explicit what the graphs show in which units
This commit is contained in:
@@ -331,13 +331,13 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
$scope.graphs[chartPropertyName] = new Chart(ctx, { type: 'line', data: data, options: options });
|
||||
}
|
||||
|
||||
var systemMemoryuery = 'summarize(sum(collectd.localhost.memory.memory-used, collectd.localhost.swap.swap-used), "' + timeBucketSize + 'min", "avg")';
|
||||
var systemMemoryQuery = 'summarize(sum(collectd.localhost.memory.memory-used, collectd.localhost.swap.swap-used), "' + timeBucketSize + 'min", "avg")';
|
||||
var cpuQuery = 'summarize(sum(collectd.localhost.aggregation-cpu-average.cpu-system, collectd.localhost.aggregation-cpu-average.cpu-user), "' + timeBucketSize + 'min", "avg")';
|
||||
|
||||
Client.graphs([ systemMemoryuery, cpuQuery ], '-' + timePeriod + 'min', {}, function (error, result) {
|
||||
Client.graphs([ systemMemoryQuery, cpuQuery ], '-' + timePeriod + 'min', {}, function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
fillGraph('#graphsSystemMemoryChart', result[0], 'Memory', 'memoryChart', Number.parseInt($scope.memory.memory / 1024 / 1024), 1024 * 1024);
|
||||
fillGraph('#graphsSystemMemoryChart', result[0], 'Memory', 'memoryChart', Number.parseInt(($scope.memory.memory + $scope.memory.swap) / 1024 / 1024), 1024 * 1024);
|
||||
fillGraph('#graphsCPUChart', result[1], 'CPU Usage', 'cpuChart', 100, 1);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user