From c734549c32948e6e625a00b43aebbb8399aebe69 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Thu, 23 Oct 2008 17:54:02 +0000 Subject: [PATCH] Login authentication for xCAT-web now works, using Jarrod's code git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2383 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/share/doc/index.html | 16 +- xCAT-web/config/db.php | 2 +- xCAT-web/config/prefs.php | 2 +- xCAT-web/images/throbber.gif | Bin 0 -> 1844 bytes ...rsonalized.min.js => jquery-ui-all.min.js} | 0 .../222222_11x11_icon_arrows_leftright.gif | Bin 0 -> 58 bytes .../222222_11x11_icon_arrows_updown.gif | Bin 0 -> 56 bytes .../theme/images/222222_11x11_icon_close.gif | Bin 0 -> 62 bytes .../jq/theme/images/222222_11x11_icon_doc.gif | Bin 0 -> 64 bytes .../222222_11x11_icon_folder_closed.gif | Bin 0 -> 61 bytes .../images/222222_11x11_icon_folder_open.gif | Bin 0 -> 61 bytes .../theme/images/222222_11x11_icon_minus.gif | Bin 0 -> 56 bytes .../theme/images/222222_11x11_icon_plus.gif | Bin 0 -> 61 bytes .../images/222222_11x11_icon_resize_se.gif | Bin 0 -> 61 bytes .../jq/theme/images/222222_7x7_arrow_down.gif | Bin 0 -> 52 bytes .../jq/theme/images/222222_7x7_arrow_left.gif | Bin 0 -> 53 bytes .../theme/images/222222_7x7_arrow_right.gif | Bin 0 -> 53 bytes .../jq/theme/images/222222_7x7_arrow_up.gif | Bin 0 -> 52 bytes .../888888_11x11_icon_arrows_leftright.gif | Bin 0 -> 58 bytes .../888888_11x11_icon_arrows_updown.gif | Bin 0 -> 56 bytes .../theme/images/888888_11x11_icon_close.gif | Bin 0 -> 62 bytes .../jq/theme/images/888888_11x11_icon_doc.gif | Bin 0 -> 64 bytes .../888888_11x11_icon_folder_closed.gif | Bin 0 -> 61 bytes .../images/888888_11x11_icon_folder_open.gif | Bin 0 -> 61 bytes .../theme/images/888888_11x11_icon_minus.gif | Bin 0 -> 56 bytes .../theme/images/888888_11x11_icon_plus.gif | Bin 0 -> 61 bytes .../jq/theme/images/888888_7x7_arrow_down.gif | Bin 0 -> 52 bytes .../jq/theme/images/888888_7x7_arrow_left.gif | Bin 0 -> 53 bytes .../theme/images/888888_7x7_arrow_right.gif | Bin 0 -> 53 bytes .../jq/theme/images/888888_7x7_arrow_up.gif | Bin 0 -> 52 bytes .../8ab9ff_40x100_textures_02_glass_50.png | Bin 0 -> 219 bytes .../d8d8d8_40x100_textures_02_glass_90.png | Bin 0 -> 221 bytes .../e0e0e0_40x100_textures_02_glass_80.png | Bin 0 -> 214 bytes .../f3f3f3_40x100_textures_01_flat_0.png | Bin 0 -> 180 bytes .../ffffff_11x11_icon_arrows_leftright.gif | Bin 0 -> 58 bytes .../ffffff_11x11_icon_arrows_updown.gif | Bin 0 -> 56 bytes .../theme/images/ffffff_11x11_icon_close.gif | Bin 0 -> 62 bytes .../jq/theme/images/ffffff_11x11_icon_doc.gif | Bin 0 -> 64 bytes .../ffffff_11x11_icon_folder_closed.gif | Bin 0 -> 61 bytes .../images/ffffff_11x11_icon_folder_open.gif | Bin 0 -> 61 bytes .../theme/images/ffffff_11x11_icon_minus.gif | Bin 0 -> 56 bytes .../theme/images/ffffff_11x11_icon_plus.gif | Bin 0 -> 61 bytes .../jq/theme/images/ffffff_7x7_arrow_down.gif | Bin 0 -> 52 bytes .../jq/theme/images/ffffff_7x7_arrow_left.gif | Bin 0 -> 53 bytes .../theme/images/ffffff_7x7_arrow_right.gif | Bin 0 -> 53 bytes .../jq/theme/images/ffffff_7x7_arrow_up.gif | Bin 0 -> 52 bytes xCAT-web/jq/theme/jquery-ui-theme.css | 832 ++++++++++++++++++ xCAT-web/lib/CommandWindow.js | 56 -- xCAT-web/lib/functions.js | 62 +- xCAT-web/lib/functions.php | 226 ++++- xCAT-web/lib/jsonwrapper.php | 6 + xCAT-web/lib/jsonwrapper_inner.php | 23 + xCAT-web/lib/log.php | 30 + xCAT-web/lib/logout.php | 28 + xCAT-web/lib/phpinfo.php | 50 +- xCAT-web/lib/style.css | 19 +- xCAT-web/lib/xcatauth.js | 66 ++ xCAT-web/machines/discover.php | 2 +- xCAT-web/machines/noderangesource.php | 51 ++ xCAT-web/manage/dsh.css | 14 + xCAT-web/manage/dsh.js | 60 ++ xCAT-web/manage/dsh.php | 79 +- xCAT-web/manage/dsh_action.php | 56 +- xCAT-web/support/diagnose.php | 14 + xCAT-web/xCAT-web.spec | 4 +- 65 files changed, 1446 insertions(+), 252 deletions(-) create mode 100644 xCAT-web/images/throbber.gif rename xCAT-web/jq/{jquery-ui-personalized.min.js => jquery-ui-all.min.js} (100%) create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_arrows_leftright.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_arrows_updown.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_close.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_doc.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_folder_closed.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_folder_open.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_minus.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_plus.gif create mode 100644 xCAT-web/jq/theme/images/222222_11x11_icon_resize_se.gif create mode 100644 xCAT-web/jq/theme/images/222222_7x7_arrow_down.gif create mode 100644 xCAT-web/jq/theme/images/222222_7x7_arrow_left.gif create mode 100644 xCAT-web/jq/theme/images/222222_7x7_arrow_right.gif create mode 100644 xCAT-web/jq/theme/images/222222_7x7_arrow_up.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_arrows_leftright.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_arrows_updown.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_close.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_doc.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_folder_closed.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_folder_open.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_minus.gif create mode 100644 xCAT-web/jq/theme/images/888888_11x11_icon_plus.gif create mode 100644 xCAT-web/jq/theme/images/888888_7x7_arrow_down.gif create mode 100644 xCAT-web/jq/theme/images/888888_7x7_arrow_left.gif create mode 100644 xCAT-web/jq/theme/images/888888_7x7_arrow_right.gif create mode 100644 xCAT-web/jq/theme/images/888888_7x7_arrow_up.gif create mode 100644 xCAT-web/jq/theme/images/8ab9ff_40x100_textures_02_glass_50.png create mode 100644 xCAT-web/jq/theme/images/d8d8d8_40x100_textures_02_glass_90.png create mode 100644 xCAT-web/jq/theme/images/e0e0e0_40x100_textures_02_glass_80.png create mode 100644 xCAT-web/jq/theme/images/f3f3f3_40x100_textures_01_flat_0.png create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_arrows_leftright.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_arrows_updown.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_close.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_doc.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_folder_closed.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_folder_open.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_minus.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_11x11_icon_plus.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_7x7_arrow_down.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_7x7_arrow_left.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_7x7_arrow_right.gif create mode 100644 xCAT-web/jq/theme/images/ffffff_7x7_arrow_up.gif create mode 100644 xCAT-web/jq/theme/jquery-ui-theme.css delete mode 100644 xCAT-web/lib/CommandWindow.js create mode 100644 xCAT-web/lib/jsonwrapper.php create mode 100644 xCAT-web/lib/jsonwrapper_inner.php create mode 100644 xCAT-web/lib/log.php create mode 100644 xCAT-web/lib/logout.php create mode 100644 xCAT-web/lib/xcatauth.js create mode 100644 xCAT-web/machines/noderangesource.php create mode 100644 xCAT-web/manage/dsh.css create mode 100644 xCAT-web/manage/dsh.js diff --git a/xCAT-client/share/doc/index.html b/xCAT-client/share/doc/index.html index 4eca5a318..abf2c7177 100644 --- a/xCAT-client/share/doc/index.html +++ b/xCAT-client/share/doc/index.html @@ -10,20 +10,20 @@

xCAT 2 on the Internet

diff --git a/xCAT-web/config/db.php b/xCAT-web/config/db.php index 8534b0274..e219096d6 100644 --- a/xCAT-web/config/db.php +++ b/xCAT-web/config/db.php @@ -6,7 +6,7 @@ $TOPDIR = '..'; require_once "$TOPDIR/lib/functions.php"; insertHeader('xCAT Database', array('db.css'), - array('db.js',"$TOPDIR/jq/jquery.min.js","$TOPDIR/jq/jquery.jeditable.mini.js"), + array('db.js',"$TOPDIR/jq/jquery.jeditable.mini.js"), array('config','db')); echo "
\n"; diff --git a/xCAT-web/config/prefs.php b/xCAT-web/config/prefs.php index 162335617..ae4f6da00 100644 --- a/xCAT-web/config/prefs.php +++ b/xCAT-web/config/prefs.php @@ -8,7 +8,7 @@ require_once "$TOPDIR/lib/functions.php"; insertHeader('Preferences', NULL, NULL, array('config','prefs')); -echo "
\n"; +echo "
\n"; //foreach ($_COOKIE as $key => $value) { echo "

$key: {$_COOKIE[$key]}

\n"; } diff --git a/xCAT-web/images/throbber.gif b/xCAT-web/images/throbber.gif new file mode 100644 index 0000000000000000000000000000000000000000..95ff649d4162b61d8107adb91ded5940c55e5e4c GIT binary patch literal 1844 zcmb8wYfw{X8VB&hIq%6iIhW)mA`M8L5P~KlG2s@XSob7=AW#Zaq2*E%FqBZJfr`); zkz5dhT$O6^QnjT8MO#30dIMu*M%#|A%sTD#HlrO{wY4p*+gY9IuA49mlMnl4pO4Rn z_x;WPd7pXHw`|t0H$wy>|3Hw(j~{a!_u#>U;o;#sckb-mx%0@8BfgH^ZZ9e-@_0Pg zuV2r}$(fv-G#ZUnRaM>H-N^q_k^f%#w0XNlQvRyMP;G9?-eKOp&iZoY4kYpsKq%iy zk&o$|w5`vk7;@9%)@iXIUrXh`!0$uwMu`MP`H?@4ps7akilJ{bBf@>_s`rfO+$HlE z_Fk&P3xDDyFI)&Q+D0D-t5Ep7fgL^^iyWBJy&O)R%{5h*T2g>V_})by$5BvGMU@al2va{GSn|) zut3aWE?+13Fs?{4V?p|bQq;SOzLD3f;hf_gY5^446Ivm_FQ2l(1VLAR%s)R>i-_ZQ z&)d$DSBFirx$=WL(s}#DvGDnAnm;9cl2)pKO93!>jHXmt^Gus&uhQ^R|DFS#bk;yu zXQ`n@r#qor$^`^cY8FQ%_U9rcuPm(gQQBA0%+xf3slU`~Gl0l3-uhHd@=4~#=fPWD zY4>lysnGXV{#LgVhTk3fb=>k6^YgYHS#f2BMSuUktH3=OTm51ouy8vYGBlb-(_h-$ zl`T>G-3N682cnh$cp#v~5BNys1309lb0K_2N$pK$Z29M+QP)_MmN#_RbW-98UwgS? zP(Boj4P9v56UqUqayN2-d{sv%3*41~dbPL50LqF%%JdK+R7xC!#fqWeXW-SxiQ8bZ+FW zwT7cvr}lqv>zi)X+ZX;N00-P@CGr~Q(Nk-Z6D8fZV4^71JrmZdy}SBcyu*A(s}}8B z*>_$YA((ygq(?jedM-O{83`c}FW|#y)`}6BP)ON|^QFyvv{Weq4FU6?`ljcAY4=EKQf?Yl7+^t|3)Zc4cK^3ZD9J7O$H9Oa)hMNH$W z@k=*@!>0RBjDHb2eQm|uteh_*u1<|TDFHOei>5YV1WV#HL&YfpAw)Y-p3thK`5GMG z00(1a7`AI!Lj`IY{I6y)o0{U&vfI=|Caf!d$6Lq551R6d9|{sz*dJ~P6Lh{Y54JoP zsrA$wQuSgcW!GrmXCe4^8M&3#;ORLlk~aW)orYY_whE^3*yvP*&E-KL%uCQQxDUfx zE37CabE>tCtV^-HQgonXc}nY;y6F*0m5$QyXF{Z2{y{`$pPnJxQ|9NC!JX}UjgzXu z@Se7x*N8V#ZT7CoZ^J}Y<4j?T8h+YunpN?c_Je;6iB;EeXQPV7+Th06 dtwLDJL#a0_K>wk&Y~4#Tit}rd{U6a{{Rfg56CMBn literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/jquery-ui-personalized.min.js b/xCAT-web/jq/jquery-ui-all.min.js similarity index 100% rename from xCAT-web/jq/jquery-ui-personalized.min.js rename to xCAT-web/jq/jquery-ui-all.min.js diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_arrows_leftright.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_arrows_leftright.gif new file mode 100644 index 0000000000000000000000000000000000000000..b26780a3b519071fe2341991b85621d6f44e8df4 GIT binary patch literal 58 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDm;`(JSDt3vcVM!oUzf(Z L4L{e5FjxZsbBGUF literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_arrows_updown.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_arrows_updown.gif new file mode 100644 index 0000000000000000000000000000000000000000..69eb0770ae9de5f12144e945fd5786d47e551a16 GIT binary patch literal 56 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDnD~48S8`=Dh|gJf?!<;Q IcSISi0ZAea&;S4c literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_close.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_close.gif new file mode 100644 index 0000000000000000000000000000000000000000..70d0c82bc9284bf9483461183e40210bf9a67fd7 GIT binary patch literal 62 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDm_&Q}*%##OW-8fi*8O3w Obn!onNi$Sf8LR=OZV%7^ literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_doc.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_doc.gif new file mode 100644 index 0000000000000000000000000000000000000000..26db4340c1a9ba73ff8a8e024fd4bb2cf35d1733 GIT binary patch literal 64 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDn8bVf*|{&CxYcyVS6H~O Q^mBUcDfUSV%0w8f0nR=VBLDyZ literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_folder_closed.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_folder_closed.gif new file mode 100644 index 0000000000000000000000000000000000000000..4efed68326e48add8cf75eeb42e0d3b9d9c7ee06 GIT binary patch literal 61 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDm_&N|SF-c|ikN)vq7?JC OwDa$DA4M=QSOWl@gb)z` literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_folder_open.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_folder_open.gif new file mode 100644 index 0000000000000000000000000000000000000000..0032ff62d018f7d5442095c2701835df64363b64 GIT binary patch literal 61 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDm_&N|SF-cIdSrZQ<2I&s NA;rH^lY$r+tO1{k5Apy2 literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_minus.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_minus.gif new file mode 100644 index 0000000000000000000000000000000000000000..6851f39811a8ae8a532c8641b76039bf74b384b1 GIT binary patch literal 56 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDnD~48SDxnOU)Wg^baT_a IWeg0~08dH{{Qv*} literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_plus.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_plus.gif new file mode 100644 index 0000000000000000000000000000000000000000..74ac5cb910d74824b3c098481a2b1f35acd52cbb GIT binary patch literal 61 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDm_&N|IcIOba3*;Dp@h|E Oc+UPXO`IaaU=0AQbP*H) literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_11x11_icon_resize_se.gif b/xCAT-web/jq/theme/images/222222_11x11_icon_resize_se.gif new file mode 100644 index 0000000000000000000000000000000000000000..251dc1628e0fe7820d7ae0d494a2e4708d6cfada GIT binary patch literal 61 zcmZ?wbhEHbJ3nK#qBZCeD5P)PDm_&N|8&+4pWhyB+b-dux Np18-A3j!G!tO2bd5heft literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_7x7_arrow_down.gif b/xCAT-web/jq/theme/images/222222_7x7_arrow_down.gif new file mode 100644 index 0000000000000000000000000000000000000000..29c6c706dd9961f80220744c417ca2dc6a6145ba GIT binary patch literal 52 zcmZ?wbhEHbWM^P!XkcJaQBq<2_gC>J3nK#qBZCeD5P)PDn7DiTIZg|_J3nK#qBZCeD5P)PDn0R`a(J3nK#qBZCeD5P)PDn0R~=Dpx#sdt;KfY$yYR FH2@=@3;_TD literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/222222_7x7_arrow_up.gif b/xCAT-web/jq/theme/images/222222_7x7_arrow_up.gif new file mode 100644 index 0000000000000000000000000000000000000000..28169eb91959d1b21e2e1c99bd68e433f59febfc GIT binary patch literal 52 zcmZ?wbhEHbWM^P!XkcJaQBq<2_gC>J3nK#qBZCeD5P)PDn7DiT8yIVOC3{xSVq&lc E0162TQ2+n{ literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_arrows_leftright.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_arrows_leftright.gif new file mode 100644 index 0000000000000000000000000000000000000000..19f9d6b21a9b2daa2f639510d5411596f5b1f270 GIT binary patch literal 58 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDm;`(JSDt3vcVM!oUzf(Z L4L{e5FjxZssVESU literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_arrows_updown.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_arrows_updown.gif new file mode 100644 index 0000000000000000000000000000000000000000..c10451f64f86689c88171f350381a10acc9394ee GIT binary patch literal 56 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDnD~48S8`=Dh|gJf?!<;Q IcSISi0en&q2mk;8 literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_close.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_close.gif new file mode 100644 index 0000000000000000000000000000000000000000..326d015330520dab34a3bf6911b2dcb14b2798e4 GIT binary patch literal 62 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDm_&Q}*%##OW-8fi*8O3w Obn!onNi$Sf8LR=|?hyz8 literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_doc.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_doc.gif new file mode 100644 index 0000000000000000000000000000000000000000..7d1b5cb574c6a608170bab4b6a8784cb92aa800d GIT binary patch literal 64 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDn8bVf*|{&CxYcyVS6H~O Q^mBUcDfUSV%0w8f0Si46TL1t6 literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_folder_closed.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_folder_closed.gif new file mode 100644 index 0000000000000000000000000000000000000000..71bff058363134a161d3061d256e19c0a2da1f23 GIT binary patch literal 61 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDm_&N|SF-c|ikN)vq7?JC OwDa$DA4M=QSOWmn%n?Zd literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_folder_open.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_folder_open.gif new file mode 100644 index 0000000000000000000000000000000000000000..33a20b851c4630bb3573ab293d16fbe75174d2d4 GIT binary patch literal 61 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDm_&N|SF-cIdSrZQ<2I&s NA;rH^lY$r+tO3~55h?%x literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_minus.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_minus.gif new file mode 100644 index 0000000000000000000000000000000000000000..777c3288ff3aa7ec86bca0ea85d48d0d72c5a12f GIT binary patch literal 56 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDnD~48SDxnOU)Wg^baT_a IWeg0~0D^iCH2?qr literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_11x11_icon_plus.gif b/xCAT-web/jq/theme/images/888888_11x11_icon_plus.gif new file mode 100644 index 0000000000000000000000000000000000000000..43531fff3c1905994ea865dc738282461e4da3a9 GIT binary patch literal 61 zcmZ?wbhEHbFQzp_gC>J3nK#qBZCeD5P)PDm_&N|IcIOba3*;Dp@h|E Oc+UPXO`IaaU=0A}yb??R literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_7x7_arrow_down.gif b/xCAT-web/jq/theme/images/888888_7x7_arrow_down.gif new file mode 100644 index 0000000000000000000000000000000000000000..c91731de5c662e0dafff944fbeca152cbd88e509 GIT binary patch literal 52 zcmZ?wbhEHbWM^P!XkcLI>FQzp_gC>J3nK#qBZCeD5P)PDn7DiTIZg|_FQzp_gC>J3nK#qBZCeD5P)PDn0R`a(FQzp_gC>J3nK#qBZCeD5P)PDn0R~=Dpx#sdt;KfY$yYR FH2_m54LJY+ literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/888888_7x7_arrow_up.gif b/xCAT-web/jq/theme/images/888888_7x7_arrow_up.gif new file mode 100644 index 0000000000000000000000000000000000000000..165666af012e69a113c200a6c1b70491a703c077 GIT binary patch literal 52 zcmZ?wbhEHbWM^P!XkcLI>FQzp_gC>J3nK#qBZCeD5P)PDn7DiT8yIVOC3{xSVq&lc E0619-i2wiq literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/8ab9ff_40x100_textures_02_glass_50.png b/xCAT-web/jq/theme/images/8ab9ff_40x100_textures_02_glass_50.png new file mode 100644 index 0000000000000000000000000000000000000000..ea92c4c512c736cde5fd1b1ff2e5d0a747ccb570 GIT binary patch literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsYRYHjv*P1Z?7EWJ!Bx@>Nsb| zf4LQHQ9CX?3do7Q>YN`ILap6qyXXBaa+_RXj%CnTIr2TiV-Ll|j&3>j>yk=b$e_F{Fzi?H; RMxbjMJYD@<);T3K0RY+3RR;h7 literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/d8d8d8_40x100_textures_02_glass_90.png b/xCAT-web/jq/theme/images/d8d8d8_40x100_textures_02_glass_90.png new file mode 100644 index 0000000000000000000000000000000000000000..7730bae7e05cfe8a6b11c77268a303b0bf999de6 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsU@B+jv*P1Z?8BC9ySnQaXige zKZ7lSiIe&HMgF_VY>wCGdA;8E{=MOjV)F;_j9VL`9CR0m1#qumy~31*pF96~Wtnu` z?EMd-vbR6n`t!i&Ikit4Zv8Q@h`pY7I9qqc*?0p5vw!k))><=F;Wx>C8WZ~}CcT3{ Qf$nASboFyt=akR{0LVR2H~;_u literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/e0e0e0_40x100_textures_02_glass_80.png b/xCAT-web/jq/theme/images/e0e0e0_40x100_textures_02_glass_80.png new file mode 100644 index 0000000000000000000000000000000000000000..7952d2323f38e403dbcb7752d39b617f4547f7bc GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*Fskxpmjv*P1Z!d2YJZvDqVmR^f zzuzIOJa74)Brw-9gls7GU-x_8{_6?9-!{~H_ucIp~#OYFF@$eBego}$P1x62S^Pf-bSQ(TtDnm{ Hr-UW|Ml(*W literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/f3f3f3_40x100_textures_01_flat_0.png b/xCAT-web/jq/theme/images/f3f3f3_40x100_textures_01_flat_0.png new file mode 100644 index 0000000000000000000000000000000000000000..ed434be5ae06276b6fb92df3b25d4590ea354589 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FscKIb$B>N1x91EQ4=4yQ7#`Sv zTRcFebP0l+XkK DXTC6f literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/ffffff_11x11_icon_arrows_leftright.gif b/xCAT-web/jq/theme/images/ffffff_11x11_icon_arrows_leftright.gif new file mode 100644 index 0000000000000000000000000000000000000000..b23fdec379949e87e4e75005eba559161b961530 GIT binary patch literal 58 zcmZ?wbhEHbe Jxg*M84FI$n5L^HN literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/ffffff_11x11_icon_close.gif b/xCAT-web/jq/theme/images/ffffff_11x11_icon_close.gif new file mode 100644 index 0000000000000000000000000000000000000000..b897068df10a7cc21bc04cbc163728307732475b GIT binary patch literal 62 zcmZ?wbhEHb%3uuuAiWY? literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/ffffff_11x11_icon_doc.gif b/xCAT-web/jq/theme/images/ffffff_11x11_icon_doc.gif new file mode 100644 index 0000000000000000000000000000000000000000..586b716bcaa6c59d18f02f12746407ad75e4cf85 GIT binary patch literal 64 zcmZ?wbhEHb2Gm F)&P9z4R!zk literal 0 HcmV?d00001 diff --git a/xCAT-web/jq/theme/images/ffffff_7x7_arrow_right.gif b/xCAT-web/jq/theme/images/ffffff_7x7_arrow_right.gif new file mode 100644 index 0000000000000000000000000000000000000000..ab14178610fb9542d5e327f041353d009c9416a5 GIT binary patch literal 53 zcmZ?wbhEHbWM^P!XkcLY^Y0JizrTt> Make your jQuery Components ThemeRoller-Compatible! +*/ + +/*component global class*/ +.ui-component { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; + font-size: 1.2em; +} +/*component content styles*/ +.ui-component-content { + border: 1px solid #dddddd; + background: #f3f3f3 url(images/f3f3f3_40x100_textures_01_flat_0.png) 0 0 repeat-x; + color: #362b36; +} +.ui-component-content a { + color: #362b36; + text-decoration: underline; +} +/*component states*/ +.ui-default-state { + border: 1px solid #cccccc; + background: #e0e0e0 url(images/e0e0e0_40x100_textures_02_glass_80.png) 0 50% repeat-x; + font-weight: normal; + color: #444444 !important; +} +.ui-default-state a { + color: #444444; +} +.ui-default-state:hover, .ui-hover-state { + border: 1px solid #888888; + background: #d8d8d8 url(images/d8d8d8_40x100_textures_02_glass_90.png) 0 50% repeat-x; + font-weight: normal; + color: #111111 !important; +} +.ui-hover-state a { + color: #111111; +} +.ui-default-state:active, .ui-active-state { + border: 1px solid #2694e8; + background: #8ab9ff url(images/8ab9ff_40x100_textures_02_glass_50.png) 0 50% repeat-x; + font-weight: normal; + color: #000000 !important; + outline: none; +} +.ui-active-state a { + color: #000000; + outline: none; +} +/*icons*/ +.ui-arrow-right-default {background: url(images/888888_7x7_arrow_right.gif) no-repeat 50% 50%;} +.ui-arrow-right-default:hover, .ui-arrow-right-hover {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;} +.ui-arrow-right-default:active, .ui-arrow-right-active {background: url(images/ffffff_7x7_arrow_right.gif) no-repeat 50% 50%;} +.ui-arrow-right-content {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;} + +.ui-arrow-left-default {background: url(images/888888_7x7_arrow_left.gif) no-repeat 50% 50%;} +.ui-arrow-left-default:hover, .ui-arrow-left-hover {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;} +.ui-arrow-left-default:active, .ui-arrow-left-active {background: url(images/ffffff_7x7_arrow_left.gif) no-repeat 50% 50%;} +.ui-arrow-left-content {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;} + +.ui-arrow-down-default {background: url(images/888888_7x7_arrow_down.gif) no-repeat 50% 50%;} +.ui-arrow-down-default:hover, .ui-arrow-down-hover {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;} +.ui-arrow-down-default:active, .ui-arrow-down-active {background: url(images/ffffff_7x7_arrow_down.gif) no-repeat 50% 50%;} +.ui-arrow-down-content {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;} + +.ui-arrow-up-default {background: url(images/888888_7x7_arrow_up.gif) no-repeat 50% 50%;} +.ui-arrow-up-default:hover, .ui-arrow-up-hover {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;} +.ui-arrow-up-default:active, .ui-arrow-up-active {background: url(images/ffffff_7x7_arrow_up.gif) no-repeat 50% 50%;} +.ui-arrow-up-content {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;} + +.ui-close-default {background: url(images/888888_11x11_icon_close.gif) no-repeat 50% 50%;} +.ui-close-default:hover, .ui-close-hover {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;} +.ui-close-default:active, .ui-close-active {background: url(images/ffffff_11x11_icon_close.gif) no-repeat 50% 50%;} +.ui-close-content {background: url(images/ffffff_11x11_icon_close.gif) no-repeat 50% 50%;} + +.ui-folder-closed-default {background: url(images/888888_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} +.ui-folder-closed-default:hover, .ui-folder-closed-hover {background: url(images/222222_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} +.ui-folder-closed-default:active, .ui-folder-closed-active {background: url(images/ffffff_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} +.ui-folder-closed-content {background: url(images/888888_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} + +.ui-folder-open-default {background: url(images/888888_11x11_icon_folder_open.gif) no-repeat 50% 50%;} +.ui-folder-open-default:hover, .ui-folder-open-hover {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;} +.ui-folder-open-default:active, .ui-folder-open-active {background: url(images/ffffff_11x11_icon_folder_open.gif) no-repeat 50% 50%;} +.ui-folder-open-content {background: url(images/ffffff_11x11_icon_folder_open.gif) no-repeat 50% 50%;} + +.ui-doc-default {background: url(images/888888_11x11_icon_doc.gif) no-repeat 50% 50%;} +.ui-doc-default:hover, .ui-doc-hover {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;} +.ui-doc-default:active, .ui-doc-active {background: url(images/ffffff_11x11_icon_doc.gif) no-repeat 50% 50%;} +.ui-doc-content {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;} + +.ui-arrows-leftright-default {background: url(images/888888_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} +.ui-arrows-leftright-default:hover, .ui-arrows-leftright-hover {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} +.ui-arrows-leftright-default:active, .ui-arrows-leftright-active {background: url(images/ffffff_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} +.ui-arrows-leftright-content {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} + +.ui-arrows-updown-default {background: url(images/888888_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} +.ui-arrows-updown-default:hover, .ui-arrows-updown-hover {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} +.ui-arrows-updown-default:active, .ui-arrows-updown-active {background: url(images/ffffff_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} +.ui-arrows-updown-content {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} + +.ui-minus-default {background: url(images/888888_11x11_icon_minus.gif) no-repeat 50% 50%;} +.ui-minus-default:hover, .ui-minus-hover {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;} +.ui-minus-default:active, .ui-minus-active {background: url(images/ffffff_11x11_icon_minus.gif) no-repeat 50% 50%;} +.ui-minus-content {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;} + +.ui-plus-default {background: url(images/888888_11x11_icon_plus.gif) no-repeat 50% 50%;} +.ui-plus-default:hover, .ui-plus-hover {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;} +.ui-plus-default:active, .ui-plus-active {background: url(images/ffffff_11x11_icon_plus.gif) no-repeat 50% 50%;} +.ui-plus-content {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;} + +/*hidden elements*/ +.ui-hidden { + display: none;/* for accessible hiding: position: absolute; left: -99999999px*/; +} +.ui-accessible-hidden { + position: absolute; left: -99999999px; +} +/*reset styles*/ +.ui-reset { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; +} +/*clearfix class*/ +.ui-clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +.ui-clearfix {display: inline-block;} +/* Hides from IE-mac \*/ +* html .ui-clearfix {height: 1%;} +.ui-clearfix {display: block;} +/* End hide from IE-mac */ + +/* Note: for resizable styles, use the styles listed above in the dialog section */ + + diff --git a/xCAT-web/lib/CommandWindow.js b/xCAT-web/lib/CommandWindow.js deleted file mode 100644 index f2deb9bf1..000000000 --- a/xCAT-web/lib/CommandWindow.js +++ /dev/null @@ -1,56 +0,0 @@ -var CommandWindow = {}; - -CommandWindow.updateCommandResult = function() { - //todo: add commandQueryObj.value to the history select box - - var commandQueryObj = $('commandQuery'); - var copyChkBoxObj = $('copyChkBox'); - var nodelistTxtObj = $('nodeList'); - var nodegrpsCboBoxObj = $('nodegrpsCboBox'); - var pshChkBoxObj = $('pshChkBox'); - - var serialChkBoxObj = $('serialChkBox'); - var verifyChkBoxObj = $('verifyChkBox'); - var fanoutTxtBoxObj = $('fanoutTxtBox'); - var userIDTxtBoxObj = $('userIDTxtBox'); - var rshellTxtBoxObj = $('rshellTxtBox'); - var monitorChkBoxObj = $('monitorChkBox'); - var ret_codeChkBoxObj = $('ret_codeChkBox'); - - // Do AJAX call and get HTML here. - var url = "dsh_action.php"; - var postPara = "command=" + encodeURIComponent(commandQueryObj.value); - if (nodelistTxtObj) { postPara += "&node=" + encodeURIComponent(nodelistTxtObj.value); } - if (nodegrpsCboBoxObj) { postPara += "&nodegrps=" + encodeURIComponent(nodegrpsCboBoxObj.options[nodegrpsCboBoxObj.selectedIndex].value); } - if (copyChkBoxObj.checked == true) postPara += "©=on"; else postPara += "©=off"; - if (pshChkBoxObj.checked == true) postPara += "&psh=on"; else postPara += "&psh=off"; - if (serialChkBoxObj.checked == true) postPara += "&serial=on"; else postPara += "&serial=off"; - if (verifyChkBoxObj.checked == true) postPara += "&verify=on"; else postPara += "&verify=off"; - postPara += "&fanout=" + encodeURIComponent(fanoutTxtBoxObj.value); - postPara += "&userID=" + encodeURIComponent(userIDTxtBoxObj.value); - postPara += "&rshell=" + encodeURIComponent(rshellTxtBoxObj.value); - if (monitorChkBoxObj.checked == true) postPara += "&monitor=on"; else postPara += "&monitor=off"; - if (ret_codeChkBoxObj.checked == true) postPara += "&ret_code=on"; else postPara += "&ret_code=off"; - - new Ajax.Request(url, { - method: 'post', postBody: postPara, - onSuccess: function(transport) { - var htmlContent = transport.responseText; - - var win = new Window({className: "dialog", - width: 350, - height: 400, - zIndex: 100, - resizable: true, - title: "Running commands", - showEffect: Effect.BlindDown, - hideEffect: Effect.SwitchOff, - draggable: true, - wiredDrag: true}); - - win.getContent().innerHTML = htmlContent; - //win.setStatusBar("Status bar info"); - win.showCenter(); - } - }); -}; diff --git a/xCAT-web/lib/functions.js b/xCAT-web/lib/functions.js index 02ff7bafa..c54dcdbac 100644 --- a/xCAT-web/lib/functions.js +++ b/xCAT-web/lib/functions.js @@ -18,70 +18,16 @@ for (i in cookies) { var pair = cookies[i].split('='); cookret[pair[0]] = unesca return cookret; } -function selectAll(element, objectName) +// Check or uncheck all checkboxes that start with objectName +function selectAllCheckBoxes(element, objectName) { + //todo: use jQuery to accomplish this var sel = element.checked; var form = element.form; - var searchstr = '^' + objectName + '\\d'; + var searchstr = '^' + objectName + '\d'; for(var i = 0; i < form.length; i++) { var e = form.elements[i]; if (e.type == "checkbox" && e.name.search(searchstr) > -1) { e.checked = sel; } } } - -function isSelected(form, objectName) -{ -var searchstr = '^' + objectName + '\\d'; -for(var i = 0; i < form.length; i++) - { - var e = form.elements[i]; - if (e.type == "checkbox" && e.name.search(searchstr) > -1 && e.checked) { return true; } - } -return false; -} - -function numSelected(form, objectName) -{ -var searchstr = '^' + objectName + '\\d'; -var j = 0; -for(var i = 0; i < form.length; i++) - { - var e = form.elements[i]; - if (e.type == "checkbox" && e.name.search(searchstr) > -1 && e.checked) - { - if (++j == 2) { return j; } - } - } -return j; -} - -function toggleSection(para, tableId) -{ - var t; var i; - var imageId = tableId + '-im'; - if (document.all) { t = document.all[tableId]; i = document.all[imageId]; } // IE 4+ - else if (document.getElementById) { t = document.getElementById(tableId); i = document.getElementById(imageId); } // Netscape 6 - else { alert('Cannot expand or collapse sections in this version of your browser.'); return false; } - if (!t) { alert('Error: section ' + tableId + ' not found.'); return false; } - - if (!t.style.display || t.style.display == 'inline') // the inner table is currently visible - { - t.style.display = 'none'; - para.title = 'Click to expand section'; - //if (txt) { txt = txt.replace(/^-/i, '+'); } - i.src = 'images/plus-sign.gif'; - //i.alt = '+'; - } - else // the inner table is currently invisible - { - t.style.display = 'inline'; - para.title = 'Click to collapse section'; - //if (txt) { txt = txt.replace(/^\+/i, '-'); } - i.src = 'images/minus-sign.gif'; - //i.alt = '-'; - } - - return true; -} - diff --git a/xCAT-web/lib/functions.php b/xCAT-web/lib/functions.php index 8ea0a5aba..c06d31221 100644 --- a/xCAT-web/lib/functions.php +++ b/xCAT-web/lib/functions.php @@ -26,19 +26,24 @@ function insertHeader($title, $stylesheets, $javascripts, $currents) { global $TOPDIR; // Remember the current page so we can open it again the next time they come to the web interface -$expire_time = gmmktime(0, 0, 0, 1, 1, 2038); -foreach ($currents as $key => $value) { setcookie("currentpage[$key]", $value, $expire_time, '/'); } +if ($currents[0] != 'logout') { + $expire_time = gmmktime(0, 0, 0, 1, 1, 2038); + foreach ($currents as $key => $value) { setcookie("currentpage[$key]", $value, $expire_time, '/'); } + } -echo << $title - + + + + -EOS; +EOS1; if ($stylesheets) { @@ -52,23 +57,52 @@ if ($javascripts) { } } echo "\n"; -echo <<
-EOS; +EOS3; //echo "
\n"; //echo "
\n"; // end the top div + +if (!isAuthenticated()) { + insertLogin(); // display the login dialog and page footer + exit; // Do not want to continue with the rest of the page + // If the login dialog is successful, it will load index.php which will remember what + // page they were trying to go to. +} } // end insertHeader +//----------------------------------------------------------------------------- +// If they are not authenticated yet, display the login dialog +function insertLogin() { +global $TOPDIR; +// The javascript in xcatauth.js will add the Login button and display the dialog +echo << +
+

Note: The username and password used must be in the passwd table in the xCAT database.

+ + + +
+


+
+ +EOS2; + +insertFooter(); +} + + // This is the data structure that represents the menu for each page. $MENU = array( 'machines' => array( @@ -135,6 +169,13 @@ $MENU = array( 'about' => array('label' => 'About', 'url' => "$TOPDIR/support/about.php"), ) ), + 'logout' => array( + 'label' => 'Logout', + 'default' => 'logout', + 'list' => array( + 'logout' => array('label' => 'Logout/Login', 'url' => "$TOPDIR/lib/logout.php"), + ) + ), ); @@ -208,10 +249,18 @@ echo '