Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-10-12 07:03:55 -0400
committerChristopher Frost2012-10-12 07:03:55 -0400
commit95868aba60d33eaf1ad79457c3a0d21235e69817 (patch)
tree3dd3869aa46e3e8647e78951261d377e5ad49426
parent1e5c270db596c530105b92c79e828af5c233ab95 (diff)
downloadorg.eclipse.virgo.kernel-95868aba60d33eaf1ad79457c3a0d21235e69817.tar.gz
org.eclipse.virgo.kernel-95868aba60d33eaf1ad79457c3a0d21235e69817.tar.xz
org.eclipse.virgo.kernel-95868aba60d33eaf1ad79457c3a0d21235e69817.zip
388204 Fragments and Hosts are now called out explicitley in the list of Bundles on the wirings view
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/bundlesGui.js4
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js25
2 files changed, 21 insertions, 8 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 fd986070..2cc97e2e 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
@@ -156,8 +156,7 @@ var LayoutManager = function(bundleCanvas, width, height, dataSource){
if(existingRelationship){
existingRelationship.increaseCount(relationshipInfoBox);
}else{//Handle the first self relationship
- var relationship = new Relationship(self.paper, bundle, bundle, relationshipInfoBox);
- self.relationships[releationshipKey] = relationship;
+ self.relationships[releationshipKey] = new Relationship(self.paper, bundle, bundle, relationshipInfoBox);
}
} else {
var existingFromBundle = existingRelationship.fromBundle.rawBundle.Identifier;
@@ -212,7 +211,6 @@ var LayoutManager = function(bundleCanvas, width, height, dataSource){
};
self.getInfoBoxWithWire = function(wire){
- console.log(wire);
var name = 'wire' + wire.ProviderBundleId + '-' + wire.RequirerBundleId;
var title = 'Wire(s) between Bundles ' + wire.ProviderBundleId + ' and ' + wire.RequirerBundleId;
var infoBox = $('<ul></ul>');
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js b/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js
index 59df1266..02261ebf 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js
@@ -53,9 +53,7 @@ var SideBar = function(layoutManager, dataSource){
var rowIds = $('td:first-child', self.bundlesTable);
$.each(rowIds, function(index, rowId){
if($(rowId).text() == bundleId){
- //rowId.scrollIntoView(true);
- $('#side-bar').scrollTop($(rowId).position().top);
-
+ $('#side-bar').scrollTop($(rowId).position().top);
$('.table-tr-selected', self.bundlesTable).removeClass('table-tr-selected');
$(rowId).parent().addClass('table-tr-selected');
}
@@ -64,8 +62,8 @@ var SideBar = function(layoutManager, dataSource){
self.init = function(){
var tRows = new Array();
- $.each(dataSource.bundles, function(id, bundle){
- tRows.push([id, bundle.SymbolicName, bundle.Version]);
+ $.each(dataSource.bundles, function(id, bundle){
+ tRows.push([id, self.getFormattedBundleName(bundle), bundle.Version]);
});
self.bundlesTable = util.makeTable({
@@ -82,6 +80,23 @@ var SideBar = function(layoutManager, dataSource){
}
};
+ self.getFormattedBundleName = function(bundle){
+ var formatBundleList = function(bundleIdArray){
+ var result = bundleIdArray[0];
+ for(var i = 1; i < bundleIdArray.length; i++) {
+ result = result + ', ' + bundleIdArray[i];
+ }
+ return result;
+ };
+ if(bundle.Fragments.length > 0){
+ return bundle.SymbolicName + ' - Fragments [' + formatBundleList(bundle.Fragments) + ']';
+ }
+ if(bundle.Hosts.length > 0){
+ return bundle.SymbolicName + ' - Host [' + formatBundleList(bundle.Hosts) + ']';
+ }
+ return bundle.SymbolicName;
+ };
+
self.clickEvent = function(row){
var bundleId = $('td:first-child', row).text();
self.focused = bundleId;

Back to the top