Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions artemis-console-extension/artemis-extension/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"replace-version": "replace __PACKAGE_VERSION_PLACEHOLDER__ $npm_package_version ./build/static/js -r --include=\"*.js\""
},
"dependencies": {
"@hawtio/react": "^1.11.2",
"@hawtio/react": "^1.11.4",
"@monaco-editor/react": "^4.6.0",
"@patternfly/react-charts": "^7.4.9",
"@patternfly/react-code-editor": "^5.4.18",
Expand All @@ -28,7 +28,7 @@
"react-router-dom": "^6.30.1"
},
"devDependencies": {
"@hawtio/backend-middleware": "^1.0.7",
"@hawtio/backend-middleware": "^1.0.8",
"@swc/core": "^1.14.0",
"@types/react": "^18.3.23",
"body-parser": "^2.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ module.exports = (webpackEnv, args) => {
}
})

middlewares.push({
middlewares.unshift({
name: 'hawtio-backend',
path: '/console/proxy',
middleware: hawtioBackend({
Expand Down
2 changes: 1 addition & 1 deletion artemis-console-extension/artemis-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@babel/runtime": "7.28.2",
"@typescript-eslint/eslint-plugin": "8.39.0",
"@typescript-eslint/parser": "8.39.0",
"axios": "^1.11.0",
"axios": "^1.13.2",
"braces": "3.0.3",
"caniuse-lite": "1.0.30001731",
"cookie": "1.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"xml-formatter": "^3.6.7"
},
"devDependencies": {
"@hawtio/react": "^1.11.2",
"@hawtio/react": "^1.11.4",
"@monaco-editor/react": "^4.6.0",
"@patternfly/react-charts": "^7.4.9",
"@patternfly/react-code-editor": "^5.4.18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { eventService } from '@hawtio/react';
import { eventService, jolokiaService } from '@hawtio/react';
import { Text } from '@patternfly/react-core';
import { useEffect, useState } from 'react';
import { artemisService } from './artemis-service';
Expand All @@ -29,11 +29,8 @@ export const ArtemisHeader: React.FunctionComponent = () => {
.then((brokerName) => {
setBrokerHeader(brokerName ? brokerName : '');
})
.catch((error: string) => {
eventService.notify({
type: 'warning',
message: error,
})
.catch((error) => {
eventService.notify({type: 'warning', message: jolokiaService.errorMessage(error) })
});
},[])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { IAction } from '@patternfly/react-table';
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import { Button, Icon, Modal, ModalVariant, TextContent, Text } from '@patternfly/react-core';
import { CreateQueue } from '../queues/CreateQueue';
import { Attributes, eventService, Operations, workspace } from '@hawtio/react';
import { Attributes, eventService, jolokiaService, Operations, workspace } from '@hawtio/react';
import { ArtemisContext } from '../context';
import { CreateAddress } from './CreateAddress';
import { SendMessage } from '../messages/SendMessage';
Expand Down Expand Up @@ -65,7 +65,10 @@ export const AddressesTable: React.FunctionComponent<Navigate> = (navigate) => {
];

const listAddresses = async (page: number, perPage: number, activeSort: ActiveSort, filter: Filter): Promise<any> => {
const response = await artemisService.getAddresses(page, perPage, activeSort, filter);
const response = await artemisService.getAddresses(page, perPage, activeSort, filter).catch(error => {
eventService.notify({ type: 'warning', message: jolokiaService.errorMessage(error)})
return JSON.stringify({ data: [], count: 0 })
})
const data = JSON.parse(response);
return data;
}
Expand Down Expand Up @@ -179,12 +182,9 @@ export const AddressesTable: React.FunctionComponent<Navigate> = (navigate) => {
message: "Address Successfully Deleted",
})
})
.catch((error: string) => {
.catch((error) => {
setShowDeleteDialog(false);
eventService.notify({
type: 'warning',
message: error,
})
eventService.notify({type: 'warning', message: jolokiaService.errorMessage(error) })
})
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
} from '@patternfly/react-core';
import React, {useState} from 'react'
import {artemisService} from '../artemis-service';
import {eventService} from '@hawtio/react';
import { eventService, jolokiaService } from '@hawtio/react';
import {OutlinedQuestionCircleIcon} from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon';

interface CreateAddressProps {
Expand All @@ -55,14 +55,11 @@ export const CreateAddress: React.FunctionComponent<CreateAddressProps> = (creat
}
eventService.notify({
type: 'success',
message: "Address Succcesfully Created",
message: "Address Successfully Created",
})
})
.catch((error: string) => {
eventService.notify({
type: 'warning',
message: error,
})
.catch((error) => {
eventService.notify({type: 'warning', message: jolokiaService.errorMessage(error) })
})
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { ActionGroup, Text, Button, Form, Icon, Modal, ModalVariant, TextContent, Title, Popover } from '@patternfly/react-core';
import React, { useState } from 'react'
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import { eventService, workspace } from '@hawtio/react';
import { eventService, jolokiaService, workspace } from '@hawtio/react';
import { artemisService } from '../artemis-service';
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon';

Expand All @@ -33,17 +33,15 @@ export const DeleteAddress: React.FunctionComponent<DeleteAddressProps> = (props
.then(() => {
setShowDeleteModal(false);

workspace.refreshTree(); eventService.notify({
workspace.refreshTree();
eventService.notify({
type: 'success',
message: "Address Successfully Deleted",
})
})
.catch((error: string) => {
.catch((error) => {
setShowDeleteModal(false);
eventService.notify({
type: 'warning',
message: error,
})
eventService.notify({type: 'warning', message: jolokiaService.errorMessage(error) })
})
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import { beforeAll, describe, expect, test } from "@jest/globals"
import { artemisService } from "./artemis-service";
import { artemisService, parseMBeanName } from "./artemis-service";
import { SortDirection } from './table/ArtemisTable'
import { userService } from '@hawtio/react'

Expand All @@ -41,4 +41,13 @@ describe("Artemis Service basic tests", () => {
await expect(addresses).resolves.toContain("DLQ");
})

test("Splitting ObjectNames", () => {
const mbean = "org.apache.activemq.artemis:broker=\"0.0.0.0:61616\",component=acceptors,filter=\"x,y,z=a\",name=amqp"
const parsed = parseMBeanName(mbean)
expect(parsed.domain).toEqual("org.apache.activemq.artemis")
expect(parsed.properties["broker"]).toEqual("\"0.0.0.0:61616\"")
expect(parsed.properties["filter"]).toEqual("\"x,y,z=a\"")
expect(parsed.properties["name"]).toEqual("amqp")
})

})
Loading