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:10 UTC

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

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});