CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - when switching to another 
region, handle a case that the region's end point is not 
"http://hostname:port/client/";


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f4fad9e2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f4fad9e2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f4fad9e2

Branch: refs/heads/marvin_refactor
Commit: f4fad9e2c753c5c0e8120170268e9e06efcf1575
Parents: 5f482f5
Author: Jessica Wang <[email protected]>
Authored: Mon Mar 25 15:30:01 2013 -0700
Committer: Prasanna Santhanam <[email protected]>
Committed: Sun Mar 31 22:03:10 2013 +0530

----------------------------------------------------------------------
 ui/scripts/cloud.core.callbacks.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4fad9e2/ui/scripts/cloud.core.callbacks.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloud.core.callbacks.js 
b/ui/scripts/cloud.core.callbacks.js
index 19d759e..07994f2 100644
--- a/ui/scripts/cloud.core.callbacks.js
+++ b/ui/scripts/cloud.core.callbacks.js
@@ -59,9 +59,9 @@ $(document).ready(function() {
        */
        if ($.urlParam('loginUrl') != 0) {
                $.cookie('loginUrl', $.urlParam('loginUrl'), { expires: 1});
-         document.location.href = '/client/';
+               document.location.href = window.location.href.substring(0, 
window.location.href.indexOf('?'));
        }
-       
+
        /*
        condition 2: If window.location.href does not contain parameter 
'loginUrl' but cookie 'loginUrl' exists,
        save the cookie's value to g_regionUrlParam (a global variable for 
switching regions),

Reply via email to