Skip to content

Commit

Permalink
Do not show error message if ActiveMQ MBean for NetworkBridge is not …
Browse files Browse the repository at this point in the history
…present as it may be optional.
  • Loading branch information
davsclaus committed Apr 9, 2013
1 parent 09234d2 commit 3f2b662
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion hawtio-web/src/main/webapp/app/activemq/js/graph.ts
Expand Up @@ -189,7 +189,8 @@ module ActiveMQ {
mbean: "org.apache.activemq:Type=Producer,*"}
], onSuccess([populateSubscribers, populateProducers]));
} else {
jolokia.request({type: 'read', mbean: "org.apache.activemq:Type=NetworkBridge,*"}, onSuccess(populateNetworks));
// the network bridge is optional and may not be in use, so do not barf on error
jolokia.request({type: 'read', mbean: "org.apache.activemq:Type=NetworkBridge,*"}, onSuccess(populateNetworks, {silent : true}));
}
}
});
Expand Down
4 changes: 3 additions & 1 deletion hawtio-web/src/main/webapp/app/core/js/helpers.ts
Expand Up @@ -133,7 +133,9 @@ function onSuccess(fn, options = {}) {
var stacktrace = response.stacktrace;
if (stacktrace) {
console.log(stacktrace);
notification("error", "Operation failed due to: " + stacktrace);
if (!options['silent']) {
notification("error", "Operation failed due to: " + stacktrace);
}
}
};
}
Expand Down

0 comments on commit 3f2b662

Please sign in to comment.