From 4085457ee5f81a186cedccdde7f1c76da7692af4 Mon Sep 17 00:00:00 2001 From: christophe-g Date: Tue, 27 Jan 2015 17:37:22 +0100 Subject: [PATCH] modified url so that it works in standalone mode --- resources/scripts/exadmin.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/scripts/exadmin.js b/resources/scripts/exadmin.js index 599e4bf..0e7346b 100644 --- a/resources/scripts/exadmin.js +++ b/resources/scripts/exadmin.js @@ -317,7 +317,10 @@ JMX.connection = (function() { invoke: function(operation, mbean, args) { var url; if (currentInstance.name() == "localhost") { - url = location.pathname.replace(/^(.*)\/apps\/.*$/, "$1") + + // url = location.pathname.replace(/^(.*)\/apps\/.*$/, "$1") + + url = ~location.pathname.indexOf("\/apps\/") + ? location.pathname.replace(/^(.*)\/apps\/.*$/, "$1") + : "" + "/status?operation=" + operation + "&mbean=" + mbean + "&token=" + currentInstance.token; } else { url = "modules/remote.xql?operation=" + operation + "&mbean=" + mbean + "&name=" + currentInstance.name(); @@ -343,7 +346,10 @@ JMX.connection = (function() { var url; var name = currentInstance.name(); if (name == "localhost") { - url = location.pathname.replace(/^(.*)\/apps\/.*$/, "$1") + + //url = location.pathname.replace(/^(.*)\/apps\/.*$/, "$1") + + url = ~location.pathname.indexOf("\/apps\/") + ? location.pathname.replace(/^(.*)\/apps\/.*$/, "$1") + : "" + "/status?c=instances&c=processes&c=locking&c=memory&c=caches&c=system&token=" + currentInstance.token; } else { url = "modules/remote.xql?name=" + name;