[
https://issues.apache.org/jira/browse/ARTEMIS-5395?focusedWorklogId=969530&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-969530
]
ASF GitHub Bot logged work on ARTEMIS-5395:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 13/May/25 13:47
Start Date: 13/May/25 13:47
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #85:
URL:
https://github.com/apache/activemq-artemis-console/pull/85#discussion_r2086843551
##########
artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/queues/QueuesView.tsx:
##########
@@ -99,6 +101,62 @@ export const QueuesView: React.FunctionComponent<Navigate>
= navigate => {
<MessageView currentMessage={currentMessage} back={back}/>
</>
}
+ <Modal aria-label='copy-message-modal'
+ variant={ModalVariant.medium}
+ isOpen={showHelpModal}
+ actions={[
+ <Button key="cancel" variant="secondary" onClick={() =>
setShowHelpModal(false)}>
+ Close
+ </Button>
+ ]}>
+ <TextContent>
+ <Text component={TextVariants.h1}>Using Filter Expressions</Text>
+ <Text component={TextVariants.h2}>Apache ActiveMQ Artemis provides
a powerful filter language based on a subset of the SQL 92 expression
syntax.</Text>
+ <Text>It is the same as the syntax used for JMS & Jakarta
Messaging selectors.
+ For documentation on JMS selector syntax please the JavaDoc for
javax.jms.Message or jakarta.jms.Message</Text>
+ <Text>A Filter will search for messages that have a matching
header.</Text>
+ <Text component={TextVariants.h3}>Filter Examples</Text>
+ <TextList component={TextListVariants.dl}>
+ <TextListItem component={TextListItemVariants.dt}>header =
'value'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the string value
<b>value</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header =
1</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the int, short,
long or double value <b>1</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header {'>'}
1</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has an int, short,
long or double value greater than <b>1</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header
{'<>'} 'value'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> exists and does not
equal <b>value</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header in
('value1', 'value2')</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> equals either
<b>value1</b> or <b>value2</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header1 =
'value1' AND header2 = 'value2'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header1</b> has the value
<b>value1</b> and the message header <b>header2</b> has the value
<b>value2</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header LIKE
'value%'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the pattern
matching value <b>value%</b> such as <b>value1</b>, <b>value2345</b>
etc</TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header LIKE
'value_'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the pattern
matching value <b>value_</b> such as <b>value1</b> but not
<b>value2345</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header is
null</TextListItem>
Review Comment:
```suggestion
<TextListItem component={TextListItemVariants.dt}>header IS
NULL</TextListItem>
```
##########
artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/queues/QueuesView.tsx:
##########
@@ -99,6 +101,62 @@ export const QueuesView: React.FunctionComponent<Navigate>
= navigate => {
<MessageView currentMessage={currentMessage} back={back}/>
</>
}
+ <Modal aria-label='copy-message-modal'
+ variant={ModalVariant.medium}
+ isOpen={showHelpModal}
+ actions={[
+ <Button key="cancel" variant="secondary" onClick={() =>
setShowHelpModal(false)}>
+ Close
+ </Button>
+ ]}>
+ <TextContent>
+ <Text component={TextVariants.h1}>Using Filter Expressions</Text>
+ <Text component={TextVariants.h2}>Apache ActiveMQ Artemis provides
a powerful filter language based on a subset of the SQL 92 expression
syntax.</Text>
+ <Text>It is the same as the syntax used for JMS & Jakarta
Messaging selectors.
+ For documentation on JMS selector syntax please the JavaDoc for
javax.jms.Message or jakarta.jms.Message</Text>
+ <Text>A Filter will search for messages that have a matching
header.</Text>
+ <Text component={TextVariants.h3}>Filter Examples</Text>
+ <TextList component={TextListVariants.dl}>
+ <TextListItem component={TextListItemVariants.dt}>header =
'value'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the string value
<b>value</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header =
1</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the int, short,
long or double value <b>1</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header {'>'}
1</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has an int, short,
long or double value greater than <b>1</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header
{'<>'} 'value'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> exists and does not
equal <b>value</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header in
('value1', 'value2')</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> equals either
<b>value1</b> or <b>value2</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header1 =
'value1' AND header2 = 'value2'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header1</b> has the value
<b>value1</b> and the message header <b>header2</b> has the value
<b>value2</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header LIKE
'value%'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the pattern
matching value <b>value%</b> such as <b>value1</b>, <b>value2345</b>
etc</TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header LIKE
'value_'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the pattern
matching value <b>value_</b> such as <b>value1</b> but not
<b>value2345</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header is
null</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has a null value or
does not exist</TextListItem>
+ </TextList>
+ <Text> The following pre defined identifiers can also be used to
filter messages </Text>
+ <TextList component={TextListVariants.dl}>
+ <TextListItem
component={TextListItemVariants.dt}>AMQUserID</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}>The ID set
by the user when the message is sent. This is analogous to the
<b>JMSMessageID</b> for JMS-based clients.</TextListItem>
+ <TextListItem
component={TextListItemVariants.dt}>AMQAddress</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}>The group ID
used when sending the message.</TextListItem>
Review Comment:
Description mismatch
##########
artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/queues/QueuesView.tsx:
##########
@@ -99,6 +101,62 @@ export const QueuesView: React.FunctionComponent<Navigate>
= navigate => {
<MessageView currentMessage={currentMessage} back={back}/>
</>
}
+ <Modal aria-label='copy-message-modal'
+ variant={ModalVariant.medium}
+ isOpen={showHelpModal}
+ actions={[
+ <Button key="cancel" variant="secondary" onClick={() =>
setShowHelpModal(false)}>
+ Close
+ </Button>
+ ]}>
+ <TextContent>
+ <Text component={TextVariants.h1}>Using Filter Expressions</Text>
+ <Text component={TextVariants.h2}>Apache ActiveMQ Artemis provides
a powerful filter language based on a subset of the SQL 92 expression
syntax.</Text>
+ <Text>It is the same as the syntax used for JMS & Jakarta
Messaging selectors.
+ For documentation on JMS selector syntax please the JavaDoc for
javax.jms.Message or jakarta.jms.Message</Text>
+ <Text>A Filter will search for messages that have a matching
header.</Text>
+ <Text component={TextVariants.h3}>Filter Examples</Text>
+ <TextList component={TextListVariants.dl}>
+ <TextListItem component={TextListItemVariants.dt}>header =
'value'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the string value
<b>value</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header =
1</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the int, short,
long or double value <b>1</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header {'>'}
1</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has an int, short,
long or double value greater than <b>1</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header
{'<>'} 'value'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> exists and does not
equal <b>value</b></TextListItem>
+ <TextListItem component={TextListItemVariants.dt}>header in
('value1', 'value2')</TextListItem>
Review Comment:
```suggestion
<TextListItem component={TextListItemVariants.dt}>header IN
('value1', 'value2')</TextListItem>
```
##########
artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/queues/QueuesView.tsx:
##########
@@ -99,6 +101,62 @@ export const QueuesView: React.FunctionComponent<Navigate>
= navigate => {
<MessageView currentMessage={currentMessage} back={back}/>
</>
}
+ <Modal aria-label='copy-message-modal'
+ variant={ModalVariant.medium}
+ isOpen={showHelpModal}
+ actions={[
+ <Button key="cancel" variant="secondary" onClick={() =>
setShowHelpModal(false)}>
+ Close
+ </Button>
+ ]}>
+ <TextContent>
+ <Text component={TextVariants.h1}>Using Filter Expressions</Text>
+ <Text component={TextVariants.h2}>Apache ActiveMQ Artemis provides
a powerful filter language based on a subset of the SQL 92 expression
syntax.</Text>
+ <Text>It is the same as the syntax used for JMS & Jakarta
Messaging selectors.
+ For documentation on JMS selector syntax please the JavaDoc for
javax.jms.Message or jakarta.jms.Message</Text>
Review Comment:
```suggestion
For documentation on JMS selector syntax please consult the
JavaDoc for javax.jms.Message or jakarta.jms.Message</Text>
```
Might also be worth linking to it, e.g. currently for the latter:
https://jakarta.ee/specifications/messaging/3.1/apidocs/jakarta.messaging/jakarta/jms/message
##########
artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/queues/QueuesView.tsx:
##########
@@ -99,6 +101,62 @@ export const QueuesView: React.FunctionComponent<Navigate>
= navigate => {
<MessageView currentMessage={currentMessage} back={back}/>
</>
}
+ <Modal aria-label='copy-message-modal'
+ variant={ModalVariant.medium}
+ isOpen={showHelpModal}
+ actions={[
+ <Button key="cancel" variant="secondary" onClick={() =>
setShowHelpModal(false)}>
+ Close
+ </Button>
+ ]}>
+ <TextContent>
+ <Text component={TextVariants.h1}>Using Filter Expressions</Text>
+ <Text component={TextVariants.h2}>Apache ActiveMQ Artemis provides
a powerful filter language based on a subset of the SQL 92 expression
syntax.</Text>
+ <Text>It is the same as the syntax used for JMS & Jakarta
Messaging selectors.
+ For documentation on JMS selector syntax please the JavaDoc for
javax.jms.Message or jakarta.jms.Message</Text>
+ <Text>A Filter will search for messages that have a matching
header.</Text>
+ <Text component={TextVariants.h3}>Filter Examples</Text>
+ <TextList component={TextListVariants.dl}>
+ <TextListItem component={TextListItemVariants.dt}>header =
'value'</TextListItem>
+ <TextListItem component={TextListItemVariants.dd}> This will
return any message where the message header <b>header</b> has the string value
<b>value</b></TextListItem>
Review Comment:
Saying the syntax is the same as (possibly say 'similar to', as it is not
actually exactly the same?) JMS/Jakarta Messaging selectors and then
immediately saying filters matches 'headers' possibly has potential to confuse
given matching will as/more often be done against JMS _properties_; only a
handful of JMS headers are allowed to be used in selectors, most of which arent
mentioned here.
Issue Time Tracking
-------------------
Worklog Id: (was: 969530)
Time Spent: 0.5h (was: 20m)
> Provide documentation for filtering when browsing messages
> ----------------------------------------------------------
>
> Key: ARTEMIS-5395
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5395
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Web Console
> Reporter: Justin Bertram
> Assignee: Andy Taylor
> Priority: Major
> Labels: pull-request-available
> Fix For: console-1.2.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> When browsing messages via the web console users can filter messages. A valid
> filter requires a specific syntax as well as specific property names to
> match messages. It would be useful to have some documentation directly on the
> browsing tab which explained this perhaps with some examples and table to
> match the column display names to the actual underlying property name.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact