From d3a70cefa26b823cca830fdc6fd8fde648b2552f Mon Sep 17 00:00:00 2001 From: xq2005 Date: Tue, 3 May 2011 06:00:39 +0000 Subject: [PATCH] open the guide page on first time logon git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9469 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/xcatauth.js | 17 +++++++++++++++-- xCAT-UI/lib/ui.php | 4 +++- 2 files changed, 18 insertions(+), 3 deletions(-) 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(){
  • Configure
  • Provision
  • Monitor
  • +
  • Guide
  • '; // User name and log out section @@ -80,7 +81,8 @@ function login() { // xcatauth.js will open a dialog box // asking for the user name and password echo - ' + ' +

    Give the user name and password for the xCAT management node