You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2022/05/23 17:10:58 UTC

[activemq-artemis] branch main updated: ARTEMIS-3821 provide readable version of absoluteExpiryTime (and more)

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

jbertram 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 14d20895ad ARTEMIS-3821 provide readable version of absoluteExpiryTime (and more)
     new e362f63607 This closes #4069
14d20895ad is described below

commit 14d20895ad113aea1ed1372714f908e4727b3060
Author: Erwin Dondorp <er...@cgi.com>
AuthorDate: Mon May 9 01:10:18 2022 +0200

    ARTEMIS-3821 provide readable version of absoluteExpiryTime (and more)
---
 .../src/main/webapp/plugin/js/components/browse.js | 32 +++++++++++++++++++---
 1 file changed, 28 insertions(+), 4 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 f32b2f66a3..3bc8449efd 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
@@ -511,7 +511,15 @@ var Artemis;
             if (isNaN(type) || typeof type !== "number") {
                 return type;
             }
-            return type > -1 && type < 8 ? typeLabels[type] : type
+            return type > -1 && type < typeLabels.length ? typeLabels[type] : type
+        }
+
+        var jmsTypeLabels = ["message", "object", "map", "bytes", "stream", "text"];
+        function formatJmsType(type) {
+            if (isNaN(type) || typeof type !== "number") {
+                return type;
+            }
+            return type > -1 && type < jmsTypeLabels.length ? jmsTypeLabels[type] : type
         }
 
         var bindingTypeLabels = ["local-queue", "remote-queue", "divert"];
@@ -519,7 +527,15 @@ var Artemis;
             if (isNaN(type) || typeof type !== "number") {
                 return type;
             }
-            return type > -1 && type < 3 ? bindingTypeLabels[type] : type
+            return type > -1 && type < bindingTypeLabels.length ? bindingTypeLabels[type] : type
+        }
+
+        var destTypeLabels = ["queue", "topic", "temp-queue", "temp-topic"];
+        function formatDestType(type) {
+            if (isNaN(type) || typeof type !== "number") {
+                return type;
+            }
+            return type > -1 && type < destTypeLabels.length ? destTypeLabels[type] : type
         }
 
         ctrl.refresh = function() {
@@ -832,7 +848,7 @@ var Artemis;
             if (isNaN(enc) || typeof enc !== "number") {
                 return enc;
             }
-            return enc > -1 && enc < 9 ? amqpEncodingLabels[enc] : enc;
+            return enc > -1 && enc < amqpEncodingLabels.length ? amqpEncodingLabels[enc] : enc;
         }
 
         var routingTypes = ["multicast", "anycast"];
@@ -840,7 +856,7 @@ var Artemis;
             if (isNaN(rt) || typeof rt !== "number") {
                 return enc;
             }
-            return rt > -1 && rt < 2 ? routingTypes[rt] : rt;
+            return rt > -1 && rt < routingTypes.length ? routingTypes[rt] : rt;
         }
 
         function createProperties(message) {
@@ -864,8 +880,16 @@ var Artemis;
                             v2 += " (" + formatRoutingType(v2) + ")";
                         } else if(k2 === "extraProperties._AMQ_ACTUAL_EXPIRY") {
                             v2 += " (" + formatTimestamp(v2) + ")";
+                        } else if(k2 === "messageAnnotations.x-opt-jms-dest") {
+                            v2 += " (" + formatDestType(v2) + ")";
+                        } else if(k2 === "messageAnnotations.x-opt-jms-reply-to") {
+                            v2 += " (" + formatDestType(v2) + ")";
+                        } else if(k2 === "messageAnnotations.x-opt-jms-msg-type") {
+                            v2 += " (" + formatJmsType(v2) + ")";
                         } else if(k2 === "messageAnnotations.x-opt-ACTUAL-EXPIRY") {
                             v2 += " (" + formatTimestamp(v2) + ")";
+                        } else if(k2 === "properties.absoluteExpiryTime") {
+                            v2 += " (" + formatTimestamp(v2) + ")";
                         } else if(k2 === "properties.creationTime") {
                             v2 += " (" + formatTimestamp(v2) + ")";
                         } else if(k2 === "__HDR_BROKER_IN_TIME") {