Skip to content

Commit

Permalink
addming message delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
dejanb committed Apr 25, 2013
1 parent 4d85476 commit 304d610
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/activemq/html/browseQueue.html
Expand Up @@ -25,6 +25,8 @@
<textarea readonly class="messageDetail" class="input-xlarge" codeMirror="true" rows="{{lineCount(row.Text)}}"
ng-model="row.Text"></textarea>
</div>

<div><button type="submit" class="btn" ng-click="deleteMessage(row.JMSMessageID)"><i class="icon-remove"></i> Delete Message</button></div>
</script>

<div ng-controller="ActiveMQ.BrowseQueueController">
Expand All @@ -51,3 +53,4 @@
-->
</div>
</div>
<div></div>
16 changes: 16 additions & 0 deletions hawtio-web/src/main/webapp/app/activemq/js/browse.ts
Expand Up @@ -96,5 +96,21 @@ module ActiveMQ {
}
}
}

$scope.deleteMessage = (id) => {
var jolokia = workspace.jolokia;
var selection = workspace.selection;
var mbean = selection.objectName;
if (mbean && selection && jolokia) {
$scope.message = "Deleted message";
var operation = "removeMessage(java.lang.String)";
jolokia.execute(mbean, operation, id, onSuccess(deleteSuccess()));
}
}

function deleteSuccess() {
notification("success", $scope.message);
setTimeout(loadTable, 50);
}
}
}

0 comments on commit 304d610

Please sign in to comment.