This commit is contained in:
Justin Bertram 2017-10-24 15:09:30 -05:00
commit a4f699431a
2 changed files with 4 additions and 4 deletions

View File

@ -119,14 +119,14 @@ var ARTEMIS = (function(ARTEMIS) {
$scope.purgeDestination = function () {
var selection = workspace.selection;
var entries = selection.entries;
var mbean = getBrokerMBean(jolokia);
var mbean = selection.objectName;
if (mbean) {
if (selection && jolokia && entries) {
var name = entries["Destination"] || entries["destinationName"] || selection.title;
name = name.unescapeHTML();
var operation = "purge()";
$scope.message = "Purged queue " + name;
ARTEMISService.artemisConsole.purgeQueue(mbean, jolokia, name, onSuccess(deleteSuccess));
ARTEMISService.artemisConsole.purgeQueue(mbean, jolokia, onSuccess(deleteSuccess));
}
}
};

View File

@ -38,8 +38,8 @@ function ArtemisConsole() {
jolokia.execute(mbean, "destroyQueue(java.lang.String)", name, method);
};
this.purgeQueue = function (mbean, jolokia, name, method) {
//todo
this.purgeQueue = function (mbean, jolokia, method) {
jolokia.execute(mbean, "removeAllMessages()", method);
};
this.browse = function (mbean, jolokia, method) {