You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2008/12/05 21:30:21 UTC

svn commit: r723855 [22/23] - in /hadoop/core/trunk: ./ src/contrib/ src/contrib/chukwa/ src/contrib/chukwa/bin/ src/contrib/chukwa/conf/ src/contrib/chukwa/docs/ src/contrib/chukwa/docs/paper/ src/contrib/chukwa/hadoop-packaging/ src/contrib/chukwa/li...

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/yahoo-dom-event.js
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/yahoo-dom-event.js?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/yahoo-dom-event.js (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/yahoo-dom-event.js Fri Dec  5 12:30:14 2008
@@ -0,0 +1,12 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.6.0
+*/
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/Ap
 pleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice);}return false;},isBoolean:function(D){return typeof 
 D==="boolean";},isFunction:function(D){return typeof D==="function";},isNull:function(D){return D===null;},isNumber:function(D){return typeof D==="number"&&isFinite(D);},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false;},isString:function(D){return typeof D==="string";},isUndefined:function(D){return typeof D==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G;}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that "+"all dependencies are included.");}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I;}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D];}}A._IEEnumFix(H.prototype,G);}},augmentObject:function(H,G){if(!G||!H){throw new Erro
 r("Absorb failed, verify dependencies.");}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]];}}else{for(I in G){if(E||!(I in H)){H[I]=G[I];}}A._IEEnumFix(H,G);}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.");}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E]);}A.augmentObject.apply(this,D);},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+"";}else{if(D instanceof Date||("nodeType" in D&&"tagName" in D)){return D;}else{if(A.isFunction(D)){return E;}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.l
 ength>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true);}return G;},later:function(K,E,L,G,H){K=K||0;E=E||{};
 var F=L,J=G,I,D;if(A.isString(L)){F=E[L];}if(!F){throw new TypeError("method undefined");}if(!A.isArray(J)){J=[G];}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D));}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E);}:function(D,E){return !A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E];};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.6.0",build:"1321"});(function(){var B=YAHOO.util,F=YAHOO.lang,L,J,K={},G={},N=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,H=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/
 i,OP_SCROLL:/^(?:inline|table-row)$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;return R;};var P=function(R){var Q=G[R];if(!Q){Q=new RegExp("(?:^|\\s+)"+R+"(?:\\s+|$)");G[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=Q.ownerDocument.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&H){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(H){J=function(Q,R,S){switch(R){case"opacity":if(F.isString(Q.style.filter)){Q.style.filter="al
 pha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={get:function(S){if(S){if(S.nodeType||S.item){return S;}if(typeof S==="string"){return N.getElementById(S);}if("length" in S){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;}return null;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}return I(S);};return B.Dom.batch(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return 
 B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY(W);if(Y===false){return false;}var X=[parseInt(this.getStyle(W,"left"),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){retur
 n false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){U=F.trim(U);Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=F.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(W){var V=false,X=W.className;if(R&&X&&this.hasClass(W,R)){W.className=X.replace(Q," ");if(this.hasClass(W,R)){this.removeClass(W,R);}W.className=F.trim(W.className);if(W.cla
 ssName===""){var U=(W.hasAttribute)?"class":"className";W.removeAttribute(U);}V=true;}return V;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.removeClass(V,R);}V.className=F.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,true);},generateId:function(Q,S){S=S||"yui-gen";var R=function(T){if(T&&T.id){return T.id;}var U=S+YAHOO.env._id_counter++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(R,S){R=B.Dom.get(R);S=B.Dom.get(S);var Q=false;if((R&&S)&&(R.nodeType&&S.nodeType)){if(R.contains&&R!==S){Q=R.contains(S);}else{if(R.compareDocumentPosition){Q=!!(R.compareDocumentPosition(S)&16);}}}else{}return Q;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U)
 {R=R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;
+var R=N.compatMode;if((R||H)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight;}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||H){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while((Q=Q.parentNode)){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return
  null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},getFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body
 .scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}return Q.parentNode.insertBefore(R,Q);},insertAfter:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(S){var T=S.getBoundingClientRect(),R=Math.round;var Q=S.ownerDocument;return[R(T.left+B.Dom.getDocumentScrollLeft(Q)),R(T.top+B.Dom.getDocumentScrollTop(Q))];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]
 +=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;while(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(R.scrollTop||R.scrollLeft){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=funct
 ion(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscrib
 e";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FL
 AT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toStr
 ing=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(R,O,S,Q,P){var M=(YAHOO.lang.isString(R))?[R]:R;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:S,override:Q,checkReady:P});}C=this.POLL_RETRYS;this.startInterval();},onCon
 tentReady:function(O,M,P,N){this.onAvailable(O,M,P,N,true);},onDOMReady:function(M,O,N){if(this.DOMReady){setTimeout(function(){var P=window;if(N){if(N===true){P=O;}else{P=N;}}M.call(P,"DOMReady",[],O);},0);}else{this.DOMReadyEvent.subscribe(M,O,N);}},_addListener:function(O,M,X,S,N,a){if(!X||!X.call){return false;}if(this._isValidCollection(O)){var Y=true;for(var T=0,V=O.length;T<V;++T){Y=this._addListener(O[T],M,X,S,N,a)&&Y;}return Y;}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.util.Event._addListener(O,M,X,S,N,a);});return true;}}}if(!O){return false;}if("unload"==M&&S!==this){J[J.length]=[O,M,X,S,N,a];return true;}var b=O;if(N){if(N===true){b=S;}else{b=N;}}var P=function(c){return X.call(b,YAHOO.util.Event.getEvent(c,O),S);};var Z=[O,M,X,P,b,S,N,a];var U=I.length;I[U]=Z;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=
 function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q);};}E[Q].push(Z);}else{try{this._simpleAdd(O,M,P,a);}catch(W){this.lastError=W;this._removeListener(O,M,X,a);return false;}}return true;},addListener:function(O,Q,N,P,M){return this._addListener(O,Q,N,P,M,false);},addFocusListener:function(O,N,P,M){return this._addListener(O,K,N,P,M,true);},removeFocusListener:function(N,M){return this._removeListener(N,K,M,true);},addBlurListener:function(O,N,P,M){return this._addListener(O,L,N,P,M,true);},removeBlurListener:function(N,M){return this._removeListener(N,L,M,true);},fireLegacyEvent:function(Q,O){var S=true,M,U,T,V,R;U=E[O].slice();for(var N=0,P=U.length;N<P;++N){T=U[N];if(T&&T[this.WFN]){V=T[this.ADJ_SCOPE];R=T[this.WFN].call(V,Q);S=(S&&R);}}M=G[O];if(M&&M[2]){M[2](Q);}return S;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return -1;}else{return B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webki
 t<419&&("click"==N||"dblclick"==N));},_removeListener:function(N,M,V,Y){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this._removeListener(N[Q],M,V,Y)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[4];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],Y);}catch(U){this.lastError=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN];
+I.splice(S,1);return true;},removeListener:function(N,O,M){return this._removeListener(N,O,M,false);},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopP
 ropagation){M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}return -1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_lo
 ad:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return ;}if(this.locked){return ;}if(this.isIE){if(!this.DOMReady){this.startInterval();return ;}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.override){if(W.override===true){U=W.obj;}else{U=W.override;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{clearInterval(this.
 _interval);this._interval=null;}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this._removeListener(O,N.type,N.fn,N.capture);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],capture:P[this.CAPTURE],index:S});}}}}return(R.length)?R:null;},_unload:function(S){var M=YAHOO.util.Event,P,O,N,R,Q,T=J.slice();for(P=0,R=J.length;P<R;++P){N=T[P];if(N){var U=window;if(N[M.ADJ_SCOPE]){if(N[M.ADJ_SCOPE]===true){U=N[M.UNLOAD_OBJ];}e
 lse{U=N[M.ADJ_SCOPE];}}N[M.FN].call(U,M.getEvent(S,N[M.EL]),N[M.UNLOAD_OBJ]);T[P]=null;N=null;U=null;}}J=null;if(I){for(O=I.length-1;O>-1;O--){N=I[O];if(N){M._removeListener(N[M.EL],N[M.TYPE],N[M.FN],N[M.CAPTURE],O);}}N=null;}G=null;M._simpleRemove(window,"unload",M._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N
 ,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;
+/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
+if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};
+var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return
  I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.f
 ire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.6.0",build:"1321"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.
 6.0", build: "1321"});

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/chart.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/chart.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/chart.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/chart.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,69 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+    pageEncoding="ISO-8859-1"%>
+<div style="height:250px">
+<%
+if(request.getParameter("period")==null && ((request.getParameter("start")==null || request.getParameter("end")==null))) {
+  out.println("<h2>Select a time range, and host list.</h2>");
+} else {
+String base = "";
+int width = 500;
+int height = 250;
+String dataurl = request.getRequestURL().toString();
+//
+// escape the & and stuff:
+//
+String url = java.net.URLEncoder.encode(dataurl.replace("/chart.jsp", "/chart-data.jsp?"+request.getQueryString()), "UTF-8");
+
+//
+// if there are more than one charts on the
+// page, give each a different ID
+//
+//int open_flash_chart_seqno;
+String obj_id = "chart";
+//String div_name = "flashcontent";
+// These values are for when there is >1 chart per page
+//    $open_flash_chart_seqno++;
+//    $obj_id .= '_<%=open_flash_chart_seqno;
+//    $div_name .= '_<%=open_flash_chart_seqno;
+// Not using swfobject: <script type="text/javascript" src="< % = base % >js/swfobject.js"></script>
+%>
+<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
+	codebase="<%= request.getProtocol() %>://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
+	width="100%" height="100%" id="ie_<%=obj_id %>" align="middle" style="z-index: 1;">
+  <param name="allowScriptAccess" value="sameDomain" />
+  <param name="movie" value="<%=base%>open-flash-chart.swf?width=<%=width%>&height=<%=height%>&data=<%=url%>" />
+  <param name="quality" value="high" />
+  <param name="bgcolor" value="#ffffff" />
+  <param name="wmode" value="transparent" />
+  <embed src="<%=base%>open-flash-chart.swf?data=<%=url%>&metric=CPUBusy" 
+    quality="high" bgcolor="#ffffff" 
+  	width="100%" height="100%" name="<%=obj_id%>" align="middle" allowScriptAccess="sameDomain"
+	type="application/x-shockwave-flash" 
+	pluginspage="<%=request.getProtocol()%>://www.macromedia.com/go/getflashplayer" 
+	id="<%=obj_id%>"
+	/>
+</object>
+<% } %>
+</div>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/cluster_selector.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/cluster_selector.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/cluster_selector.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/cluster_selector.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,50 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "javax.servlet.http.*, java.io.*, java.util.*, org.apache.hadoop.chukwa.hicc.ClusterConfig"  %>
+<% String boxId = request.getParameter("boxId"); %>
+Cluster
+<select id="<%= boxId %>cluster" name="<%= boxId %>cluster" class="formSelect">
+<%
+       String cluster=request.getParameter("cluster");
+       if(cluster!=null && !cluster.equals("null")) {
+           session.setAttribute("cluster",cluster);
+       } else {
+           cluster = (String) session.getAttribute("cluster");
+           if(cluster==null || cluster.equals("null")) {
+               cluster="demo";
+               session.setAttribute("cluster",cluster);
+           }
+       }
+       ClusterConfig cc = new ClusterConfig();
+       String jdbc = cc.getURL(cluster);
+       Iterator i = cc.getClusters();
+       while(i.hasNext()) { 
+           String label = i.next().toString();
+           if(label.equals(cluster)) {
+               out.println("<option selected>"+label+"</option>");
+           } else {
+               out.println("<option>"+label+"</option>");
+           }
+       } %>
+</select>
+<input type="button" onClick="save_cluster('<%= boxId %>');" name="Apply" value="Apply" class="formButton">

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/debug.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/debug.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/debug.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/debug.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,27 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%@ page import = "javax.servlet.http.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, org.apache.tomcat.util.http.Parameters" %>
+<%
+       for (Enumeration e = session.getAttributeNames() ; e.hasMoreElements() ;) {
+           String name = (String) e.nextElement();
+           out.println(name+":"+session.getAttribute(name).toString());
+           out.println("<br>");
+       }
+%>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,88 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%@ page import = "java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler" %>
+<% TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
+   long start = time.getStartTime();
+   long end = time.getEndTime();
+   SimpleDateFormat formatter = new SimpleDateFormat("MMM dd yyyy HH:mm:ss");
+   String startDate = formatter.format(start);
+   String endDate = formatter.format(end);
+   String intervalUnit1="MINUTE";
+   String intervalUnit2="HOUR";
+   if(((end-start)/1000)>(15*60*60*24)) {
+       intervalUnit1 = "DAY";
+       intervalUnit2 = "WEEK";
+   } else if(((end-start)/1000)>(60*60*24*3)) {
+       intervalUnit1 = "HOUR";
+       intervalUnit2 = "DAY";
+   } else {
+       intervalUnit1 = "MINUTE";
+       intervalUnit2 = "HOUR";
+   }
+%>
+<html>
+  <head>
+    <link rel='stylesheet' href='/hicc/css/timeline.css' type='text/css' />
+    <script src="http://simile.mit.edu/timeline/api/timeline-api.js" type="text/javascript"></script>
+    <script src="http://simile.mit.edu/timeline/examples/examples.js" type="text/javascript"></script>
+    <script type="text/javascript">
+        var theme = Timeline.ClassicTheme.create();
+        theme.event.label.width = 250; // px
+        theme.event.bubble.width = 250;
+        theme.event.bubble.height = 200;
+        function onLoad() {
+          var eventSource = new Timeline.DefaultEventSource();
+          var bandInfos = [
+            Timeline.createBandInfo({
+                eventSource:    eventSource,
+                showEventText:  false,
+                trackHeight:    0.5,
+                trackGap:       0.2,
+                date:           "<%= startDate %>  GMT",
+                width:          "100%", 
+                intervalUnit:   Timeline.DateTime.<%= intervalUnit2 %>, 
+                intervalPixels: 200,
+                theme: theme
+            })
+          ];
+          bandInfos[0].highlight = true;
+  
+          tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
+          Timeline.loadXML("events-xml.jsp", function(xml, url) { eventSource.loadXML(xml, url); });
+          setupFilterHighlightControls(document.getElementById("controls"), tl, [0], theme);
+
+        }
+        var resizeTimerID = null;
+        function onResize() {
+            if (resizeTimerID == null) {
+                resizeTimerID = window.setTimeout(function() {
+                    resizeTimerID = null;
+                    tl.layout();
+                }, 500);
+            }
+        }
+    </script>
+  </head>
+  <body onload="onLoad();" onresize="onResize();">
+    <div id="my-timeline" style="height: 500px; border: 1px solid #aaa"></div>
+    <div class="controls" id="controls">
+    </div>
+  </body>
+</html>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event2_viewer.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event2_viewer.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event2_viewer.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event2_viewer.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,73 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.dao.*, org.apache.hadoop.chukwa.dao.database.*, org.apache.hadoop.chukwa.dao.hdfs.*" %>
+<% String filter=(String)session.getAttribute("filter");
+   if(filter==null) {
+       filter="";
+   } %>
+<div style="height:300px;overflow:auto;">
+Filter: <input type="text" id="<%= request.getParameter("boxId") %>filter" name="<%= request.getParameter("boxId") %>filter" value="<%= filter %>" class="formInput">
+<input type="button" name="apply_filter" value="Filter" onClick="filter_event_viewer('<%= request.getParameter("boxId") %>');" class="formButton">
+<table class="simple" width="100%">
+<tr>
+<th>Time</th>
+<th>Event</th>
+</tr>
+<%
+        String cluster = (String) session.getAttribute("cluster");
+        ClusterConfig cc = new ClusterConfig();
+        String jdbc = cc.getURL(cluster);
+        String boxId=request.getParameter("boxId");
+        TimeHandler time = new TimeHandler(request);
+        String startdate = time.getStartTimeText();
+        String enddate = time.getEndTimeText();
+	String[] timefield = new String[3];
+	String[] database = new String[3];
+	database[0]="MRJob";
+	database[1]="HodJob";
+	database[2]="QueueInfo";
+	timefield[0]="LAUNCH_TIME";
+	timefield[1]="StartTime";
+	timefield[2]="timestamp";
+	long startDate = time.getStartTime();
+	long endDate = time.getEndTime();
+
+	ChukwaSearchService se = new ChukwaSearchService();
+        String cluster = (String) session.getAttribute("cluster");
+        DataSourceResult result = se.search(cluster,database,startDate,endDate,filter);
+	TreeMap events = result.getEvents();
+	
+        Iterator ei = (events.keySet()).iterator();
+        while(ei.hasNext()) {
+	        long time = (Long) ei.next();
+                List<Event> tEvents = (List) events.get(time);
+	        SimpleDateFormat sdf=  new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+			for(Event event : tEvents)
+			{       
+            String cell = event.toString();
+                out.println("<tr><td>"+ sdf.format(event.getTime())+"</td><td>"+cell+"</td></tr>");
+			}
+		 }
+%>
+</table>
+</div>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,27 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+   if(request.getParameter("type").equals("list")) {
+%>
+<IFRAME id="<%= request.getParameter("boxId") %>iframe" src="/hicc/jsp/event_viewer_helper.jsp?<%= request.getQueryString() %>" width="100%" frameborder="0" height="400" scrolling="no"></IFRAME>
+<% } else { %>
+<IFRAME id="<%= request.getParameter("boxId") %>iframe" src="/hicc/jsp/event.jsp" width="100%" frameborder="0" height="600"></IFRAME>
+<% } %>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_data.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_data.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_data.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_data.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,73 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.extraction.engine.*, org.apache.hadoop.chukwa.hicc.TimeHandler, org.json.*" %>
+<% String filter=(String)request.getParameter("query");
+   if(filter==null) {
+       filter="";
+   }
+    TimeHandler th = new TimeHandler(request, (String)session.getAttribute("time_zone"));
+    long startDate = th.getStartTime();
+    long endDate = th.getEndTime();
+
+        Calendar now = Calendar.getInstance();
+        long start = 0;
+        long end = now.getTimeInMillis();
+        String[] database = request.getParameterValues("database");
+        String[] timefield = new String[3];
+        timefield[0]="LAUNCH_TIME";
+        timefield[1]="StartTime";
+        timefield[2]="timestamp";
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss");
+
+        ChukwaSearchService se = new ChukwaSearchService();
+        String cluster = (String) session.getAttribute("cluster");
+        if (cluster == null)
+            { cluster = "unknown"; }
+        Token token = (Token) session.getAttribute(database+"_token");
+        SearchResult result = se.search(cluster,database,startDate,endDate,filter,token);
+        TreeMap events = result.getRecords();
+        session.setAttribute(database+"_token",result.getToken());
+
+        SimpleDateFormat sdf=  new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        JSONArray array = new JSONArray();
+        Iterator ei = (events.keySet()).iterator();
+        while(ei.hasNext()) {
+            long time = (Long) ei.next();
+            List<Record> tEvents = (List) events.get(time);
+            for(Record event : tEvents) {
+                JSONObject eventRecord = new JSONObject();
+                eventRecord.put("id",event.getTime());
+                JSONArray cells = new JSONArray();
+//                cells.put(sdf.format(event.getTime()));
+                cells.put(event.toString());
+                eventRecord.put("cell",cells);
+                array.put(eventRecord);
+            }
+        }
+
+        JSONObject hash = new JSONObject();
+        hash.put("page","1");
+        hash.put("total","1");
+        hash.put("rows", array);
+        out.println(hash.toString());
+%>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_helper.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_helper.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_helper.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_viewer_helper.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,71 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.extraction.engine.*, org.apache.hadoop.chukwa.hicc.TimeHandler" %>
+<% String filter=(String)session.getAttribute("filter");
+   if(filter==null) {
+       filter="";
+   } %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+<link href="/hicc/css/flexigrid/flexigrid.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="/hicc/js/jquery-1.2.6.min.js"></script>
+<script type="text/javascript" src="/hicc/js/flexigrid.js"></script>
+</head>
+<body>
+<div class="flexigrid">
+<table class="flexme1">
+	<thead>
+    		<tr>
+            	<th width="100%">Event</th>
+            </tr>
+    </thead>
+<%
+        String[] database = request.getParameterValues("database");
+%>
+    <tbody>
+    </tbody>
+</table>
+</div>
+<script type="text/javascript">
+$('.flexme1').flexigrid(
+			{
+                        url: '/hicc/jsp/event_viewer_data.jsp?<% for(int i=0;i<database.length;i++) { out.print("database="+database[i]+"&"); } %>',
+                        dataType: 'json',
+			searchitems : [
+				{display: 'Event', name : 'event', isdefault: true}
+				],
+			sortorder: "asc",
+			usepager: true,
+			useRp: true,
+			rp: 15,
+                        striped:false,
+			showTableToggleBtn: true,
+			width: 'auto',
+			height: 300
+			}
+);
+</script>
+</body>
+</html>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_wrapper.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_wrapper.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_wrapper.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/event_wrapper.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,24 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<IFRAME id="<%= request.getParameter("boxId") %>iframe" src="/hicc/jsp/event.jsp" width="100%" frameborder="0" height="600"></IFRAME>
+

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/events-xml.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/events-xml.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/events-xml.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/events-xml.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,153 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%><?xml version="1.0" encoding="UTF-8"?>
+<%@ page import = "java.util.Calendar, java.util.Date, java.sql.*, java.text.SimpleDateFormat, java.util.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.database.DatabaseConfig" %>
+<%
+    response.setContentType("text/xml");
+    TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
+    String cluster = (String) session.getAttribute("cluster");
+    String startS = time.getStartTimeText();
+    String endS = time.getEndTimeText();
+    DatabaseConfig dbc = new DatabaseConfig();
+    String[] database = dbc.findTableName("HodJob",time.getStartTime(),time.getEndTime());
+    String[] timefield = new String[3];
+    timefield[0]="StartTime";
+    //timefield[1]="LAUNCH_TIME";
+    //timefield[2]="timestamp";
+    ArrayList<HashMap<String, Object>> events = new ArrayList<HashMap<String, Object>>();
+    int q=0;  
+
+        String dateclause = timefield[q]+" >= '"+startS+"' and "+timefield[q]+" <= '"+endS+"'";
+        Connection conn = null;
+        Statement stmt = null;
+        ResultSet rs = null;
+
+               ClusterConfig cc = new ClusterConfig();
+               String jdbc = cc.getURL(cluster);
+               try {
+                   conn = DriverManager.getConnection(jdbc);
+                   stmt = conn.createStatement();
+                   String query = "";
+                   query = "select * from "+database[q]+" where "+dateclause+";";
+                   // or alternatively, if you don't know ahead of time that
+                   // the query will be a SELECT...
+                   if (stmt.execute(query)) {
+                       rs = stmt.getResultSet();
+                       ResultSetMetaData rmeta = rs.getMetaData();
+                       int col = rmeta.getColumnCount();
+                       while (rs.next()) {
+                           String cell="";
+                           HashMap<String, Object> event = new HashMap<String, Object>();
+                           long event_time=0;
+                           for(int i=1;i<col;i++) {
+                               String value = rs.getString(i);
+                               if(value!=null) {
+                                   cell=cell+" "+rmeta.getColumnName(i)+":"+value;
+                               }
+                               event.put(rmeta.getColumnName(i),value);
+                               if(rmeta.getColumnName(i).equals("EndTime")) {
+                                   try {
+                                       event.put(rmeta.getColumnName(i), rs.getTimestamp(i).getTime());
+                                   } catch(SQLException ex) {
+                                       Calendar now = Calendar.getInstance();
+                                       event.put(rmeta.getColumnName(i),now.getTime());
+                                   }
+                               }
+                               if(rmeta.getColumnName(i).equals("LAUNCH_TIME")) {
+                                   try {
+                                       event.put(rmeta.getColumnName(i), rs.getTimestamp(i).getTime());
+                                   } catch(SQLException ex) {
+                                       Calendar now = Calendar.getInstance();
+                                       event.put(rmeta.getColumnName(i),now.getTime());
+                                   }
+                               }
+                               if(rmeta.getColumnName(i).equals("StartTime")) {
+                                   try {
+                                       event.put(rmeta.getColumnName(i), rs.getTimestamp(i).getTime());
+                                   } catch(SQLException ex) {
+                                       Calendar now = Calendar.getInstance();
+                                       event.put(rmeta.getColumnName(i),now.getTime());
+                                   }
+                               }
+                               if(rmeta.getColumnName(i).equals("Timestamp")) {
+                                   try {
+                                       event.put(rmeta.getColumnName(i), rs.getTimestamp(i).getTime());
+                                   } catch(SQLException ex) {
+                                       Calendar now = Calendar.getInstance();
+                                       event.put(rmeta.getColumnName(i),now.getTime());
+                                   }
+                               }
+                           }
+                           event.put("_event",cell);
+                           events.add(event);
+                       }
+                   }
+                   // Now do something with the ResultSet ....
+               } catch (SQLException ex) {
+                   // handle any errors
+                   //out.println("SQLException: " + ex.getMessage());
+                   //out.println("SQLState: " + ex.getSQLState());
+                   //out.println("VendorError: " + ex.getErrorCode());
+               } finally {
+                   // it is a good idea to release
+                   // resources in a finally{} block
+                   // in reverse-order of their creation
+                   // if they are no-longer needed
+                   if (rs != null) {
+                       try {
+                           rs.close();
+                       } catch (SQLException sqlEx) {
+                           // ignore
+                       }
+                       rs = null;
+                   }
+                   if (stmt != null) {
+                       try {
+                           stmt.close();
+                       } catch (SQLException sqlEx) {
+                           // ignore
+                       }
+                       stmt = null;
+                   }
+                   if (conn != null) {
+                       try {
+                           conn.close();
+                       } catch (SQLException sqlEx) {
+                           // ignore
+                       }
+                       conn = null;
+                   }
+               }
+//        }
+%>
+<data>
+<%
+        SimpleDateFormat format = new SimpleDateFormat("MMM dd yyyy HH:mm:ss");
+        for(int i=0;i<events.size();i++) {
+            HashMap<String, Object> event = events.get(i);
+            long start=(Long)event.get("StartTime");
+            long end=(Long)event.get("EndTime");
+            String event_time = format.format(start);
+            String event_end_time = format.format(end);
+            String cell = (String) event.get("_event");
+%>
+	    <event start="<%= event_time %> GMT" end="<%= event_end_time %> GMT" title="Hod Job: <%= event.get("HodID") %> User: <%= event.get("UserID") %>" link="" isDuration="true"><%= cell %></event>
+<%
+        } %>
+</data>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_data_source.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_data_source.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_data_source.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_data_source.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,36 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%@ page import = "org.apache.hadoop.chukwa.extraction.engine.datasource.DsDirectory, org.json.*"  %>
+<%
+       String cluster = (String) session.getAttribute("cluster");
+       if(cluster==null) {
+           cluster="unknown";
+       }
+       JSONArray array = new JSONArray();
+       DsDirectory ds = DsDirectory.getInstance();
+       String[] list = ds.list(cluster);
+       for(String dataSource : list) {
+           JSONObject hash = new JSONObject();
+           hash.put("label", dataSource);
+           hash.put("value", dataSource);
+           array.put(hash);
+       }
+       out.println(array.toString());
+%>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_timezone_list.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_timezone_list.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_timezone_list.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_timezone_list.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,31 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%@ page import = "java.util.TimeZone, org.json.*"  %>
+<%  
+String[] tzs = TimeZone.getAvailableIDs();
+JSONArray array = new JSONArray();
+for(String tz : tzs) {
+  JSONObject hash = new JSONObject();
+  hash.put("label", tz);
+  hash.put("value", tz);
+  array.put(hash);
+}
+out.println(array.toString());
+%>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_user_list.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_user_list.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_user_list.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/get_user_list.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,54 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%@ page import = "java.sql.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.json.*"  %>
+<%
+       Connection conn = null;
+       Statement stmt = null;
+       ResultSet rs = null;
+       String cluster = (String) session.getAttribute("cluster");
+       if(cluster==null) {
+           cluster="demo";
+       }  
+       JSONArray array = new JSONArray();
+       JSONObject hash = new JSONObject();
+       hash.put("label", "Aggregated");
+       hash.put("value", "");
+       array.put(hash);
+       ClusterConfig cc = new ClusterConfig();
+       String jdbc = cc.getURL(cluster);
+       try {
+           conn = DriverManager.getConnection(jdbc);
+           stmt = conn.createStatement();
+           String query = "select distinct UserID from HodJob order by UserID";
+           if (stmt.execute(query)) {
+               rs = stmt.getResultSet();
+               while (rs.next()) {
+                   JSONObject tmp = new JSONObject();
+                   tmp.put("label",rs.getString(1));
+                   tmp.put("value",rs.getString(1));
+                   array.put(tmp);
+               }
+               out.println(array.toString());
+           }
+       } catch(SQLException ex) {
+           JSONArray empty = new JSONArray();
+           out.println(empty.toString());
+       }
+%>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,122 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*,org.jfree.chart.*, org.jfree.data.category.*, org.jfree.chart.servlet.*, org.jfree.chart.entity.*, org.jfree.chart.plot.*, org.jfree.chart.plot.*, org.jfree.chart.renderer.category.*, org.jfree.data.general.DatasetUtilities, org.jfree.chart.axis.*, org.apache.hadoop.chukwa.hicc.ClusterConfig" %>
+<% if(session.getAttribute("HodID")==null || session.getAttribute("HodID").equals("")) { %>
+<h2> Select a Hod Job from Hod Job List </h2>
+<% } else { %>
+<div style="height:300px;overflow:auto;">
+<table class="simple">
+<tr>
+<th>Hod ID</th>
+<th>Map Reduce Job ID</th>
+<th>Map Reduce Job Name</th>
+<th>Submit Time</th>
+<th>Launch Time</th>
+<th>Finish Time</th>
+<th>Mapper phase end time</th>
+<th>Total maps</th>
+<th>Number of Mapper attempts</th>
+<th>Total Reduces</th>
+<th>Number of reducer attempts</th>
+<th>Mapper phase execution time</th>
+</tr>
+<%
+       Connection conn = null;
+       Statement stmt = null;
+       ResultSet rs = null;
+       String cluster = (String) session.getAttribute("cluster");
+       if(cluster==null) {
+           cluster="demo";
+       }
+       ClusterConfig cc = new ClusterConfig();
+       String jdbc = cc.getURL(cluster);
+       try {
+           conn = DriverManager.getConnection(jdbc);
+           stmt = conn.createStatement();
+           String query = "";
+           String HodID = (String)session.getAttribute("HodID");
+           if(HodID!=null && !HodID.equals("")) {
+               query = "select HodID,MRJobID,MRJobName,SUBMIT_TIME,LAUNCH_TIME,FINISH_TIME,MAPPER_PHASE_END_TIME, TOTAL_MAPS,NUM_OF_MAPPER_ATTEMPTS,TOTAL_REDUCES,NUM_OF_REDUCER_ATTEMPTS,MAPPER_PHASE_EXECUTION_TIME from MRJob where HodID='"+HodID+"';";
+           }
+           // or alternatively, if you don't know ahead of time that
+           // the query will be a SELECT...
+           if (stmt.execute(query)) {
+               rs = stmt.getResultSet();
+               while (rs.next()) { %>
+<tr>
+<td><%= rs.getString(1) %></td>
+<td><%= rs.getString(2) %></td>
+<td><%= rs.getString(3) %></td>
+<td><%= rs.getString(4) %></td>
+<td><%= rs.getString(5) %></td>
+<td><%= rs.getString(6) %></td>
+<td><%= rs.getString(7) %></td>
+<td><%= rs.getString(8) %></td>
+<td><%= rs.getString(9) %></td>
+<td><%= rs.getString(10) %></td>
+<td><%= rs.getString(11) %></td>
+<td><%= rs.getString(12) %></td></tr>
+<%
+               }
+           }
+           // Now do something with the ResultSet ....
+       } catch (SQLException ex) {
+           // handle any errors
+           out.println("SQLException: " + ex.getMessage());
+           out.println("SQLState: " + ex.getSQLState());
+           out.println("VendorError: " + ex.getErrorCode());
+       } finally {
+           // it is a good idea to release
+           // resources in a finally{} block
+           // in reverse-order of their creation
+           // if they are no-longer needed
+           if (rs != null) {
+               try {
+                   rs.close();
+               } catch (SQLException sqlEx) {
+                   // ignore
+               }
+               rs = null;
+           }
+           if (stmt != null) {
+               try {
+                   stmt.close();
+               } catch (SQLException sqlEx) {
+                   // ignore
+               }
+               stmt = null;
+           }
+           if (conn != null) {
+               try {
+                   conn.close();
+               } catch (SQLException sqlEx) {
+                   // ignore
+               }
+               conn = null;
+           }
+
+       }
+%>
+</table>
+</div>
+<% } %>

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job_list.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job_list.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job_list.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/hod_job_list.jsp Fri Dec  5 12:30:14 2008
@@ -0,0 +1,145 @@
+<%
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file 
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<%
+   response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*,org.jfree.chart.*, org.jfree.data.category.*, org.jfree.chart.servlet.*, org.jfree.chart.entity.*, org.jfree.chart.plot.*, org.jfree.chart.plot.*, org.jfree.chart.renderer.category.*, org.jfree.data.general.DatasetUtilities, org.jfree.chart.axis.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.database.DatabaseConfig"  %>
+<table class="simple" width="100%">
+<tr>
+<th width="15%">Hod ID</th>
+<th width="25%">User</th>
+<th width="10%">Status</th>
+<th width="10%">Time in Queue</th>
+<th width="20%">Start Time</th>
+<th>End Time</th></tr>
+</table>
+<div style="height:150px;overflow:auto;width:100%">
+<table class="simple" width="100%">
+<%
+       TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
+       String startS = time.getStartTimeText();
+       String endS = time.getEndTimeText();
+       String timefield = "StartTime";
+       String dateclause = timefield+" >= '"+startS+"' and "+timefield+" <= '"+endS+"'";
+       Connection conn = null;
+       Statement stmt = null;
+       ResultSet rs = null;
+       String cluster = (String) session.getAttribute("cluster");
+       if(cluster==null) {
+           cluster="demo";
+       }
+       ClusterConfig cc = new ClusterConfig();
+       String jdbc = cc.getURL(cluster);
+       String hodID = (String)session.getAttribute("HodID");
+       SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+       SimpleDateFormat format2 = new SimpleDateFormat("kk");
+       SimpleDateFormat format3 = new SimpleDateFormat("mm");
+       try {
+           conn = DriverManager.getConnection(jdbc);
+           stmt = conn.createStatement();
+           DatabaseConfig dbc = new DatabaseConfig();
+           String[] tables = dbc.findTableName("HodJob",time.getStartTime(),time.getEndTime());
+           for(int i=0;i<tables.length;i++) {
+               String query = "select HodID,UserID,Status,TimeQueued,StartTime,EndTime from "+tables[i]+" where "+dateclause+";";
+               if (stmt.execute(query)) {
+                   rs = stmt.getResultSet();
+                   while (rs.next()) {
+                       String style="simple";
+                       String hodid = rs.getString(1);
+                       String user = rs.getString(2);
+                       String status = rs.getString(3);
+                       String timeQueued = rs.getString(4);
+                       String startTime = rs.getString(5);
+                       String sDate = format.format((rs.getTimestamp(5)).getTime());
+                       String s = format2.format((rs.getTimestamp(5)).getTime());
+                       String sm = format3.format((rs.getTimestamp(5)).getTime());
+                       String endTime = rs.getString(6);
+                       String eDate = format.format((rs.getTimestamp(6)).getTime());
+                       String e = format2.format((rs.getTimestamp(6)).getTime());
+                       String em = format3.format((rs.getTimestamp(6)).getTime());
+                       String hodIDSelect = hodID;
+                       if(hodid.equals(hodID)) {
+                           style="class=highlight";
+                       }
+                       hodIDSelect = hodid;
+%>
+<tr <%=style%>><td width="15%"><a href="#" onclick="save_hod('<%= hodIDSelect %>');"><%= hodid %></a></td>
+    <td width="25%"><a href="#" onclick="save_hod('<%= hodIDSelect %>');"><%= user %></a></td>
+    <td width="10%"><a href="#" onclick="save_hod('<%= hodIDSelect %>');"><%= status %></a></td>
+    <td width="10%"><a href="#" onclick="save_hod('<%= hodIDSelect %>');"><%= timeQueued %></a></td>
+    <td width="20%"><a href="#" onclick="save_hod('<%= hodIDSelect %>');"><%= startTime %></a></td>
+    <td><a href="#" onclick="save_hod('<%= hodIDSelect %>');"><%= endTime %></a></td>
+</tr>
+<%
+                   }
+               }
+           }
+           // Now do something with the ResultSet ....
+       } catch (SQLException ex) {
+           // handle any errors
+           out.println("SQLException: " + ex.getMessage());
+           out.println("SQLState: " + ex.getSQLState());
+           out.println("VendorError: " + ex.getErrorCode());
+       } finally {
+           // it is a good idea to release
+           // resources in a finally{} block
+           // in reverse-order of their creation
+           // if they are no-longer needed
+           if (rs != null) {
+               try {
+                   rs.close();
+               } catch (SQLException sqlEx) {
+                   // ignore
+               }
+               rs = null;
+           }
+           if (stmt != null) {
+               try {
+                   stmt.close();
+               } catch (SQLException sqlEx) {
+                   // ignore
+               }
+               stmt = null;
+           }
+           if (conn != null) {
+               try {
+                   conn.close();
+               } catch (SQLException sqlEx) {
+                   // ignore
+               }
+               conn = null;
+           }
+       }
+
+%>
+</table></div>
+<input type="button" onclick="save_hod('');" class="formButton" name="Reset" value="Reset">
+<script type="javascript/text">
+function save_hod(obj) {
+    var myAjax=new Ajax.Request(
+        "/hicc/jsp/session.jsp",
+        {
+            asynchronous: true,
+            method: 'get',
+            parameters: "HodID="+obj,
+        }
+    );
+}
+</script>