You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2021/12/14 13:55:09 UTC

[activemq-artemis] branch main updated (fac7f16 -> de7d141)

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

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


    from fac7f16  ARTEMIS-3601 expose acceptors via management
     new 51fd26a  ARTEMIS-3570 also decode _AMQ_Binding_Type
     new 02e19e6  ARTEMIS-3570 decode more timestamp properties
     new dcd993d  ARTEMIS-3570 do not try to use header fields when they are not even numeric
     new de7d141  ARTEMIS-3570 also decode routing-types

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/webapp/plugin/js/components/browse.js | 50 +++++++++++++++++-----
 1 file changed, 40 insertions(+), 10 deletions(-)

[activemq-artemis] 03/04: ARTEMIS-3570 do not try to use header fields when they are not even numeric

Posted by cl...@apache.org.
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

commit dcd993d8e40de1ffe0d03e259afd021d37446e57
Author: Erwin Dondorp <er...@cgi.com>
AuthorDate: Sun Nov 14 22:50:15 2021 +0100

    ARTEMIS-3570 do not try to use header fields when they are not even numeric
---
 .../src/main/webapp/plugin/js/components/browse.js           | 12 ++++++------
 1 file changed, 6 insertions(+), 6 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 30dbbc2..8527b79 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
@@ -465,7 +465,7 @@ var Artemis;
         }
 
         function formatExpires(timestamp) {
-             if (isNaN(timestamp)) {
+             if (isNaN(timestamp) || typeof timestamp !== "number") {
                 return timestamp;
              }
              if (timestamp == 0) {
@@ -488,7 +488,7 @@ var Artemis;
           }
 
           function formatTimestamp(timestamp) {
-             if (isNaN(timestamp)) {
+             if (isNaN(timestamp) || typeof timestamp !== "number") {
                 return timestamp;
              }
              var d = new Date(timestamp);
@@ -499,7 +499,7 @@ var Artemis;
 
         var typeLabels = ["default", "1", "object", "text", "bytes", "map", "stream", "embedded"];
         function formatType(type) {
-            if (isNaN(type)) {
+            if (isNaN(type) || typeof type !== "number") {
                 return type;
             }
             return type > -1 && type < 8 ? typeLabels[type] : type
@@ -507,7 +507,7 @@ var Artemis;
 
         var bindingTypeLabels = ["local-queue", "remote-queue", "divert"];
         function formatBindingType(type) {
-            if (isNaN(type)) {
+            if (isNaN(type) || typeof type !== "number") {
                 return type;
             }
             return type > -1 && type < 3 ? bindingTypeLabels[type] : type
@@ -526,7 +526,7 @@ var Artemis;
         }
 
         function formatPersistentSize(bytes) {
-            if(isNaN(bytes) || 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";
@@ -820,7 +820,7 @@ var Artemis;
             "amqp-unknown", "amqp-null", "amqp-data", "amqp-sequence", "amqp-value-null",
             "amqp-value-string", "amqp-value-binary", "amqp-value-map", "amqp-value-list"];
         function formatAmqpEncoding(enc) {
-            if (isNaN(enc)) {
+            if (isNaN(enc) || typeof enc !== "number") {
                 return enc;
             }
             return enc > -1 && enc < 9 ? amqpEncodingLabels[enc] : enc;

[activemq-artemis] 04/04: ARTEMIS-3570 also decode routing-types

Posted by cl...@apache.org.
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

commit de7d1413972fc92cc2f536866b86eec54bd52d14
Author: Erwin Dondorp <er...@cgi.com>
AuthorDate: Wed Dec 1 10:17:15 2021 +0100

    ARTEMIS-3570 also decode routing-types
---
 .../src/main/webapp/plugin/js/components/browse.js           | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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 8527b79..71f0d60 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
@@ -826,6 +826,14 @@ var Artemis;
             return enc > -1 && enc < 9 ? amqpEncodingLabels[enc] : enc;
         }
 
+        var routingTypes = ["multicast", "anycast"];
+        function formatRoutingType(rt) {
+            if (isNaN(rt) || typeof rt !== "number") {
+                return enc;
+            }
+            return rt > -1 && rt < 2 ? routingTypes[rt] : rt;
+        }
+
         function createProperties(message) {
             var properties = [];
             angular.forEach(message, function (value, key) {
@@ -839,6 +847,10 @@ var Artemis;
                             v2 += " (" + formatAmqpEncoding(v2) + ")";
                         } else if(k2 === "_AMQ_NotifTimestamp") {
                             v2 += " (" + formatTimestamp(v2) + ")";
+                        } else if(k2 === "_AMQ_ROUTING_TYPE") {
+                            v2 += " (" + formatRoutingType(v2) + ")";
+                        } else if(k2 === "_AMQ_ORIG_ROUTING_TYPE") {
+                            v2 += " (" + formatRoutingType(v2) + ")";
                         } else if(k2 === "extraProperties._AMQ_ACTUAL_EXPIRY") {
                             v2 += " (" + formatTimestamp(v2) + ")";
                         } else if(k2 === "messageAnnotations.x-opt-ACTUAL-EXPIRY") {

[activemq-artemis] 02/04: ARTEMIS-3570 decode more timestamp properties

Posted by cl...@apache.org.
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

commit 02e19e6531942e3217cacaa89d1de191edeb6093
Author: Erwin Dondorp <er...@cgi.com>
AuthorDate: Tue Oct 12 22:57:31 2021 +0200

    ARTEMIS-3570 decode more timestamp properties
---
 .../src/main/webapp/plugin/js/components/browse.js | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 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 7db201c..30dbbc2 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
@@ -817,8 +817,8 @@ var Artemis;
 
 
         var amqpEncodingLabels = [
-			"amqp-unknown", "amqp-null", "amqp-data", "amqp-sequence", "amqp-value-null",
-			"amqp-value-string", "amqp-value-binary", "amqp-value-map", "amqp-value-list"];
+            "amqp-unknown", "amqp-null", "amqp-data", "amqp-sequence", "amqp-value-null",
+            "amqp-value-string", "amqp-value-binary", "amqp-value-map", "amqp-value-list"];
         function formatAmqpEncoding(enc) {
             if (isNaN(enc)) {
                 return enc;
@@ -833,11 +833,19 @@ var Artemis;
                     Artemis.log.debug("key=" + key + " value=" + value);
                     angular.forEach(value, function (v2, k2) {
                     Artemis.log.debug("key=" + k2 + " value=" + v2);
-						if(k2 === "_AMQ_Binding_Type") {
-							v2 += " (" + formatBindingType(v2) + ")";
-						} else if(k2 === "JMS_AMQP_ORIGINAL_ENCODING") {
-							v2 += " (" + formatAmqpEncoding(v2) + ")";
-						}
+                        if(k2 === "_AMQ_Binding_Type") {
+                            v2 += " (" + formatBindingType(v2) + ")";
+                        } else if(k2 === "JMS_AMQP_ORIGINAL_ENCODING") {
+                            v2 += " (" + formatAmqpEncoding(v2) + ")";
+                        } else if(k2 === "_AMQ_NotifTimestamp") {
+                            v2 += " (" + formatTimestamp(v2) + ")";
+                        } else if(k2 === "extraProperties._AMQ_ACTUAL_EXPIRY") {
+                            v2 += " (" + formatTimestamp(v2) + ")";
+                        } else if(k2 === "messageAnnotations.x-opt-ACTUAL-EXPIRY") {
+                            v2 += " (" + formatTimestamp(v2) + ")";
+                        } else if(k2 === "properties.creationTime") {
+                            v2 += " (" + formatTimestamp(v2) + ")";
+                        }
                         properties.push({key: k2, value: v2});
                     });
                 }

[activemq-artemis] 01/04: ARTEMIS-3570 also decode _AMQ_Binding_Type

Posted by cl...@apache.org.
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

commit 51fd26a22c2182be589dc07f028a5ebe4d29202c
Author: Erwin Dondorp <er...@cgi.com>
AuthorDate: Tue Oct 12 22:55:14 2021 +0200

    ARTEMIS-3570 also decode _AMQ_Binding_Type
---
 .../src/main/webapp/plugin/js/components/browse.js           | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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 e046fff..7db201c 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
@@ -505,6 +505,14 @@ var Artemis;
             return type > -1 && type < 8 ? typeLabels[type] : type
         }
 
+        var bindingTypeLabels = ["local-queue", "remote-queue", "divert"];
+        function formatBindingType(type) {
+            if (isNaN(type)) {
+                return type;
+            }
+            return type > -1 && type < 3 ? bindingTypeLabels[type] : type
+        }
+
         ctrl.refresh = function() {
             Artemis.log.debug(ctrl.filter)
             //if refreshing always return to the first page
@@ -825,7 +833,9 @@ var Artemis;
                     Artemis.log.debug("key=" + key + " value=" + value);
                     angular.forEach(value, function (v2, k2) {
                     Artemis.log.debug("key=" + k2 + " value=" + v2);
-						if(k2 === "JMS_AMQP_ORIGINAL_ENCODING") {
+						if(k2 === "_AMQ_Binding_Type") {
+							v2 += " (" + formatBindingType(v2) + ")";
+						} else if(k2 === "JMS_AMQP_ORIGINAL_ENCODING") {
 							v2 += " (" + formatAmqpEncoding(v2) + ")";
 						}
                         properties.push({key: k2, value: v2});