This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 9b45055  ARTEMIS-3621 show 'zero' timestamp as 'N/A' (instead of 
1970...)
     new b4b435f  This closes #3890
9b45055 is described below

commit 9b450558d9cb0b3d4974be305608936432900a7e
Author: Erwin Dondorp <[email protected]>
AuthorDate: Fri Dec 24 17:09:53 2021 +0100

    ARTEMIS-3621 show 'zero' timestamp as 'N/A' (instead of 1970...)
---
 .../artemis-plugin/src/main/webapp/plugin/js/components/browse.js  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
index 71f0d60..e799bdc 100644
--- 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
+++ 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
@@ -481,7 +481,7 @@ var Artemis;
                    // "HH:mm:ss ago"
                    return hours + ":" + mins + ":" + secs + " ago";
                 }
-                // "in HH:mm:ss ago"
+                // "in HH:mm:ss"
                 return "in " + hours + ":" + mins + ":" + secs;
              }
              return formatTimestamp(timestamp);
@@ -491,6 +491,9 @@ var Artemis;
              if (isNaN(timestamp) || typeof timestamp !== "number") {
                 return timestamp;
              }
+             if (timestamp === 0) {
+                return "N/A";
+             }
              var d = new Date(timestamp);
              // "yyyy-MM-dd HH:mm:ss"
              //add 1 to month as getmonth returns the position not the actual 
month
@@ -526,7 +529,7 @@ var Artemis;
         }
 
         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 < 1048576) return (bytes / 1024).toFixed(2) + " KB";
             if(bytes < 1073741824) return (bytes / 1048576).toFixed(2) + " MB";

Reply via email to