mirror of
https://github.com/goharbor/harbor
synced 2025-04-17 03:48:01 +00:00
Merge pull request #4491 from danielefranceschi/master
fix size suffix label for >1GB images
This commit is contained in:
commit
6ca2f39186
|
@ -442,7 +442,7 @@ export class TagComponent implements OnInit, AfterViewInit {
|
|||
} else if (Math.pow(1024, 2) <= size && size < Math.pow(1024, 3)) {
|
||||
return (size / Math.pow(1024, 2)).toFixed(2) + "MB";
|
||||
} else if (Math.pow(1024, 3) <= size && size < Math.pow(1024, 4)) {
|
||||
return (size / Math.pow(1024, 3)).toFixed(2) + "MB";
|
||||
return (size / Math.pow(1024, 3)).toFixed(2) + "GB";
|
||||
} else {
|
||||
return size + "B";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user