ARTEMIS-4498 Adding internal column on address view

This commit is contained in:
Clebert Suconic 2024-04-08 16:23:07 -04:00 committed by clebertsuconic
parent 51f39fc34d
commit 7702b39374
3 changed files with 8 additions and 1 deletions

View File

@ -75,6 +75,7 @@ var Artemis;
columns: [ columns: [
{name: "ID", visible: true}, {name: "ID", visible: true},
{name: "Name", visible: true}, {name: "Name", visible: true},
{name: "Internal", visible: false},
{name: "Routing Types", visible: true}, {name: "Routing Types", visible: true},
{name: "Queue Count", visible: true} {name: "Queue Count", visible: true}
] ]
@ -103,6 +104,7 @@ var Artemis;
fieldOptions: [ fieldOptions: [
{id: 'id', name: 'ID'}, {id: 'id', name: 'ID'},
{id: 'name', name: 'Name'}, {id: 'name', name: 'Name'},
{id: 'internal', name: 'Internal'},
{id: 'routingTypes', name: 'Routing Types'}, {id: 'routingTypes', name: 'Routing Types'},
{id: 'queueCount', name: 'Queue Count'} {id: 'queueCount', name: 'Queue Count'}
], ],
@ -151,6 +153,7 @@ var Artemis;
ctrl.tableColumns = [ ctrl.tableColumns = [
{ header: 'ID', itemField: 'id' }, { header: 'ID', itemField: 'id' },
{ header: 'Name', itemField: 'name' }, { header: 'Name', itemField: 'name' },
{ header: 'Internal', itemField: 'internal' },
{ header: 'Routing Types', itemField: 'routingTypes' }, { header: 'Routing Types', itemField: 'routingTypes' },
{ header: 'Queue Count', itemField: 'queueCount' , htmlTemplate: 'addresses-anchor-column-template', colActionFn: (item) => selectQueues(item.idx) } { header: 'Queue Count', itemField: 'queueCount' , htmlTemplate: 'addresses-anchor-column-template', colActionFn: (item) => selectQueues(item.idx) }
]; ];

View File

@ -24,7 +24,8 @@ public enum AddressField {
NAME("name"), NAME("name"),
ROUTING_TYPES("routingTypes"), ROUTING_TYPES("routingTypes"),
PRODUCER_ID("producerId"), PRODUCER_ID("producerId"),
QUEUE_COUNT("queueCount"); QUEUE_COUNT("queueCount"),
INTERNAL("internal");
private static final Map<String, AddressField> lookup = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); private static final Map<String, AddressField> lookup = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);

View File

@ -48,6 +48,7 @@ public class AddressView extends ActiveMQAbstractView<AddressInfo> {
JsonObjectBuilder obj = JsonLoader.createObjectBuilder() JsonObjectBuilder obj = JsonLoader.createObjectBuilder()
.add(AddressField.ID.getName(), toString(address.getId())) .add(AddressField.ID.getName(), toString(address.getId()))
.add(AddressField.NAME.getName(), toString(address.getName())) .add(AddressField.NAME.getName(), toString(address.getName()))
.add(AddressField.INTERNAL.getName(), toString(address.isInternal()))
.add(AddressField.ROUTING_TYPES.getName(), toString(address.getRoutingTypes())); .add(AddressField.ROUTING_TYPES.getName(), toString(address.getRoutingTypes()));
try { try {
@ -72,6 +73,8 @@ public class AddressView extends ActiveMQAbstractView<AddressInfo> {
return address.getId(); return address.getId();
case NAME: case NAME:
return address.getName(); return address.getName();
case INTERNAL:
return address.isInternal();
case ROUTING_TYPES: case ROUTING_TYPES:
return address.getRoutingTypes(); return address.getRoutingTypes();
case QUEUE_COUNT: case QUEUE_COUNT: