mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
Added remaining memory stats, change humansize filter to give more accurate sizes.
This commit is contained in:
parent
b99fe5bf55
commit
5a51495432
5 changed files with 59 additions and 35 deletions
|
@ -71,7 +71,9 @@ angular.module('dockerui.filters', [])
|
|||
return 'n/a';
|
||||
}
|
||||
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10);
|
||||
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[[i]];
|
||||
var value = bytes / Math.pow(1024, i);
|
||||
var decimalPlaces = (i < 1) ? 0 : (i - 1);
|
||||
return value.toFixed(decimalPlaces) + ' ' + sizes[[i]];
|
||||
};
|
||||
})
|
||||
.filter('containername', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue