[jira] [Comment Edited] (QPID-7382) Message dialogue tries to inline the text of a text message content regardless of the its length
[ https://issues.apache.org/jira/browse/QPID-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15493391#comment-15493391 ] Alex Rudyy edited comment on QPID-7382 at 9/15/16 2:02 PM: --- The changes look good to me. However, one thing caught my attention is that the same disposition file name is used for limited and unlimited message content. Potentially, that might cause confusion when only partial message content is requested and saved but user might mistaken it for a full content. I do not think that it is an issue as such. The changes are good to port into 6.0.x branch was (Author: alex.rufous): The changes look good to me. However, one thing caught my attention is that the same disposition file name is used for limited and unlimited message content. Potentially, that might cause confusion when only partial message content is requested and saved but user might mistaken it for a full content. I do not think that it is an issue as such. Thus. closing the JIRA > Message dialogue tries to inline the text of a text message content > regardless of the its length > > > Key: QPID-7382 > URL: https://issues.apache.org/jira/browse/QPID-7382 > Project: Qpid > Issue Type: Bug > Components: Java Broker >Affects Versions: 0.30, 0.32, qpid-java-6.0 >Reporter: Keith Wall >Assignee: Lorenz Quack > Fix For: qpid-java-6.0.5, qpid-java-6.1 > > Attachments: suggested-changes.diff > > > When viewing a message through the WMC, if the message's mime type indicates > that the content it text, the message dialogue tries to inline the content, > properly escaping the content first. If the content is very large, this > approach is problematic and can cause formatting problems with buttons out of > reach, or at worst an unresponsive or crashed client side UI. > The WMC should display the leading portion of a long text message using > ellipses and offer a download button to retrieve the full text content. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Comment Edited] (QPID-7382) Message dialogue tries to inline the text of a text message content regardless of the its length
[ https://issues.apache.org/jira/browse/QPID-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15464735#comment-15464735 ] Alex Rudyy edited comment on QPID-7382 at 9/5/16 10:56 AM: --- Lorenz, The latest changes include URL encoded queue name into a disposition file name. I think that might not be cross-browser supported. Appendix D of [RFC6266|https://tools.ietf.org/html/rfc6266] provides some recommendations about generation of Content-Disposition. It seems that filename should only include non-ASCII characters excluding percent character followed by two hexadecimal. I think that we need to include filename* into Content-Disposition when non-ASCII characters are present in the queue name was (Author: alex.rufous): Lorenz, The latest changes include URL encode queue name into a disposition file name. I think that might not be cross-browser supported. Appendix D of [RFC6266|https://tools.ietf.org/html/rfc6266] provides some recommendations about generation of Content-Disposition. It seems that filename should only include non-ASCII characters excluding percent character followed by two hexadecimal. I think that we need to include filename* into Content-Disposition when non-ASCII characters are present in the queue name > Message dialogue tries to inline the text of a text message content > regardless of the its length > > > Key: QPID-7382 > URL: https://issues.apache.org/jira/browse/QPID-7382 > Project: Qpid > Issue Type: Bug > Components: Java Broker >Affects Versions: 0.30, 0.32, qpid-java-6.0 >Reporter: Keith Wall >Assignee: Lorenz Quack > Fix For: qpid-java-6.1, qpid-java-6.0.5 > > Attachments: suggested-changes.diff > > > When viewing a message through the WMC, if the message's mime type indicates > that the content it text, the message dialogue tries to inline the content, > properly escaping the content first. If the content is very large, this > approach is problematic and can cause formatting problems with buttons out of > reach, or at worst an unresponsive or crashed client side UI. > The WMC should display the leading portion of a long text message using > ellipses and offer a download button to retrieve the full text content. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Comment Edited] (QPID-7382) Message dialogue tries to inline the text of a text message content regardless of the its length
[ https://issues.apache.org/jira/browse/QPID-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458595#comment-15458595 ] Alex Rudyy edited comment on QPID-7382 at 9/2/16 1:56 PM: -- Lorenz, Here are my review comments. # The implemented changes look good to me. However, I am wondering would not it be better to move the html markup for download link and preview into a template rather then generating html on the flight? # It seems an existing defect but the content of dialog does not occupy 100% of the space. I think it can be fixed as part of this JIRA by committing the following change {code} broker-plugins/management-http/src/main/java/resources/showMessage.html @@ -18,7 +18,7 @@ - + Message Number: {code} # By clicking on download link the message content is replacing WMC UI. Although it is an existing issue, I think that it needs to be fixed to make content downloading user friendly by adding Content-Disposition header to the content, for example: {code} broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java @@ -2684,11 +2684,13 @@ public abstract class AbstractQueue> public static final int UNLIMITED = -1; private final MessageReference _messageReference; private final long _limit; +private final String _queueName; -public MessageContent(MessageReference messageReference, long limit) +public MessageContent(MessageReference messageReference, long limit, String queueName) { _messageReference = messageReference; _limit = (limit == UNLIMITED ? messageReference.getMessage().getSize() : limit); +_queueName = queueName; } @Override @@ -2735,6 +2737,12 @@ public abstract class AbstractQueue> return _messageReference.getMessage().getMessageHeader().getEncoding(); } +@RestContentHeader("Content-Disposition") +public String getContentDisposition() +{ +return "attachment; filename=\"" + _queueName + + "/" + _messageReference.getMessage().getMessageNumber() + "\""; +} } private static class AcquireAllQueueEntryFilter implements QueueEntryFilter @@ -3507,7 +3515,7 @@ public abstract class AbstractQueue> visit(messageFinder); if(messageFinder.isFound()) { -return new MessageContent(messageFinder.getMessageReference(), limit); +return new MessageContent(messageFinder.getMessageReference(), limit, this.getName()); } else { {code} I think that 2 and 3 should be addressed whilst 1 is up to you to decide whether we can make code a bit nicer by moving markup into template. was (Author: alex.rufous): Lorenz, Here are my review comments. # The implemented changes look good to me. However, I am wondering would not it be better to move the html markup for download link and preview into a template rather then generating html on the flight? # It seems an existing defect but the content of dialog does not occupy 100% of the space. I think it can be fixed as part of this JIRA by committing the following change {code} broker-plugins/management-http/src/main/java/resources/showMessage.html @@ -18,7 +18,7 @@ - + Message Number: {code} # By clicking on download link the message content is replacing WMC UI. Although it is an existing issue, I think that it needs to be fixed to make content downloading user friendly by adding Content-Disposition header to the content, for example: {code} broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java @@ -2684,11 +2684,13 @@ public abstract class AbstractQueue> public static final int UNLIMITED = -1; private final MessageReference _messageReference; private final long _limit; +private final String _queueName; -public MessageContent(MessageReference messageReference, long limit) +public MessageContent(MessageReference messageReference, long limit, String queueName) { _messageReference = messageReference; _limit = (limit == UNLIMITED ? messageReference.getMessage().getSize() : limit); +_queueName = queueName; } @Override @@ -2735,6 +2737,12 @@ public abstract class AbstractQueue> return _messageReference.getMessage().getMessageHeader().getEncoding(); } +@RestContentHeader("Content-Disposition") +public String getContentDisposition() +{ +return "attachment; filename=\"" + _queueName + + "/" + _messageReference.getMessage().getMessageHeader() + "\""; +} } private static class AcquireAllQueueEntryFilter implements Qu
[jira] [Comment Edited] (QPID-7382) Message dialogue tries to inline the text of a text message content regardless of the its length
[ https://issues.apache.org/jira/browse/QPID-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458595#comment-15458595 ] Alex Rudyy edited comment on QPID-7382 at 9/2/16 1:55 PM: -- Lorenz, Here are my review comments. # The implemented changes look good to me. However, I am wondering would not it be better to move the html markup for download link and preview into a template rather then generating html on the flight? # It seems an existing defect but the content of dialog does not occupy 100% of the space. I think it can be fixed as part of this JIRA by committing the following change {code} broker-plugins/management-http/src/main/java/resources/showMessage.html @@ -18,7 +18,7 @@ - + Message Number: {code} # By clicking on download link the message content is replacing WMC UI. Although it is an existing issue, I think that it needs to be fixed to make content downloading user friendly by adding Content-Disposition header to the content, for example: {code} broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java @@ -2684,11 +2684,13 @@ public abstract class AbstractQueue> public static final int UNLIMITED = -1; private final MessageReference _messageReference; private final long _limit; +private final String _queueName; -public MessageContent(MessageReference messageReference, long limit) +public MessageContent(MessageReference messageReference, long limit, String queueName) { _messageReference = messageReference; _limit = (limit == UNLIMITED ? messageReference.getMessage().getSize() : limit); +_queueName = queueName; } @Override @@ -2735,6 +2737,12 @@ public abstract class AbstractQueue> return _messageReference.getMessage().getMessageHeader().getEncoding(); } +@RestContentHeader("Content-Disposition") +public String getContentDisposition() +{ +return "attachment; filename=\"" + _queueName + + "/" + _messageReference.getMessage().getMessageHeader() + "\""; +} } private static class AcquireAllQueueEntryFilter implements QueueEntryFilter @@ -3507,7 +3515,7 @@ public abstract class AbstractQueue> visit(messageFinder); if(messageFinder.isFound()) { -return new MessageContent(messageFinder.getMessageReference(), limit); +return new MessageContent(messageFinder.getMessageReference(), limit, this.getName()); } else { {code} I think that 2 and 3 should be addressed whilst 1 is up to you to decide whether we can make code a bit nicer by moving markup into template. was (Author: alex.rufous): Lorenz, Here are my review comments. # The implemented changes look good to me. However, I am wondering would not it be easier to move the html markup for download link and preview into a template class rather then generating html on the flight? # It seems an existing defect but the content of dialog does not occupy 100% of the space. I think it can be fixed as part of this JIRA by committing the following change {code} broker-plugins/management-http/src/main/java/resources/showMessage.html @@ -18,7 +18,7 @@ - + Message Number: {code} # By clicking on download link the message content is replacing WMC UI. Although it is an existing issue, I think that it needs to be fixed to make content downloading user friendly by adding Content-Disposition header to the content, for example: {code} broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java @@ -2684,11 +2684,13 @@ public abstract class AbstractQueue> public static final int UNLIMITED = -1; private final MessageReference _messageReference; private final long _limit; +private final String _queueName; -public MessageContent(MessageReference messageReference, long limit) +public MessageContent(MessageReference messageReference, long limit, String queueName) { _messageReference = messageReference; _limit = (limit == UNLIMITED ? messageReference.getMessage().getSize() : limit); +_queueName = queueName; } @Override @@ -2735,6 +2737,12 @@ public abstract class AbstractQueue> return _messageReference.getMessage().getMessageHeader().getEncoding(); } +@RestContentHeader("Content-Disposition") +public String getContentDisposition() +{ +return "attachment; filename=\"" + _queueName + + "/" + _messageReference.getMessage().getMessageHeader() + "\""; +} } private static class AcquireAllQueueEntryFilter impleme
[jira] [Comment Edited] (QPID-7382) Message dialogue tries to inline the text of a text message content regardless of the its length
[ https://issues.apache.org/jira/browse/QPID-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15451962#comment-15451962 ] Keith Wall edited comment on QPID-7382 at 8/31/16 11:26 AM: The agreed approach is that the ability to preview message content which is flagged with a text mime type should be retained. To do this we will: * Add a new optional parameter to the {{#getMessageContent}} operation that limits the number of bytes returned. * A download link for the message content will always be available even for text mime types. * If the mime type is text, a small leading portion of the message content will be displayed in a scrollable preview area. Other content types won't have a preview. The change will be ported to 6.0.5 too. was (Author: k-wall): The agreed approach is that the ability to preview message content which is flagged with a text mime type should be retained. To do this we will: * Add a new optional parameter to the {{#getMessageContent}} operation that limits the number of bytes returned. * A download link for the message content will always be available even for text mime types. * If the mime type is text, a small leading portion of the message content will be displayed in a scrollable preview area. The change will be ported to 6.0.5 too. > Message dialogue tries to inline the text of a text message content > regardless of the its length > > > Key: QPID-7382 > URL: https://issues.apache.org/jira/browse/QPID-7382 > Project: Qpid > Issue Type: Bug > Components: Java Broker >Affects Versions: 0.30, 0.32, qpid-java-6.0 >Reporter: Keith Wall > Fix For: qpid-java-6.1, qpid-java-6.0.5 > > > When viewing a message through the WMC, if the message's mime type indicates > that the content it text, the message dialogue tries to inline the content, > properly escaping the content first. If the content is very large, this > approach is problematic and can cause formatting problems with buttons out of > reach, or at worst an unresponsive or crashed client side UI. > The WMC should display the leading portion of a long text message using > ellipses and offer a download button to retrieve the full text content. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Comment Edited] (QPID-7382) Message dialogue tries to inline the text of a text message content regardless of the its length
[ https://issues.apache.org/jira/browse/QPID-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15449019#comment-15449019 ] Keith Wall edited comment on QPID-7382 at 8/30/16 1:32 PM: --- If we value the ability to show a text message's content inline then we will need to change {{Queue#getMessageContent}} to support an optional parameter to restrict the number of bytes that are returned to the client, to avoid the possibility of overwhelming the client side application. However, in my opinion, the inline display of content is of little practical value. Instead we could change the UI so that it unilaterally displays a download link for all content types. If we do choose to keep the inline content, we should put the content within a scrollable area, so that the dialogue box can't resize itself excessively if the message content is long. was (Author: k-wall): If we value the ability to show a text message's content inline then we will need to change {{Queue#getMessageContent}} to support an optional parameter to restrict the number of bytes that are returned to the client, to avoid the possibility of overwhelming the client side application. However, in my opinion, the inline display of content is of little practical value. Instead we could change the UI so that it unilaterally displays a download link for all content types. > Message dialogue tries to inline the text of a text message content > regardless of the its length > > > Key: QPID-7382 > URL: https://issues.apache.org/jira/browse/QPID-7382 > Project: Qpid > Issue Type: Bug > Components: Java Broker >Affects Versions: 0.30, 0.32, qpid-java-6.0 >Reporter: Keith Wall > Fix For: qpid-java-6.1, qpid-java-6.0.5 > > > When viewing a message through the WMC, if the message's mime type indicates > that the content it text, the message dialogue tries to inline the content, > properly escaping the content first. If the content is very large, this > approach is problematic and can cause formatting problems with buttons out of > reach, or at worst an unresponsive or crashed client side UI. > The WMC should display the leading portion of a long text message using > ellipses and offer a download button to retrieve the full text content. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Comment Edited] (QPID-7382) Message dialogue tries to inline the text of a text message content regardless of the its length
[ https://issues.apache.org/jira/browse/QPID-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15449019#comment-15449019 ] Keith Wall edited comment on QPID-7382 at 8/30/16 1:30 PM: --- If we value the ability to show a text message's content inline then we will need to change {{Queue#getMessageContent}} to support an optional parameter to restrict the number of bytes that are returned to the client, to avoid the possibility of overwhelming the client side application. However, in my opinion, the inline display of content is of little practical value. Instead we could change the UI so that it unilaterally displays a download link for all content types. was (Author: k-wall): If we value the ability to show a text message's content inline then we will need to change Queue#getMessageContent to support an optional parameter to restrict the number of bytes that are returned to the client, to avoid the possibility of overwhelming the client side application. However, in my opinion, the inline display of content is of little practical value. Instead we could change the UI so that it unilaterally displays a download link for all content types. > Message dialogue tries to inline the text of a text message content > regardless of the its length > > > Key: QPID-7382 > URL: https://issues.apache.org/jira/browse/QPID-7382 > Project: Qpid > Issue Type: Bug > Components: Java Broker >Affects Versions: 0.30, 0.32, qpid-java-6.0 >Reporter: Keith Wall > Fix For: qpid-java-6.1, qpid-java-6.0.5 > > > When viewing a message through the WMC, if the message's mime type indicates > that the content it text, the message dialogue tries to inline the content, > properly escaping the content first. If the content is very large, this > approach is problematic and can cause formatting problems with buttons out of > reach, or at worst an unresponsive or crashed client side UI. > The WMC should display the leading portion of a long text message using > ellipses and offer a download button to retrieve the full text content. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org