mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 00:27:44 +01: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)) {
|
} else if (Math.pow(1024, 2) <= size && size < Math.pow(1024, 3)) {
|
||||||
return (size / Math.pow(1024, 2)).toFixed(2) + "MB";
|
return (size / Math.pow(1024, 2)).toFixed(2) + "MB";
|
||||||
} else if (Math.pow(1024, 3) <= size && size < Math.pow(1024, 4)) {
|
} 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 {
|
} else {
|
||||||
return size + "B";
|
return size + "B";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user