From c9f250627f386a76bbbb9629e4980f3a4d4c6022 Mon Sep 17 00:00:00 2001 From: GChuf Date: Tue, 18 Nov 2025 22:56:11 +0100 Subject: [PATCH] ARTEMIS-5742: Implement readSpecifiedAttributes method --- .../artemis-console-plugin/src/artemis-service.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-service.ts b/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-service.ts index 084f2dd..ea8c665 100644 --- a/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-service.ts +++ b/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-service.ts @@ -166,6 +166,17 @@ const MS_PER_HOUR = 60 * MS_PER_MIN; const MS_PER_DAY = 24 * MS_PER_HOUR; const typeLabels = ["DEFAULT", "1", "object", "text", "bytes", "map", "stream", "embedded"]; +const jolokiaAttributes = [ + "Name", + "NodeID", + "Version", + "Started", + "Uptime", + "GlobalMaxSize", + "AddressMemoryUsage", + "HAPolicy" +]; + /** * Main Artemis service that manages Broker information and topology. Needs properly configured `jolokiaService` * from `@hawtio/react` which may require authenticated user. @@ -231,7 +242,7 @@ class ArtemisService { return } - const response = await jolokiaService.readAttributes(brokerObjectName).catch(e => { + const response = await jolokiaService.readSpecifiedAttributes(brokerObjectName, jolokiaAttributes).catch(e => { // this is the best (as of Nov 2025) way to handle problems when fetching attributes with RBAC enabled eventService.notify({type: 'warning', message: jolokiaService.errorMessage(e) }) return null @@ -861,4 +872,4 @@ export function isValid(value: any): { valid: boolean, message: string | null } return { valid: true, message: null } } -export const artemisService = new ArtemisService() \ No newline at end of file +export const artemisService = new ArtemisService()