mirror of https://github.com/apache/activemq.git
AMD-4175: applied patch from Torbjørn Skyberg Knutsen: added webconsole retry operations for messages on "DLQ." and "DLT." destinations; sort queue names for move or copy operations. Also added confirmation dialogs for all message operations not already covered.
This commit is contained in:
parent
7b555c2898
commit
c8402a6e34
|
@ -60,7 +60,32 @@
|
||||||
<a href="<c:url value="deleteMessage.action">
|
<a href="<c:url value="deleteMessage.action">
|
||||||
<c:param name="JMSDestination" value="${requestContext.queueBrowser.JMSDestination}"/>
|
<c:param name="JMSDestination" value="${requestContext.queueBrowser.JMSDestination}"/>
|
||||||
<c:param name="messageId" value="${row.JMSMessageID}"/>
|
<c:param name="messageId" value="${row.JMSMessageID}"/>
|
||||||
<c:param name="secret" value='${sessionScope["secret"]}'/></c:url>">Delete</a>
|
<c:param name="secret" value='${sessionScope["secret"]}'/></c:url>"
|
||||||
|
onclick="return confirm('Are you sure you want to delete this message?')"
|
||||||
|
>Delete</a>
|
||||||
|
|
||||||
|
<c:set var="queueName" value="${requestContext.queueBrowser.JMSDestination}"/>
|
||||||
|
<!-- <c:set var="queueName" value="${fn:replace(queueName, 'queue://', '')}" /> -->
|
||||||
|
<c:set var="queueNameSubStr" value="${fn:substring(queueName, 0, 4)}" />
|
||||||
|
|
||||||
|
<c:if test="${queueNameSubStr eq 'DLQ.' || queueNameSubStr eq 'DLT.'}">
|
||||||
|
<c:if test="${queueNameSubStr eq 'DLQ.'}">
|
||||||
|
<c:set var="moveToQueue" value="${fn:replace(queueName, 'DLQ.', '')}" />
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${queueNameSubStr eq 'DLT.'}">
|
||||||
|
<c:set var="moveToQueue" value="${fn:replace(queueName, 'DLT.', '')}" />
|
||||||
|
</c:if>
|
||||||
|
<a href="<c:url value="moveMessage.action">
|
||||||
|
<c:param name="destination" value="${moveToQueue}" />
|
||||||
|
<c:param name="JMSDestination" value="${requestContext.queueBrowser.JMSDestination}" />
|
||||||
|
<c:param name="messageId" value="${row.JMSMessageID}" />
|
||||||
|
<c:param name="JMSDestinationType" value="queue" />
|
||||||
|
<c:param name="secret" value='${sessionScope["secret"]}' />
|
||||||
|
</c:url>"
|
||||||
|
onclick="return confirm('Are you sure you want to retry this message on queue://<c:out value="${moveToQueue}"/>?')"
|
||||||
|
title="Move to <c:out value="${moveToQueue}" /> to attempt reprocessing"
|
||||||
|
>Retry</a>
|
||||||
|
</c:if>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</jms:forEachMessage>
|
</jms:forEachMessage>
|
||||||
|
|
|
@ -115,7 +115,6 @@ No message could be found for ID <c:out value="${requestContext.messageQuery.id}
|
||||||
<td class="label"><c:out value="${prop.key}"/></td>
|
<td class="label"><c:out value="${prop.key}"/></td>
|
||||||
<td><c:out value="${prop.value}"/></td>
|
<td><c:out value="${prop.value}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
</form:forEachMapEntry>
|
</form:forEachMapEntry>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -133,8 +132,31 @@ No message could be found for ID <c:out value="${requestContext.messageQuery.id}
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="<c:url value="deleteMessage.action?JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&secret=${sessionScope['secret']}" />">Delete</a></td>
|
<td colspan="2"><a href="<c:url value='deleteMessage.action?JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&secret=${sessionScope["secret"]}' />" onclick="return confirm('Are you sure you want to delete the message?')" >Delete</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<c:set var="queueName" value="${requestContext.messageQuery.JMSDestination}"/>
|
||||||
|
<c:set var="queueNameSubStr" value="${fn:substring(queueName, 0, 4)}" />
|
||||||
|
<c:if test="${queueNameSubStr eq 'DLQ.' || queueNameSubStr eq 'DLT.'}">
|
||||||
|
<c:if test="${queueNameSubStr eq 'DLQ.'}">
|
||||||
|
<c:set var="moveToQueue" value="${fn:replace(queueName, 'DLQ.', '')}" />
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${queueNameSubStr eq 'DLT.'}">
|
||||||
|
<c:set var="moveToQueue" value="${fn:replace(queueName, 'DLT.', '')}" />
|
||||||
|
</c:if>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<a href="<c:url value="moveMessage.action">
|
||||||
|
<c:param name="destination" value="${moveToQueue}" />
|
||||||
|
<c:param name="JMSDestination" value="${requestContext.messageQuery.JMSDestination}" />
|
||||||
|
<c:param name="messageId" value="${row.JMSMessageID}" />
|
||||||
|
<c:param name="JMSDestinationType" value="queue" />
|
||||||
|
<c:param name="secret" value='${sessionScope["secret"]}' />
|
||||||
|
</c:url>"
|
||||||
|
onclick="return confirm('Are you sure you want to retry this message on queue://<c:out value="${moveToQueue}"/>?')"
|
||||||
|
title="Move to <c:out value="$moveToQueue" /> to attempt reprocessing">Retry</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:if>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td><a href="<c:url value="javascript:confirmAction('queue', 'copyMessage.action?destination=%target%&JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=${sessionScope['secret']}"/>')">Copy</a></td>
|
<td><a href="<c:url value="javascript:confirmAction('queue', 'copyMessage.action?destination=%target%&JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=${sessionScope['secret']}"/>')">Copy</a></td>
|
||||||
<td rowspan="2">
|
<td rowspan="2">
|
||||||
|
@ -150,7 +172,8 @@ No message could be found for ID <c:out value="${requestContext.messageQuery.id}
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td><a href="<c:url value="javascript:confirmAction('queue', 'moveMessage.action?destination=%target%&JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=${sessionScope['secret']}"/>')">Move</a></td>
|
<td><a href="<c:url value="javascript:confirmAction('queue', 'moveMessage.action?destination=%target%&JMSDestination=${requestContext.messageQuery.JMSDestination}&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=${sessionScope['secret']})"/>"
|
||||||
|
>Move</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -179,6 +202,41 @@ No message could be found for ID <c:out value="${requestContext.messageQuery.id}
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function sortSelect(selElem) {
|
||||||
|
var tmpAry = new Array();
|
||||||
|
for (var i=0;i<selElem.options.length;i++) {
|
||||||
|
tmpAry[i] = new Array();
|
||||||
|
tmpAry[i][0] = selElem.options[i].text;
|
||||||
|
tmpAry[i][1] = selElem.options[i].value;
|
||||||
|
}
|
||||||
|
tmpAry.sort();
|
||||||
|
while (selElem.options.length > 0) {
|
||||||
|
selElem.options[0] = null;
|
||||||
|
}
|
||||||
|
for (var i=0;i<tmpAry.length;i++) {
|
||||||
|
var op = new Option(tmpAry[i][0], tmpAry[i][1]);
|
||||||
|
selElem.options[i] = op;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOptionByText (selElem, selText) {
|
||||||
|
var iter = 0;
|
||||||
|
while ( iter < selElem.options.length ) {
|
||||||
|
if ( selElem.options[iter].text === selText ) {
|
||||||
|
selElem.selectedIndex = iter;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
iter++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload=function() {
|
||||||
|
sortSelect( document.getElementById('queue') );
|
||||||
|
selectOptionByText( document.getElementById('queue'), "-- Please select --" );
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<%@include file="decorators/footer.jsp" %>
|
<%@include file="decorators/footer.jsp" %>
|
||||||
|
|
Loading…
Reference in New Issue