Commit 690eb4b6 by Robin Tegg

SBA: Need to remove preceeding slashes from jolokia calls to allow access when behind a proxy

parent 0346c9a5
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
module.exports = function ($rootScope, Abbreviator, jolokia) { module.exports = function ($rootScope, Abbreviator, jolokia) {
this.list = function (app) { this.list = function (app) {
return jolokia.list('/api/applications/' + app.id + '/jolokia/') return jolokia.list('api/applications/' + app.id + '/jolokia/')
.then(function (response) { .then(function (response) {
var domains = []; var domains = [];
for (var rDomainName in response.value) { for (var rDomainName in response.value) {
...@@ -81,14 +81,14 @@ module.exports = function ($rootScope, Abbreviator, jolokia) { ...@@ -81,14 +81,14 @@ module.exports = function ($rootScope, Abbreviator, jolokia) {
}; };
this.readAllAttr = function (app, bean) { this.readAllAttr = function (app, bean) {
return jolokia.read('/api/applications/' + app.id + '/jolokia/', bean.id); return jolokia.read('api/applications/' + app.id + '/jolokia/', bean.id);
}; };
this.writeAttr = function (app, bean, attr, val) { this.writeAttr = function (app, bean, attr, val) {
return jolokia.writeAttr('/api/applications/' + app.id + '/jolokia/', bean.id, attr, val); return jolokia.writeAttr('api/applications/' + app.id + '/jolokia/', bean.id, attr, val);
}; };
this.invoke = function (app, bean, opname, args) { this.invoke = function (app, bean, opname, args) {
return jolokia.exec('/api/applications/' + app.id + '/jolokia/', bean.id, opname, args); return jolokia.exec('api/applications/' + app.id + '/jolokia/', bean.id, opname, args);
}; };
}; };
...@@ -29,16 +29,16 @@ module.exports = function ($http, jolokia) { ...@@ -29,16 +29,16 @@ module.exports = function ($http, jolokia) {
arguments: [loggers[j].name] arguments: [loggers[j].name]
}); });
} }
return jolokia.bulkRequest('/api/applications/' + app.id + '/jolokia/', requests); return jolokia.bulkRequest('api/applications/' + app.id + '/jolokia/', requests);
}; };
this.setLoglevel = function (app, logger, level) { this.setLoglevel = function (app, logger, level) {
return jolokia.exec('/api/applications/' + app.id + '/jolokia/', LOGBACK_MBEAN, 'setLoggerLevel', [logger, return jolokia.exec('api/applications/' + app.id + '/jolokia/', LOGBACK_MBEAN, 'setLoggerLevel', [logger,
level level
]); ]);
}; };
this.getAllLoggers = function (app) { this.getAllLoggers = function (app) {
return jolokia.readAttr('/api/applications/' + app.id + '/jolokia/', LOGBACK_MBEAN, 'LoggerList'); return jolokia.readAttr('api/applications/' + app.id + '/jolokia/', LOGBACK_MBEAN, 'LoggerList');
}; };
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment