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 7702b39374d16816a096a0b282c29249ca2cee00
Author: Clebert Suconic <clebertsuco...@apache.org>
AuthorDate: Mon Apr 8 16:23:07 2024 -0400

    ARTEMIS-4498 Adding internal column on address view
---
 .../artemis-plugin/src/main/webapp/plugin/js/components/addresses.js   | 3 +++
 .../activemq/artemis/core/management/impl/view/AddressField.java       | 3 ++-
 .../apache/activemq/artemis/core/management/impl/view/AddressView.java | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/addresses.js
 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/addresses.js
index 715b9b21d6..c0fc8be326 100644
--- 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/addresses.js
+++ 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/addresses.js
@@ -75,6 +75,7 @@ var Artemis;
            columns: [
                 {name: "ID", visible: true},
                 {name: "Name", visible: true},
+                {name: "Internal", visible: false},
                 {name: "Routing Types", visible: true},
                 {name: "Queue Count", visible: true}
            ]
@@ -103,6 +104,7 @@ var Artemis;
             fieldOptions: [
                 {id: 'id', name: 'ID'},
                 {id: 'name', name: 'Name'},
+                {id: 'internal', name: 'Internal'},
                 {id: 'routingTypes', name: 'Routing Types'},
                 {id: 'queueCount', name: 'Queue Count'}
             ],
@@ -151,6 +153,7 @@ var Artemis;
         ctrl.tableColumns = [
             { header: 'ID', itemField: 'id' },
             { header: 'Name', itemField: 'name' },
+            { header: 'Internal', itemField: 'internal' },
             { header: 'Routing Types', itemField: 'routingTypes' },
             { header: 'Queue Count', itemField: 'queueCount' , htmlTemplate: 
'addresses-anchor-column-template', colActionFn: (item) => 
selectQueues(item.idx) }
         ];
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressField.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressField.java
index 4f3667b6d6..ca46aadb62 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressField.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressField.java
@@ -24,7 +24,8 @@ public enum AddressField {
    NAME("name"),
    ROUTING_TYPES("routingTypes"),
    PRODUCER_ID("producerId"),
-   QUEUE_COUNT("queueCount");
+   QUEUE_COUNT("queueCount"),
+   INTERNAL("internal");
 
    private static final Map<String, AddressField> lookup = new 
TreeMap<>(String.CASE_INSENSITIVE_ORDER);
 
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
index 0964de5457..523450edd3 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
@@ -48,6 +48,7 @@ public class AddressView extends 
ActiveMQAbstractView<AddressInfo> {
       JsonObjectBuilder obj = JsonLoader.createObjectBuilder()
          .add(AddressField.ID.getName(), toString(address.getId()))
          .add(AddressField.NAME.getName(), toString(address.getName()))
+         .add(AddressField.INTERNAL.getName(), toString(address.isInternal()))
          .add(AddressField.ROUTING_TYPES.getName(), 
toString(address.getRoutingTypes()));
 
       try {
@@ -72,6 +73,8 @@ public class AddressView extends 
ActiveMQAbstractView<AddressInfo> {
             return address.getId();
          case NAME:
             return address.getName();
+         case INTERNAL:
+            return address.isInternal();
          case ROUTING_TYPES:
             return address.getRoutingTypes();
          case QUEUE_COUNT:

Reply via email to