Skip to content

Commit

Permalink
fixed bug showing incorrect stats
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Oct 8, 2013
1 parent de35e0a commit 7b9bf7d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions hawtio-web/src/main/webapp/app/fabric/js/brokers.ts
Expand Up @@ -115,7 +115,7 @@ module Fabric {
minimumInstances: brokerStatus.minimumInstances
},
brokers: [],
containers: []
containers: {}
};
});
var broker = findByIdOrCreate(profile.brokers, brokerId, maps.broker, () => {
Expand All @@ -130,7 +130,7 @@ module Fabric {
var container = findByIdOrCreate(broker.containers, containerId, maps.container, () => {
return brokerStatus;
});
profile.containers.push(container);
profile.containers[containerId] = container;
}
});

Expand All @@ -144,10 +144,7 @@ module Fabric {
return c.id;
});
});

profile.containers = profile.containers.sortBy((c) => { return c.id; });

var count = profile.containers.length;
var count = Object.values(profile.containers).length;
profile.requireStyle = Fabric.containerCountBadgeStyle(profile.requirements.minimumInstances, count);
profile.count = count;
});
Expand Down

0 comments on commit 7b9bf7d

Please sign in to comment.