Make it explicit what the graphs show in which units
This commit is contained in:
+2
-6
@@ -822,13 +822,9 @@
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*30, '30 days')">30 days</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<label>CPU Usage</label>
|
||||
<canvas id="graphsCPUUsageChart" style="width: 100%;"></canvas>
|
||||
<label>Memory Usage</label>
|
||||
<label style="margin-top: 10px;">Main Memory + Swap Usage in Megabytes</label>
|
||||
<canvas id="graphsMemoryChart" style="width: 100%;"></canvas>
|
||||
<label>Disk Usage</label>
|
||||
<label>Disk Usage in Megabytes</label>
|
||||
<canvas id="graphsDiskChart" style="width: 100%;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
<uib-tab index="1" heading="System Memory" select="graphs.show()">
|
||||
<div class="card card-large" style="min-height: 300px;">
|
||||
<label>Megabytes</label>
|
||||
<label>Main Memory + Swap in Megabytes</label>
|
||||
<canvas id="graphsSystemMemoryChart" style="width: 100%;"></canvas>
|
||||
</div>
|
||||
</uib-tab>
|
||||
|
||||
+3
-3
@@ -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