Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
move queue and topics up as the main children for ActiveMQ so the UI …
…looks a bit nicer
  • Loading branch information
jstrachan committed May 2, 2013
1 parent 10b062b commit 4aaf153
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hawtio-web/src/main/webapp/app/activemq/js/activemqPlugin.ts
Expand Up @@ -114,6 +114,27 @@ module ActiveMQ {
function postProcessTree(tree) {
var activemq = tree.get("org.apache.activemq");
setConsumerType(activemq);

// lets move queue and topic as first children within brokers
if (activemq) {
angular.forEach(activemq.children, (broker) => {
angular.forEach(broker.children, (child) => {
// lets move Topic/Queue to the front.
var grandChildren = child.children;
if (grandChildren) {
var names = ["Topic", "Queue"];
angular.forEach(names, (name) => {
var idx = grandChildren.findIndex(n => n.title === name);
if (idx > 0) {
var old = grandChildren[idx];
grandChildren.splice(idx, 1);
grandChildren.splice(0, 0, old);
}
});
}
});
});
}
}

function setConsumerType(node) {
Expand Down

0 comments on commit 4aaf153

Please sign in to comment.