Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-10-23 19:28:14 -0400
committerChristopher Frost2012-10-23 19:28:14 -0400
commit94ed3960d9d63d0ece885de89e2c9cfc2e680984 (patch)
treeabb4c6f16124e22cbaaba2cbd9fc79dfa3a5f968
parent1c56f23649172881e6e0b33f6718116c3758dcd3 (diff)
downloadorg.eclipse.virgo.kernel-94ed3960d9d63d0ece885de89e2c9cfc2e680984.tar.gz
org.eclipse.virgo.kernel-94ed3960d9d63d0ece885de89e2c9cfc2e680984.tar.xz
org.eclipse.virgo.kernel-94ed3960d9d63d0ece885de89e2c9cfc2e680984.zip
Now able to handle a region that has no Gemini Management or Jolokia installed in the wirings view
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/WEB-INF/layouts/wirings.html3
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/wirings.js20
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/styles/wirings.css5
3 files changed, 19 insertions, 9 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/WEB-INF/layouts/wirings.html b/org.eclipse.virgo.management.console/src/main/webapp/WEB-INF/layouts/wirings.html
index 210384a3..14cc8b29 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/WEB-INF/layouts/wirings.html
+++ b/org.eclipse.virgo.management.console/src/main/webapp/WEB-INF/layouts/wirings.html
@@ -9,7 +9,7 @@
</div>
<div id="display">
- <div class="button-container">
+ <div id="main-button-container" class="button-container">
<div class="control-cap-left"></div>
<div class="controls">
<div class="control-text">View relationships by: </div>
@@ -24,6 +24,7 @@
</div>
<div id="bundle-canvas"></div>
+
</div>
</div>
<!--@&footer@-->
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 0eb4c7bf..473f0dc4 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
@@ -138,14 +138,18 @@ var GeminiDataSource = function(){
util.doBulkQuery(bundlesRequest, function(response){
$.each(response, function(index, regionBundles){
var region = util.readObjectName(regionBundles.request.mbean).get('region');
- $.each(regionBundles.value, function(bundleId, bundle){
- if(self.bundles[bundleId]){
- self.bundles[bundleId].Region.push(region);
- }else{
- self.bundles[bundleId] = bundle;
- self.bundles[bundleId].Region = [region];
- }
- });
+ if(regionBundles.value){
+ $.each(regionBundles.value, function(bundleId, bundle){
+ if(self.bundles[bundleId]){
+ self.bundles[bundleId].Region.push(region);
+ }else{
+ self.bundles[bundleId] = bundle;
+ self.bundles[bundleId].Region = [region];
+ }
+ });
+ }else{
+ $("#main-button-container").after($('<div />', {'class': 'warning-note'}).text('Region ' + region + ' is not publishing management information, unable to display it\'s bundles'));
+ };
});
callback();
}, function(){alert('Error loading page, please refresh.');});
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/styles/wirings.css b/org.eclipse.virgo.management.console/src/main/webapp/styles/wirings.css
index 6ea8bf67..02978c95 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/styles/wirings.css
+++ b/org.eclipse.virgo.management.console/src/main/webapp/styles/wirings.css
@@ -30,6 +30,11 @@ svg:not(:root) {
width: 65%;
}
+.warning-note{
+ margin: 10px;
+ text-align: center;
+}
+
#bundle-canvas {
border: 1px solid #BAD9EC;
margin-top: 13px;

Back to the top