94956bade3
js code cannot reach the api endpoints for action retrieval in specific cases because it depends on the actual url in the browser Closes-bug: 1525169 Depends-On: I837e3fe973d72c792cb34711cef9f6507a004d49 Change-Id: Ibffad1a6a24559535c71ea94ba98deeb78ebeccb
23 lines
443 B
JavaScript
23 lines
443 B
JavaScript
var Browser = (function () {
|
|
|
|
var url_path = $(location).attr("pathname");
|
|
|
|
var url = null;
|
|
url = $(location).attr("protocol");
|
|
url += "//";
|
|
url += $(location).attr("host");
|
|
|
|
if (url_path.indexOf("horizon") > -1) {
|
|
url += '/horizon/disaster_recovery/api/';
|
|
} else {
|
|
url += '/disaster_recovery/api/';
|
|
}
|
|
|
|
return {
|
|
get_url : function () {
|
|
return url;
|
|
}
|
|
}
|
|
|
|
})();
|