This closes #3890
This commit is contained in:
commit
b4b435f21a
|
@ -481,7 +481,7 @@ var Artemis;
|
||||||
// "HH:mm:ss ago"
|
// "HH:mm:ss ago"
|
||||||
return hours + ":" + mins + ":" + secs + " ago";
|
return hours + ":" + mins + ":" + secs + " ago";
|
||||||
}
|
}
|
||||||
// "in HH:mm:ss ago"
|
// "in HH:mm:ss"
|
||||||
return "in " + hours + ":" + mins + ":" + secs;
|
return "in " + hours + ":" + mins + ":" + secs;
|
||||||
}
|
}
|
||||||
return formatTimestamp(timestamp);
|
return formatTimestamp(timestamp);
|
||||||
|
@ -491,6 +491,9 @@ var Artemis;
|
||||||
if (isNaN(timestamp) || typeof timestamp !== "number") {
|
if (isNaN(timestamp) || typeof timestamp !== "number") {
|
||||||
return timestamp;
|
return timestamp;
|
||||||
}
|
}
|
||||||
|
if (timestamp === 0) {
|
||||||
|
return "N/A";
|
||||||
|
}
|
||||||
var d = new Date(timestamp);
|
var d = new Date(timestamp);
|
||||||
// "yyyy-MM-dd HH:mm:ss"
|
// "yyyy-MM-dd HH:mm:ss"
|
||||||
//add 1 to month as getmonth returns the position not the actual month
|
//add 1 to month as getmonth returns the position not the actual month
|
||||||
|
@ -526,7 +529,7 @@ var Artemis;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatPersistentSize(bytes) {
|
function formatPersistentSize(bytes) {
|
||||||
if(isNaN(bytes) || typeof bytes !== "number" || bytes < 0) return "n/a";
|
if(isNaN(bytes) || typeof bytes !== "number" || bytes < 0) return "N/A";
|
||||||
if(bytes < 10240) return bytes.toLocaleString() + " Bytes";
|
if(bytes < 10240) return bytes.toLocaleString() + " Bytes";
|
||||||
if(bytes < 1048576) return (bytes / 1024).toFixed(2) + " KB";
|
if(bytes < 1048576) return (bytes / 1024).toFixed(2) + " KB";
|
||||||
if(bytes < 1073741824) return (bytes / 1048576).toFixed(2) + " MB";
|
if(bytes < 1073741824) return (bytes / 1048576).toFixed(2) + " MB";
|
||||||
|
|
Loading…
Reference in New Issue