Filter apps in memory graph which use below 1Gb

This commit is contained in:
Johannes Zellner
2022-08-05 15:46:45 +02:00
parent a7558cadaa
commit 4947366aaa
3 changed files with 12 additions and 7 deletions
+4 -2
View File
@@ -27,8 +27,9 @@
<div class="row" ng-repeat="disk in disks.disks" style="margin-bottom: 20px;">
<div class="col-md-12">
<h3>
<!-- <span>{{ disk.filesystem }}</span> <span>({{ disk.mountpoint }})</span> -->
<span ng-bind-html="'system.diskUsage.mountedAt' | tr:{ filesystem: disk.filesystem, mountpoint: disk.mountpoint }"></span>
<span class="pull-right small" ng-show="disk.available && disk.size" ng-bind-html="'system.diskUsage.usageInfo' | tr:{ available: disk.available, size: disk.size }"></span>
<span class="pull-right small" ng-show="disk.available && disk.size" ng-bind-html="'system.diskUsage.usedInfo' | tr:{ used: ((disk.size - disk.available) | prettyDiskSize), size: (disk.size | prettyDiskSize) }"></span>
<span class="pull-right small" ng-hide="disk.available && disk.size">{{ 'system.diskUsage.notAvailableYet' | tr }}</span>
</h3>
<div class="progress">
@@ -53,7 +54,8 @@
<div class="card card-large" style="min-height: 300px;">
<label style="display: block">Megabyte <span class="pull-right">RAM ({{ memory.memory | prettyByteSize }}) + Swap ({{ memory.swap | prettyByteSize }})</span></label>
<canvas id="graphsSystemMemoryChart" style="width: 100%;"></canvas>
{{ 'system.systemMemory.graphSubtext' | tr }}
<br/>
<div class="text-muted text-center text-small">{{ 'system.systemMemory.graphSubtext' | tr }}</div>
</div>
</uib-tab>
+5 -3
View File
@@ -169,7 +169,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
var timePeriod = $scope.graphs.period * 60;
var timeBucketSize = $scope.graphs.period > 24 ? (6*60) : 5;
function fillGraph(canvasId, data, additionalData, label, chartPropertyName, max, valueDivider) {
function fillGraph(canvasId, data, appsData, label, chartPropertyName, max, valueDivider) {
// translate the data from bytes to MB
var datapoints = data.datapoints.map(function (d) { return parseInt((d[0] / valueDivider).toFixed(2)); });
var labels = datapoints.map(function (d, index) {
@@ -191,8 +191,10 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
data: datapoints
}];
if (Array.isArray(additionalData)) {
additionalData.forEach(function (data, index) {
if (Array.isArray(appsData)) {
appsData.forEach(function (data, index) {
if (!data.datapoints.some(function (p) { return p[0] > 1024*1024*1024; })) return;
datasets.push({
label: apps[index].fqdn,
fill: false,