diff --git a/src/app/Topology/Entity/utils.tsx b/src/app/Topology/Entity/utils.tsx index cc1ee4313..1da04e3c5 100644 --- a/src/app/Topology/Entity/utils.tsx +++ b/src/app/Topology/Entity/utils.tsx @@ -275,6 +275,9 @@ export const getExpandedResourceDetails = ( export const getConnectUrlFromEvent = (event: NotificationMessage): string | undefined => { return event.message.target || event.message.targetId; }; +export const getJvmIdFromEvent = (event: NotificationMessage): string | undefined => { + return event.message.jvmId; +}; export const useResources = ( targetNode: TargetNode, @@ -345,8 +348,13 @@ export const useResources = ( ) .subscribe(([targetNode, event]) => { const extractedUrl = getConnectUrlFromEvent(event); + const extractedJvmId = getJvmIdFromEvent(event); const isOwned = isOwnedResource(resourceType); - if (!isOwned || (extractedUrl && extractedUrl === targetNode.target.connectUrl)) { + if ( + !isOwned || + (extractedUrl && extractedUrl === targetNode.target.connectUrl) || + (extractedJvmId && extractedJvmId === targetNode.target.jvmId) + ) { setLoading(true); setResources((old) => { // Avoid accessing state directly, which