Avoid shoing empty disk usage entries for uninstalled apps
This commit is contained in:
@@ -941,7 +941,8 @@
|
||||
"usageInfo": "{{ available | prettyDiskSize }}</b> of <b>{{ size | prettyDiskSize }}</b> available",
|
||||
"diskContent": "This {{ type }} disk contains",
|
||||
"notAvailableYet": "Not available yet",
|
||||
"usedInfo": "{{ used }} used of {{ size }}"
|
||||
"usedInfo": "{{ used }} used of {{ size }}",
|
||||
"uninstalledApp": "Uninstalled app"
|
||||
},
|
||||
"systemMemory": {
|
||||
"title": "System Memory",
|
||||
|
||||
@@ -82,7 +82,10 @@
|
||||
<div ng-repeat="content in disk.contents" class="disk-content">
|
||||
<span class="color-indicator" style="background-color: {{ content.color }};"> </span>
|
||||
<span ng-show="content.type === 'standard'">{{ content.label || content.id }}</span>
|
||||
<span ng-show="content.type === 'app'"><a href="https://{{ content.app.fqdn }}" target="_blank">{{ content.app.label || content.app.fqdn }}</a></span>
|
||||
<span ng-show="content.type === 'app'">
|
||||
<a href="https://{{ content.app.fqdn }}" target="_blank" ng-hide="content.uninstalled">{{ content.app.label || content.app.fqdn }}</a>
|
||||
<span ng-show="content.uninstalled">{{ 'system.diskUsage.uninstalledApp' | tr }}</span>
|
||||
</span>
|
||||
<span ng-show="content.type === 'volume'"><a href="/#/volumes">{{ content.volume.name }}</a></span>
|
||||
<small class="text-muted">{{ content.usage | prettyDiskSize }}</small>
|
||||
</div>
|
||||
|
||||
@@ -82,7 +82,10 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
disk.contents.forEach(function (content) {
|
||||
content.color = getNextColor();
|
||||
|
||||
if (content.type === 'app') content.app = Client.getInstalledAppsByAppId()[content.id];
|
||||
if (content.type === 'app') {
|
||||
content.app = Client.getInstalledAppsByAppId()[content.id];
|
||||
if (!content.app) content.uninstalled = true;
|
||||
}
|
||||
if (content.type === 'volume') content.volume = $scope.volumesById[content.id];
|
||||
|
||||
usageOther -= content.usage;
|
||||
|
||||
Reference in New Issue
Block a user