Skip to content

Commit ebcdef5

Browse files
author
Jessica Wang
committed
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - shorten value of g_loginCmdText
1 parent d9f7bb2 commit ebcdef5

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎ui/scripts/cloud.core.callbacks.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ $(document).ready(function() {
7373
}
7474
});
7575
}
76-
else if(window.name != null && window.name.indexOf("command=login") != -1) { //from region switching
76+
else if(window.name != null && window.name.indexOf("&domain=") != -1) { //from region switching
7777
g_loginCmdText = window.name;
7878
$.ajax({
79-
url: clientApiUrl + "?" + window.name,
79+
url: clientApiUrl + "?command=login" + window.name + "&response=json",
8080
dataType: "json",
8181
async: false,
8282
success: function(json) {

‎ui/scripts/cloudStack.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@
250250
else {
251251
array1.push("&domain=" + encodeURIComponent("/"));
252252
}
253-
254-
g_loginCmdText = "command=login" + array1.join("") + "&response=json";
253+
254+
g_loginCmdText = array1.join("");
255255

256256
$.ajax({
257257
type: "POST",
258-
data: g_loginCmdText,
258+
data: "command=login" + g_loginCmdText + "&response=json",
259259
dataType: "json",
260260
async: false,
261261
success: function(json) {
@@ -466,7 +466,7 @@
466466
document.title = 'CloudStack';
467467

468468
if ($.urlParam('loginUrl') != 0
469-
||(window.name != null && window.name.indexOf("command=login") != -1)) {
469+
||(window.name != null && window.name.indexOf("&domain=") != -1)) {
470470
// SSO
471471
loginArgs.hideLoginScreen = true;
472472
}

0 commit comments

Comments
 (0)