mirror of https://github.com/apache/cloudstack.git
bug 11607: cloudStack - Make client API path and client Console path configurable in the UI code.
This commit is contained in:
parent
25c78592f4
commit
425f084f39
|
|
@ -45,12 +45,15 @@ automatically log you in.
|
|||
|
||||
Below is a sample login attempt
|
||||
*/
|
||||
|
||||
var clientApiUrl = "/client/api";
|
||||
var clientConsoleUrl = "/client/console";
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var url = $.urlParam("loginUrl");
|
||||
if (url != undefined && url != null && url.length > 0) {
|
||||
url = unescape("/client/api?"+url);
|
||||
url = unescape(clientApiUrl+"?"+url);
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: "json",
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ $(document).ready(function() {
|
|||
|
||||
// Default AJAX Setup
|
||||
$.ajaxSetup({
|
||||
url: "/client/api",
|
||||
url: clientApiUrl,
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
error: function(XMLHttpResponse) {
|
||||
|
|
|
|||
|
|
@ -950,7 +950,7 @@ function resetViewConsoleAction(jsonObj, $detailsTab) {
|
|||
$viewConsoleContainer.append($viewConsoleTemplate.show());
|
||||
if (jsonObj.state == 'Running') {
|
||||
//console proxy thumbnail
|
||||
var imgUrl = "console?cmd=thumbnail&vm=" + jsonObj.id + "&w=144&h=110";
|
||||
var imgUrl = clientConsoleUrl + "?cmd=thumbnail&vm=" + jsonObj.id + "&w=144&h=110";
|
||||
$viewConsoleTemplate.data("imgUrl", imgUrl);
|
||||
|
||||
$viewConsoleContainer.bind("mouseover", function(event) {
|
||||
|
|
@ -963,7 +963,7 @@ function resetViewConsoleAction(jsonObj, $detailsTab) {
|
|||
});
|
||||
|
||||
//console proxy popup
|
||||
$viewConsoleTemplate.data("proxyUrl", "console?cmd=access&vm=" + jsonObj.id).data("vmId",jsonObj.id).click(function(event) {
|
||||
$viewConsoleTemplate.data("proxyUrl", (clientConsoleUrl + "?cmd=access&vm=" + jsonObj.id)).data("vmId",jsonObj.id).click(function(event) {
|
||||
var proxyUrl = $(this).data("proxyUrl");
|
||||
//proxyUrl = "http://localhost:8080/client/" + proxyUrl; //***** temporary hack. This line will be removed after new UI code (/ui/new/*) moves to /ui/*
|
||||
var viewer = window.open(proxyUrl, $(this).data("vmId"),"width=820,height=640,resizable=yes,menubar=no,status=no,scrollbars=no,toolbar=no,location=no");
|
||||
|
|
|
|||
Loading…
Reference in New Issue