Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-08-22 09:33:09 -0400
committerChristopher Frost2012-08-22 09:33:09 -0400
commit4ff9133c19fd27278c5a525cfa5619273e69a96b (patch)
treeb3fd4c68bc0c374a253dac8890c25e616d44e562 /org.eclipse.virgo.management.console
parent4ea372dd20da94ba55f47adc9a1941f12f063401 (diff)
downloadorg.eclipse.virgo.kernel-4ff9133c19fd27278c5a525cfa5619273e69a96b.tar.gz
org.eclipse.virgo.kernel-4ff9133c19fd27278c5a525cfa5619273e69a96b.tar.xz
org.eclipse.virgo.kernel-4ff9133c19fd27278c5a525cfa5619273e69a96b.zip
387631 Admin console now only uses config MBeans from Gemini Management
Diffstat (limited to 'org.eclipse.virgo.management.console')
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/configuration.js50
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/styles/configuration.css11
2 files changed, 48 insertions, 13 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/configuration.js b/org.eclipse.virgo.management.console/src/main/webapp/js/configuration.js
index 6c12bf37..2fee3e66 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/configuration.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/configuration.js
@@ -13,17 +13,32 @@
* Scripts to be loaded in to the head of the configuration view
*/
function pageinit(){
- util.doQuery('search/org.eclipse.virgo.kernel:type=Configuration,*', ConfigurationInit.init);
+
+
+ util.doQuery('search/org.eclipse.equinox.region.domain:type=Region,*', function(response){
+
+ $.each(response.value, function(index, region){
+ var regionName = util.readObjectName(region).get('name');
+ util.doQuery('exec/osgi.compendium:region=' + regionName + ',service=cm,version=1.3/getConfigurations/(service.pid=*)', function(response){
+ ConfigurationInit.addConfigurationSection(regionName, response.value);
+ });
+ });
+ });
+
+ //util.doQuery('search/org.eclipse.virgo.kernel:type=Configuration,*', ConfigurationInit.init);
}
+
ConfigurationInit = {
- init : function(json){
- $.each(json.value, function(index, item){
- var objectName = util.readObjectName(item);
- var label = ConfigurationInit.getConfigurationLabel(objectName.get('name'));
- var config = new Configuration(objectName, label);
- if(util.pageLocation && util.pageLocation == objectName.get('name')){
+ addConfigurationSection : function(regionName, json){
+ ConfigurationInit.appendConfigurationHeader(regionName);
+ $.each(json, function(index, item){
+ var pid = item[0];
+ var location = item[1];
+ var label = ConfigurationInit.getConfigurationLabel(pid);
+ var config = new Configuration(pid, location, regionName, label);
+ if(util.pageLocation && util.pageLocation == regionName + '#' + pid){
config.toggle();
}
$('.config-label', label).click(config, function(event){
@@ -41,17 +56,26 @@ ConfigurationInit = {
configContainer.append(configLabel);
$('#config-list').append(configContainer);
return configContainer;
+ },
+
+ appendConfigurationHeader : function(regionName){
+ var configLabel = $('<div />', {'class': 'config-header'});
+ configLabel.append($('<span />').text('Region: ' + regionName));
+ $('#config-list').append(configLabel);
}
+
};
-var Configuration = function(objectName, label){
+var Configuration = function(pid, location, regionName, label){
var self = this;
- self.objectName = objectName;
+ self.location = location;
+
+ self.regionName = regionName;
- self.name = objectName.get('name');
+ self.pid = pid;
self.label = label;
@@ -60,7 +84,7 @@ var Configuration = function(objectName, label){
self.toggle = function(){
if(self.icon.hasClass('plus')){
self.setPlusMinusIcon('loader-small.gif', 'spinnerIcon');
- util.doQuery('read/' + self.objectName.toString, self.createTable);
+ util.doQuery('exec/osgi.compendium:region=' + self.regionName + ',service=cm,version=1.3/getProperties/' + pid, self.createTable);
} else {
$('.config-properties', self.label).slideToggle(util.fxTime, function(){
$(this).remove();
@@ -76,8 +100,8 @@ var Configuration = function(objectName, label){
self.createTable = function(json){
var tableRows = new Array();
- $.each(json.value.Properties, function(index, item){
- tableRows.push([index, item]);
+ $.each(json.value, function(index, item){
+ tableRows.push([index, item.Value]);
});
var propertiesTable = util.makeTable({
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/styles/configuration.css b/org.eclipse.virgo.management.console/src/main/webapp/styles/configuration.css
index 06fade8e..b933b3f5 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/styles/configuration.css
+++ b/org.eclipse.virgo.management.console/src/main/webapp/styles/configuration.css
@@ -8,6 +8,17 @@
* Christopher Frost - 2011
*/
+.config-list {
+ padding-top: 0px;
+}
+
+.config-header {
+ color: #002F5E;
+ font-size: 15px;
+ margin-bottom: 5px;
+ margin-top: 15px;
+}
+
.config-label {
cursor: pointer;
margin-top: 3px;

Back to the top