- Fix image size saving to occur before the return of the response

- Make the image size say ‘Unknown’ if it is not known
This commit is contained in:
Joseph Schorr 2014-01-03 16:42:38 -05:00
parent 0a63690e25
commit e7904f0a9e
2 changed files with 5 additions and 6 deletions

View file

@ -1027,7 +1027,7 @@ quayApp.directive('dockerAuthDialog', function () {
quayApp.filter('bytes', function() {
return function(bytes, precision) {
if (!bytes || isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '';
if (!bytes || isNaN(parseFloat(bytes)) || !isFinite(bytes)) return 'Unknown';
if (typeof precision === 'undefined') precision = 1;
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
number = Math.floor(Math.log(bytes) / Math.log(1024));