mirror of
https://github.com/goharbor/harbor
synced 2025-04-16 10:34:54 +00:00
fix rendering suffix for >1GB images
This commit is contained in:
parent
0c95bd6ffa
commit
71eeebec6f
|
@ -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