Compare commits
2 Commits
5d82f3ecfe
...
9cd9274e99
| Author | SHA1 | Date | |
|---|---|---|---|
| 9cd9274e99 | |||
| 26a4623aa8 |
@@ -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);
|
||||||
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) {
|
public String getStatus(String status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user