2 Commits

View File

@@ -77,9 +77,16 @@ public class DatasetDto {
}
public String getTotalSize(Long totalSize) {
if (totalSize == null) return "0G";
if (totalSize == null || totalSize <= 0) return "0M";
double giga = totalSize / (1024.0 * 1024 * 1024);
return String.format("%.2fG", giga);
if (giga >= 1) {
return String.format("%.2fG", giga);
} else {
double mega = totalSize / (1024.0 * 1024);
return String.format("%.2fM", mega);
}
}
public String getStatus(String status) {