Merge pull request '학습데이터 목록 파일 단위 MB 나오게 하기' (#85) from feat/training_260202 into develop
Reviewed-on: #85
This commit was merged in pull request #85.
This commit is contained in:
@@ -77,9 +77,16 @@ public class DatasetDto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getTotalSize(Long totalSize) {
|
public String getTotalSize(Long totalSize) {
|
||||||
if (totalSize == null) return "0G";
|
if (totalSize == null || totalSize <= 0) return "0M";
|
||||||
|
|
||||||
double giga = totalSize / (1024.0 * 1024 * 1024);
|
double giga = totalSize / (1024.0 * 1024 * 1024);
|
||||||
|
|
||||||
|
if (giga >= 1) {
|
||||||
return String.format("%.2fG", giga);
|
return String.format("%.2fG", giga);
|
||||||
|
} else {
|
||||||
|
double mega = totalSize / (1024.0 * 1024);
|
||||||
|
return String.format("%.2fM", mega);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatus(String status) {
|
public String getStatus(String status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user