Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-12-06 16:35:45 -0500
committerChristopher Frost2012-12-06 16:35:45 -0500
commit867559cb6189d097fbc56e71fe3f88e083f1e821 (patch)
tree6f169845c14a2f14ce602b36ebaad1a17f356a12 /org.eclipse.virgo.management.console
parent645967cfdc2950b44e622af88253d5ce32893de3 (diff)
downloadorg.eclipse.virgo.kernel-867559cb6189d097fbc56e71fe3f88e083f1e821.tar.gz
org.eclipse.virgo.kernel-867559cb6189d097fbc56e71fe3f88e083f1e821.tar.xz
org.eclipse.virgo.kernel-867559cb6189d097fbc56e71fe3f88e083f1e821.zip
395085 - web context path is not displayed as a hyperlink in the artifacts panel
Diffstat (limited to 'org.eclipse.virgo.management.console')
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js8
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/common.js21
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/configurations.js4
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/dumps.js12
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/logging.js2
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/overview.js2
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/repositories.js4
7 files changed, 30 insertions, 23 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js b/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js
index b7bc0069..3c11819a 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js
@@ -202,7 +202,7 @@ var Tree = function() {
var artifactControlBar = self.getArtifactControlBar(fullArtifact);
if(fullArtifact.type == 'configuration'){
var configControl = $('<a />', {'class': 'artifact-control'});
- configControl.attr('href', util.getCurrentHost() + '/content/configurations#' + fullArtifact.name);
+ configControl.attr('href', util.getHostAndAdminPath() + '/content/configurations#' + fullArtifact.name);
configControl.text('VIEW');
artifactControlBar.append(configControl);
}
@@ -227,7 +227,9 @@ var Tree = function() {
}
} else {
if(key == 'Bundle Id'){
- fxContainer.append(self.getArtifactAttribute(key + ': ' + value, undefined, util.getCurrentHost() + '/content/wirings#' + value));
+ fxContainer.append(self.getArtifactAttribute(key + ': ' + value, undefined, util.getHostAndAdminPath() + '/content/wirings#' + value));
+ } else if(key == 'org.eclipse.virgo.web.contextPath') {
+ fxContainer.append(self.getArtifactAttribute('Context Path: ' + value, undefined, util.getHost() + value));
} else {
fxContainer.append(self.getArtifactAttribute(key + ': ' + value));
}
@@ -353,7 +355,7 @@ var Tree = function() {
* @param iconName - for the image
*/
this.setIconElement = function(element, iconName){
- element.css('background', 'url("' + util.getCurrentHost() + '/resources/images/' + iconName.toLowerCase() + '") no-repeat center center');
+ element.css('background', 'url("' + util.getHostAndAdminPath() + '/resources/images/' + iconName.toLowerCase() + '") no-repeat center center');
return element;
};
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/common.js b/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
index 1108c822..7854aab3 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
@@ -101,12 +101,17 @@ var Util = function(){
}
};
+
+ self.getHost = function(){
+ return location.protocol + '//' + location.host;
+ };
+
/**
*
* @returns {String}
*/
- self.getCurrentHost = function(){
- return location.protocol + '//' + location.host + contextPath;
+ self.getHostAndAdminPath = function(){
+ return self.getHost() + contextPath;
};
/**
@@ -132,7 +137,7 @@ var Util = function(){
*/
self.doQuery = function(query, successCallback, errorCallback){
$.ajax({
- url: util.getCurrentHost() + '/jolokia/' + query,
+ url: util.getHostAndAdminPath() + '/jolokia/' + query,
dataType: 'json',
contentType: 'application/json',
cache: false,
@@ -155,7 +160,7 @@ var Util = function(){
self.doBulkQuery = function(query, successCallback, errorCallback){
$.ajax({
type: 'POST',
- url: self.getCurrentHost() + '/jolokia',
+ url: self.getHostAndAdminPath() + '/jolokia',
dataType: 'json',
contentType: 'application/json',
cache: false,
@@ -177,7 +182,7 @@ var Util = function(){
* @param name - the name of the script file to load, .js is not required on the end
*/
self.loadScript = function(name, callback){
- $.getScript(self.getCurrentHost() + '/resources/js/' + name + '.js', callback);
+ $.getScript(self.getHostAndAdminPath() + '/resources/js/' + name + '.js', callback);
};
/**
@@ -519,11 +524,11 @@ var Servers = function(){
var rows;
if(util.queryHash.s){
rows = util.queryHash.s.split(',');
- if(!rows.contains(util.getCurrentHost())){
- rows.push(util.getCurrentHost());
+ if(!rows.contains(util.getHostAndAdminPath())){
+ rows.push(util.getHostAndAdminPath());
}
} else {
- rows = [util.getCurrentHost()];
+ rows = [util.getHostAndAdminPath()];
}
var serversTable = util.makeTable({
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/configurations.js b/org.eclipse.virgo.management.console/src/main/webapp/js/configurations.js
index 80b07034..dd3d2041 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/configurations.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/configurations.js
@@ -46,7 +46,7 @@ ConfigurationInit = {
getConfigurationLabel : function(labelText){
var configContainer = $('<div />', {'class': 'config-container'});
var configLabel = $('<div />', {'class': 'config-label'});
- configLabel.append($('<div />', {'class': 'tree-icon plus'}).css('background', 'url("' + util.getCurrentHost() + '/resources/images/tree-icons/plus.png") no-repeat center center'));
+ configLabel.append($('<div />', {'class': 'tree-icon plus'}).css('background', 'url("' + util.getHostAndAdminPath() + '/resources/images/tree-icons/plus.png") no-repeat center center'));
configLabel.append($('<span />').text(labelText));
configContainer.append(configLabel);
$('#config-list').append(configContainer);
@@ -89,7 +89,7 @@ var Configuration = function(pid, location, regionName, label){
};
self.setPlusMinusIcon = function (icon, className){
- self.icon.css('background', 'url("' + util.getCurrentHost() + '/resources/images/' + icon + '") no-repeat center center');
+ self.icon.css('background', 'url("' + util.getHostAndAdminPath() + '/resources/images/' + icon + '") no-repeat center center');
self.icon.removeClass('plus').removeClass('minus').removeClass('spinnerIcon').addClass(className);
};
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 c4543be5..28dd3b29 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
@@ -17,7 +17,7 @@ function pageinit(){
util.loadScript('raphael', function(){});
dumpViewer = new DumpViewer().displayDumps();
$.ajax({
- url: util.getCurrentHost() + '/jolokia/read/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/ConfiguredDumpDirectory',
+ url: util.getHostAndAdminPath() + '/jolokia/read/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/ConfiguredDumpDirectory',
dataType: 'json',
contentType: 'application/json',
cache: false,
@@ -43,7 +43,7 @@ var DumpViewer = function(){
self.displayDumps = function(){
$('#dumps').empty();
$.ajax({
- url: util.getCurrentHost() + '/jolokia/read/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/Dumps',
+ url: util.getHostAndAdminPath() + '/jolokia/read/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/Dumps',
dataType: 'json',
contentType: 'application/json',
cache: false,
@@ -96,7 +96,7 @@ var DumpViewer = function(){
if(self.selectedDump){
var dumpId = self.selectedDump.attr("id");
$.ajax({
- url: util.getCurrentHost() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/getDumpEntries/' + dumpId,
+ url: util.getHostAndAdminPath() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/getDumpEntries/' + dumpId,
dataType: 'json',
contentType: 'application/json',
cache: false,
@@ -141,7 +141,7 @@ var DumpViewer = function(){
self.displayOSGiStateDumpEntry(event.data.dumpId);
} else {
$.ajax({
- url: util.getCurrentHost() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=' + event.data.queryString,
+ url: util.getHostAndAdminPath() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=' + event.data.queryString,
dataType: 'json',
success: function (response){
self.displayDumpEntryResponse(response.value);
@@ -207,7 +207,7 @@ var DumpViewer = function(){
$('#create-dump-button').addClass('grey-out');
$('#dumps').append($('<div />', {'class' : 'spinner-small'}));
$.ajax({
- url: util.getCurrentHost() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/createDump',
+ url: util.getHostAndAdminPath() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/createDump',
dataType: 'json',
cache: false,
success: function (response){
@@ -223,7 +223,7 @@ var DumpViewer = function(){
var dumpListItem = event.data;
var dumpId = dumpListItem.attr("id");
$.ajax({
- url: util.getCurrentHost() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/deleteDump/' + dumpId,
+ url: util.getHostAndAdminPath() + '/jolokia/exec/org.eclipse.virgo.kernel:type=Medic,name=DumpInspector/deleteDump/' + dumpId,
dataType: 'json',
cache: false,
success: function (response){
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js b/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js
index 7193d583..d8127314 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js
@@ -15,7 +15,7 @@
function pageinit(){
$.ajax({
- url: util.getCurrentHost() + '/jolokia/read/ch.qos.logback.classic:Name=default,Type=ch.qos.logback.classic.jmx.JMXConfigurator/LoggerList',
+ url: util.getHostAndAdminPath() + '/jolokia/read/ch.qos.logback.classic:Name=default,Type=ch.qos.logback.classic.jmx.JMXConfigurator/LoggerList',
dataType: 'json',
success: function (response) {
loggingHandler = new LoggerList(response.value);
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/overview.js b/org.eclipse.virgo.management.console/src/main/webapp/js/overview.js
index 4c054d71..70e38585 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/overview.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/overview.js
@@ -15,7 +15,7 @@
function pageinit() {
$.ajax({
- url: util.getCurrentHost() + '/jolokia/version',
+ url: util.getHostAndAdminPath() + '/jolokia/version',
dataType: 'json',
contentType: 'application/json',
cache: false,
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/repositories.js b/org.eclipse.virgo.management.console/src/main/webapp/js/repositories.js
index c587d808..85a73870 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/repositories.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/repositories.js
@@ -16,7 +16,7 @@
function pageinit() {
$.ajax({
- url: util.getCurrentHost() + '/jolokia/search/org.eclipse.virgo.kernel:type=Repository,*',
+ url: util.getHostAndAdminPath() + '/jolokia/search/org.eclipse.virgo.kernel:type=Repository,*',
dataType: 'json',
contentType: 'application/json',
cache: false,
@@ -59,7 +59,7 @@ Repositories = {
button.addClass('button-selected');
$.ajax({
- url: util.getCurrentHost() + '/jolokia/read/' + button.mbeanName,
+ url: util.getHostAndAdminPath() + '/jolokia/read/' + button.mbeanName,
dataType: 'json',
contentType: 'application/json',
cache: false,

Back to the top