Make it explicit what the graphs show in which units

This commit is contained in:
Johannes Zellner
2020-05-13 23:11:30 +02:00
parent e5c8f2caec
commit aef625ba31
3 changed files with 6 additions and 10 deletions

View File

@@ -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);
});
}