You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "andytaylor (via GitHub)" <gi...@apache.org> on 2024/11/15 18:32:19 UTC

[PR] ARTEMIS-5131 - Add a button to copy messages [activemq-artemis-console]

andytaylor opened a new pull request, #35:
URL: https://github.com/apache/activemq-artemis-console/pull/35

   This will be disabled if the management method does not exist


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5131 - Add a button to copy messages [activemq-artemis-console]

Posted by "andytaylor (via GitHub)" <gi...@apache.org>.
andytaylor commented on code in PR #35:
URL: https://github.com/apache/activemq-artemis-console/pull/35#discussion_r1853653798


##########
artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx:
##########
@@ -425,7 +497,7 @@ export const MessagesTable: React.FunctionComponent<MessageProps> = props => {
           <Button key="save" variant="primary" onClick={onSave}>
             Save
           </Button>,
-          <Button key="close" variant="secondary" onClick={handleColumnsModalToggle}>
+          <Button key="cloButtonPropsse" variant="secondary" onClick={handleColumnsModalToggle}>

Review Comment:
   yes, I have fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5131 - Add a button to copy messages [activemq-artemis-console]

Posted by "brusdev (via GitHub)" <gi...@apache.org>.
brusdev merged PR #35:
URL: https://github.com/apache/activemq-artemis-console/pull/35


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5131 - Add a button to copy messages [activemq-artemis-console]

Posted by "brusdev (via GitHub)" <gi...@apache.org>.
brusdev commented on code in PR #35:
URL: https://github.com/apache/activemq-artemis-console/pull/35#discussion_r1853645786


##########
artemis-console-extension/artemis-extension/src/artemis-extension/artemis/messages/MessagesTable.tsx:
##########
@@ -425,7 +497,7 @@ export const MessagesTable: React.FunctionComponent<MessageProps> = props => {
           <Button key="save" variant="primary" onClick={onSave}>
             Save
           </Button>,
-          <Button key="close" variant="secondary" onClick={handleColumnsModalToggle}>
+          <Button key="cloButtonPropsse" variant="secondary" onClick={handleColumnsModalToggle}>

Review Comment:
   is `cloButtonPropsse` a typo?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5131 - Add a button to copy messages [activemq-artemis-console]

Posted by "andytaylor (via GitHub)" <gi...@apache.org>.
andytaylor commented on code in PR #35:
URL: https://github.com/apache/activemq-artemis-console/pull/35#discussion_r1853644823


##########
artemis-console-extension/artemis-extension/src/artemis-extension/artemis/artemis-service.ts:
##########
@@ -589,6 +595,20 @@ class ArtemisService {
     checkCanBrowseQueue = (queueMBean: MBeanNode ): boolean => {
         return (this.DEBUG_PRIVS && queueMBean?.hasInvokeRights(BROWSE_SIG)) ?? false;
     }
+
+    doesCopyMessageMethodExist = (broker: MBeanNode | undefined, queue: string): boolean => {
+        return this.doesMethodExist(broker, queue, COPY_MESSAGE_SIG);
+    }
+
+    doesMethodExist = (broker: MBeanNode | undefined, queue: string, method: string): boolean => {
+        if(broker) {
+            var queueMBean = broker.parent?.find(node => { 
+                return node.propertyList?.get('subcomponent') === 'queues' && node.name === queue 
+            })
+            return queueMBean?queueMBean.hasOperations(method): false;
+        }
+        return false;
+    }

Review Comment:
   nope that cant happen as its a 1 to 1 with address name and queue name



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5131 - Add a button to copy messages [activemq-artemis-console]

Posted by "lavocatt (via GitHub)" <gi...@apache.org>.
lavocatt commented on code in PR #35:
URL: https://github.com/apache/activemq-artemis-console/pull/35#discussion_r1853643629


##########
artemis-console-extension/artemis-extension/src/artemis-extension/artemis/artemis-service.ts:
##########
@@ -589,6 +595,20 @@ class ArtemisService {
     checkCanBrowseQueue = (queueMBean: MBeanNode ): boolean => {
         return (this.DEBUG_PRIVS && queueMBean?.hasInvokeRights(BROWSE_SIG)) ?? false;
     }
+
+    doesCopyMessageMethodExist = (broker: MBeanNode | undefined, queue: string): boolean => {
+        return this.doesMethodExist(broker, queue, COPY_MESSAGE_SIG);
+    }
+
+    doesMethodExist = (broker: MBeanNode | undefined, queue: string, method: string): boolean => {
+        if(broker) {
+            var queueMBean = broker.parent?.find(node => { 
+                return node.propertyList?.get('subcomponent') === 'queues' && node.name === queue 
+            })
+            return queueMBean?queueMBean.hasOperations(method): false;
+        }
+        return false;
+    }

Review Comment:
   Could there be a situation where there are several `queueMBean` validating the condition in the find? If so, I would change the find to a filter and try to find the operation in at least one of them.
   If not, ignore this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact