Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-11-22 07:06:01 -0500
committerChristopher Frost2012-11-22 07:06:01 -0500
commitf0dbf88e61a276a8e45d348caccebe30bfb7ba18 (patch)
tree7f3786fc69417b12d1833d413d0b53982f283016 /org.eclipse.virgo.management.console
parentee96902d099f85fcb369cbb180b66c72d8f7fafb (diff)
downloadorg.eclipse.virgo.kernel-f0dbf88e61a276a8e45d348caccebe30bfb7ba18.tar.gz
org.eclipse.virgo.kernel-f0dbf88e61a276a8e45d348caccebe30bfb7ba18.tar.xz
org.eclipse.virgo.kernel-f0dbf88e61a276a8e45d348caccebe30bfb7ba18.zip
393849 - Incorrect cardinality for service used by publishing bundle
Diffstat (limited to 'org.eclipse.virgo.management.console')
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/bundlesGui.js26
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js2
2 files changed, 18 insertions, 10 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/bundlesGui.js b/org.eclipse.virgo.management.console/src/main/webapp/js/bundlesGui.js
index 00987069..3012aa60 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/bundlesGui.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/bundlesGui.js
@@ -41,12 +41,16 @@ var LayoutManager = function(bundleCanvas, width, height, dataSource){
$('#view-wires-button').addClass('button-selected');
$('#view-services-button').removeClass('button-selected');
self.relationshipType = type;
- self.displayBundle(self.focused);
+ if(!isNaN(self.focused)){
+ self.displayBundle(self.focused);
+ }
} else if(type == 'services'){
$('#view-services-button').addClass('button-selected');
$('#view-wires-button').removeClass('button-selected');
self.relationshipType = type;
- self.displayBundle(self.focused);
+ if(!isNaN(self.focused)){
+ self.displayBundle(self.focused);
+ }
}
};
@@ -118,7 +122,9 @@ var LayoutManager = function(bundleCanvas, width, height, dataSource){
var bottomRowBundleIds = {};
$.each(bundle.rawBundle.RegisteredServices, function(index, service){
$.each(service.UsingBundles, function(index, bundleId){
- bottomRowBundleIds[bundleId] = {'service': service, 'consumerId': bundleId};
+ if(bundleId != bundle.rawBundle.Identifier){
+ bottomRowBundleIds[bundleId] = {'service': service, 'consumerId': bundleId};
+ }
});
});
var bottomRowRenderResult = self.renderBundleRow(bottomRowBundleIds, 239, 'bottom', bundle);
@@ -528,12 +534,14 @@ var Relationship = function(paper, type, fromBundle, toBundle) {
infoBox.append($('<li>Service [' + service.Identifier + '] ' + service.objectClass[0] + (service.objectClass.length > 1 ? '...' : '') + '</li>').addClass('section-title'));
infoBox.append($('<li>Published by Bundle ' + service.BundleIdentifier + '</li>'));
infoBox.append($('<li>Used by Bundle ' + consumerId + '</li>'));
- infoBox.append($('<li>Also used by Bundles</li>'));
- $.each(service.UsingBundles, function(index, item){
- if(item != consumerId){
- infoBox.append($('<li>' + item + '</li>').addClass('indent1'));
- }
- });
+ if(service.UsingBundles.length > 1){
+ infoBox.append($('<li>Also used by Bundles</li>'));
+ $.each(service.UsingBundles, function(index, item){
+ if(item != consumerId){
+ infoBox.append($('<li>' + item + '</li>').addClass('indent1'));
+ }
+ });
+ }
infoBox.append($('<li>ObjectClass</li>'));
$.each(service.objectClass, function(index, item){
infoBox.append($('<li>' + item + '</li>').addClass('indent1'));
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js b/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
index 32a335d8..88f95b4d 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js
@@ -173,7 +173,7 @@ var DumpViewer = function(){
controls.append($('<div />').text('There were no unresolved bundles at the time of this state dump.'));
}else{
$.each(bundles, function(index, unresolvedBundle){
- var displayLink = $('<div />').text('Bundle [' + unresolvedBundle.identifier + '] ' + unresolvedBundle.symbolicName + ': ' + unresolvedBundle.version + ' unresolved.');
+ var displayLink = $('<div />').text('Bundle [' + unresolvedBundle.identifier + '] ' + unresolvedBundle.symbolicName + ': ' + unresolvedBundle.version + ' is unresolved.');
displayLink.click(unresolvedBundle.identifier, function(eventData){
layoutManager.displayBundle(eventData.data);
});

Back to the top