diff --git a/xCAT-UI/js/xcatauth.js b/xCAT-UI/js/xcatauth.js index 68cb88dc7..3c3150e0d 100644 --- a/xCAT-UI/js/xcatauth.js +++ b/xCAT-UI/js/xcatauth.js @@ -56,8 +56,21 @@ function onlogin(data, txtStatus) { $("#logstatus").text("Login successful"); $("#logdialog").dialog("close"); - // Remembered what page they were trying to go to - window.location = 'index.php'; + //not the first time to log + if ($.cookie('logonflag')){ + // Remembered what page they were trying to go to + window.location = window.location.pathname; + } + else{ + window.location = 'manual.php'; + } + + //set the logonflag + $.cookie('logonflag', 'yes', { + path : '/xcat', + expires : 100 + }); + } else { $("#logstatus").text("Authentication failure"); $("#logstatus").css("color", "#FF0000"); diff --git a/xCAT-UI/lib/ui.php b/xCAT-UI/lib/ui.php index d903fd7d6..e43280bb0 100644 --- a/xCAT-UI/lib/ui.php +++ b/xCAT-UI/lib/ui.php @@ -33,6 +33,7 @@ function loadPage(){
Give the user name and password for the xCAT management node