Skip to content

Commit

Permalink
fixes #808
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Dec 4, 2013
1 parent 13a302e commit 2883413
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions hawtio-web/src/main/webapp/app/fabric/js/brokerDiagram.ts
Expand Up @@ -108,15 +108,18 @@ module Fabric {
});

// TODO do we need to create a physical broker node per container and logical broker maybe?
var container = getOrAddNode("container", containerId, brokerStatus, () => {
return {
containerId: containerId,
popup: {
title: "Container: " + containerId,
content: "<p>" + containerId + " version: " + versionId + "</p>"
}
};
});
var container = null;
if (containerId) {
container = getOrAddNode("container", containerId, brokerStatus, () => {
return {
containerId: containerId,
popup: {
title: "Container: " + containerId,
content: "<p>" + containerId + " version: " + versionId + "</p>"
}
};
});
}


if (container && container.validContainer) {
Expand All @@ -138,11 +141,14 @@ module Fabric {
addLink(profile, broker, "broker");
}
}
if ((master || $scope.showFlags.slave) && $scope.showFlags.container) {
addLink(broker, container, "container");
container.destinationLinkNode = container;
} else {
container.destinationLinkNode = broker;

if (container) {
if ((master || $scope.showFlags.slave) && $scope.showFlags.container) {
addLink(broker, container, "container");
container.destinationLinkNode = container;
} else {
container.destinationLinkNode = broker;
}
}
});

Expand Down

0 comments on commit 2883413

Please sign in to comment.