Fix prettyDiskSize to use 1000 instead of 1024

This commit is contained in:
Girish Ramakrishnan
2020-04-01 16:26:47 -07:00
parent 7d52be6e99
commit b93b1a6eec
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -78,7 +78,7 @@
</div>
<div class="row" ng-repeat="disk in disks" style="margin-bottom: 20px;">
<div class="col-md-12">
<h3>{{ disk.filesystem }} <small>mounted at</small> {{ disk.mountpoint }} <span class="pull-right small"><b>{{ disk.available | prettyDiskSize }}</b> of <b>{{ disk.size | prettyDiskSize }}</b> still available</span></h3>
<h3>{{ disk.filesystem }} <small>mounted at</small> {{ disk.mountpoint }} <span class="pull-right small"><b>{{ disk.available | prettyDiskSize }}</b> of <b>{{ disk.size | prettyDiskSize }}</b> available</span></h3>
<div class="progress">
<div class="progress-bar" ng-repeat="content in disk.contains" style="width: {{ content.usage / disk.size * 100 }}%; background-color: {{ content.color }};" uib-tooltip="{{ content.label + ' ' + (content.usage | prettyDiskSize) }}"></div>
</div>
+2 -2
View File
@@ -175,7 +175,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
});
});
$scope.disks = result.disks;
$scope.disks = result.disks; // [ { filesystem, type, size, used, available, capacity, mountpoint }]
// lazy fetch graphite data
$scope.disks.forEach(function (disk) {
@@ -221,7 +221,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
usageOther -= tmp;
});
// add content container for other non tracked data
// add content container for other non tracked data.
disk.contains.push({
label: 'Ubuntu',
id: 'other',