You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ry...@apache.org on 2012/03/07 21:02:27 UTC

svn commit: r1298078 [4/9] - in /lucene/dev/branches/solr_3159_jetty8: ./ lucene/ lucene/contrib/ lucene/contrib/memory/src/test/org/apache/lucene/index/memory/ lucene/core/src/java/org/apache/lucene/codecs/ lucene/core/src/java/org/apache/lucene/codec...

Modified: lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/css/styles/threads.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/css/styles/threads.css?rev=1298078&r1=1298077&r2=1298078&view=diff
==============================================================================
--- lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/css/styles/threads.css (original)
+++ lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/css/styles/threads.css Wed Mar  7 20:02:23 2012
@@ -1,167 +1,167 @@
 #content #threads .loader
 {
-    background-position: 0 50%;
-    padding-left: 21px;
+  background-position: 0 50%;
+  padding-left: 21px;
 }
 
 #content #threads #thread-dump table
 {
-    border-collapse: collapse;
-    width: 100%;
+  border-collapse: collapse;
+  width: 100%;
 }
 
 #content #threads #thread-dump table .spacer,
 #content #threads #thread-dump tbody .state
 {
-    background-color: #fff;
-    border: 0;
+  background-color: #fff;
+  border: 0;
 }
 
 #content #threads #thread-dump table th,
 #content #threads #thread-dump table td
 {
-    border: 1px solid #c0c0c0;
-    padding: 5px 3px;
-    vertical-align: top;
+  border: 1px solid #c0c0c0;
+  padding: 5px 3px;
+  vertical-align: top;
 }
 
 #content #threads #thread-dump thead th
 {
-    background-color: #c8c8c8;
-    font-weight: bold;
-    text-align: left;
+  background-color: #c8c8c8;
+  font-weight: bold;
+  text-align: left;
 }
 
 #content #threads #thread-dump thead th.name
 {
-    width: 85%;
+  width: 85%;
 }
 
 #content #threads #thread-dump thead th.time
 {
-    text-align: right;
-    width: 15%;
+  text-align: right;
+  width: 15%;
 }
 
 #content #threads #thread-dump tbody .odd
 {
-    background-color: #f0f0f0;
+  background-color: #f0f0f0;
 }
 
 #content #threads #thread-dump tbody .RUNNABLE a
 {
-    background-image: url( ../../img/ico/tick-circle.png );
+  background-image: url( ../../img/ico/tick-circle.png );
 }
 
 #content #threads #thread-dump tbody .WAITING a,
 #content #threads #thread-dump tbody .TIMED_WAITING .a
 {
-    background-image: url( ../../img/ico/hourglass.png );
+  background-image: url( ../../img/ico/hourglass.png );
 }
 
 #content #threads #thread-dump tbody .WAITING.lock a,
 #content #threads #thread-dump tbody .TIMED_WAITING.lock a
 {
-    background-image: url( ../../img/ico/hourglass--exclamation.png );
+  background-image: url( ../../img/ico/hourglass--exclamation.png );
 }
 
 #content #threads #thread-dump thead th:first-child,
 #content #threads #thread-dump tbody td:first-child
 {
-    border-left: 0;
+  border-left: 0;
 }
 
 #content #threads #thread-dump thead th:last-child,
 #content #threads #thread-dump tbody td:last-child
 {
-    border-right: 0;
+  border-right: 0;
 }
 
 #content #threads #thread-dump tbody .name a
 {
-    background-position: 0 50%;
-    cursor: auto;
-    display: block;
-    padding-left: 21px;
+  background-position: 0 50%;
+  cursor: auto;
+  display: block;
+  padding-left: 21px;
 }
 
 #content #threads #thread-dump tbody .stacktrace .name a
 {
-    cursor: pointer;
+  cursor: pointer;
 }
 
 #content #threads #thread-dump tbody .stacktrace .name a span
 {    
-    background-image: url( ../../img/ico/chevron-small-expand.png );
-    background-position: 100% 50%;
-    padding-right: 21px;
+  background-image: url( ../../img/ico/chevron-small-expand.png );
+  background-position: 100% 50%;
+  padding-right: 21px;
 }
 
 #content #threads #thread-dump tbody .stacktrace.open .name a span
 {   
-    background-image: url( ../../img/ico/chevron-small.png );
+  background-image: url( ../../img/ico/chevron-small.png );
 }
 
 #content #threads #thread-dump tbody .name p
 {
-    background-image: url( ../../img/ico/arrow-000-small.png );
-    background-position: 0 50%;
-    color: #c0c0c0;
-    font-size: 11px;
-    margin-left: 21px;
-    padding-left: 21px;
+  background-image: url( ../../img/ico/arrow-000-small.png );
+  background-position: 0 50%;
+  color: #c0c0c0;
+  font-size: 11px;
+  margin-left: 21px;
+  padding-left: 21px;
 }
 
 #content #threads #thread-dump tbody .name div
 {
-    border-top: 1px solid #c0c0c0;
-    display: none;
-    margin-left: 21px;
-    margin-top: 5px;
-    padding-top: 5px;
+  border-top: 1px solid #c0c0c0;
+  display: none;
+  margin-left: 21px;
+  margin-top: 5px;
+  padding-top: 5px;
 }
 
 #content #threads #thread-dump tbody .open .name div
 {
-    display: block;
+  display: block;
 }
 
 #content #threads #thread-dump tbody .name ul
 {
-    list-style-type: disc;
-    margin-left: 0.7em;
-    padding-left: 0.7em;
+  list-style-type: disc;
+  margin-left: 0.7em;
+  padding-left: 0.7em;
 }
 
 #content #threads #thread-dump tbody .time
 {
-    text-align: right;
+  text-align: right;
 }
 
 #content #threads #thread-dump tbody .details
 {
-    display: none;
+  display: none;
 }
 
 #content #threads .controls
 {
-    padding-top: 5px;
-    padding-bottom: 5px;
+  padding-top: 5px;
+  padding-bottom: 5px;
 }
 
 #content #threads .controls a
 {
-    background-image: url( ../../img/ico/chevron-small-expand.png );
-    padding-left: 21px;
+  background-image: url( ../../img/ico/chevron-small-expand.png );
+  padding-left: 21px;
 }
 
 #content #threads.expanded .controls a
 {
-    background-image: url( ../../img/ico/chevron-small.png );
+  background-image: url( ../../img/ico/chevron-small.png );
 }
 
 #content #threads.expanded .controls .expand,
 #content #threads.collapsed .controls .collapse
 {
-    display: none;
+  display: none;
 }
\ No newline at end of file

Modified: lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/console.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/console.js?rev=1298078&r1=1298077&r2=1298078&view=diff
==============================================================================
--- lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/console.js (original)
+++ lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/console.js Wed Mar  7 20:02:23 2012
@@ -17,11 +17,11 @@
 
 if( 'undefined' === typeof( console ) )
 {
-    var console = {
-        log : function() {},
-        debug : function() {},
-        dump : function() {},
-        error : function() {},
-        warn : function(){}
-    };
+  var console = {
+    log : function() {},
+    debug : function() {},
+    dump : function() {},
+    error : function() {},
+    warn : function(){}
+  };
 }
\ No newline at end of file

Modified: lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/highlight.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/highlight.js?rev=1298078&r1=1298077&r2=1298078&view=diff
==============================================================================
--- lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/highlight.js (original)
+++ lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/lib/highlight.js Wed Mar  7 20:02:23 2012
@@ -1,17 +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
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
 
-     http://www.apache.org/licenses/LICENSE-2.0
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of highlight.js nor the names of its contributors 
+      may be used to endorse or promote products derived from this software 
+      without specific prior written permission.
 
- 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.
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 var hljs=new function(){var p={};var a={};function n(c){return c.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function k(s,r){if(!s){return false}for(var c=0;c<s.length;c++){if(s[c]==r){return true}}return false}function e(s,r,c){var t="m"+(s.cI?"i":"")+(c?"g":"");return new RegExp(r,t)}function j(r){for(var c=0;c<r.childNodes.length;c++){node=r.childNodes[c];if(node.nodeName=="CODE"){return node}if(!(node.nodeType==3&&node.nodeValue.match(/\s+/))){return null}}}function h(u,t){var s="";for(var r=0;r<u.childNodes.length;r++){if(u.childNodes[r].nodeType==3){var c=u.childNodes[r].nodeValue;if(t){c=c.replace(/\n/g,"")}s+=c}else{if(u.childNodes[r].nodeName=="BR"){s+="\n"}else{s+=h(u.childNodes[r])}}}s=s.replace(/\r/g,"\n");return s}function b(t){var r=t.className.split(/\s+/);r=r.concat(t.parentNode.className.split(/\s+/));for(var c=0;c<r.length;c++){var s=r[c].replace(/^language-/,"");if(p[s]||s=="no-highlight"){return s}}}function d(c){var r=[];(function(
 t,u){for(var s=0;s<t.childNodes.length;s++){if(t.childNodes[s].nodeType==3){u+=t.childNodes[s].nodeValue.length}else{if(t.childNodes[s].nodeName=="BR"){u+=1}else{r.push({event:"start",offset:u,node:t.childNodes[s]});u=arguments.callee(t.childNodes[s],u);r.push({event:"stop",offset:u,node:t.childNodes[s]})}}}return u})(c,0);return r}function m(z,A,y){var s=0;var x="";var u=[];function v(){if(z.length&&A.length){if(z[0].offset!=A[0].offset){return(z[0].offset<A[0].offset)?z:A}else{return(z[0].event=="start"&&A[0].event=="stop")?A:z}}else{return z.length?z:A}}function t(E){var F="<"+E.nodeName.toLowerCase();for(var C=0;C<E.attributes.length;C++){var D=E.attributes[C];F+=" "+D.nodeName.toLowerCase();if(D.nodeValue!=undefined){F+='="'+n(D.nodeValue)+'"'}}return F+">"}function B(C){return"</"+C.nodeName.toLowerCase()+">"}while(z.length||A.length){var w=v().splice(0,1)[0];x+=n(y.substr(s,w.offset-s));s=w.offset;if(w.event=="start"){x+=t(w.node);u.push(w.node)}else{if(w.event=="stop
 "){var r=u.length;do{r--;var c=u[r];x+=B(c)}while(c!=w.node);u.splice(r,1);while(r<u.length){x+=t(u[r]);r++}}}}x+=y.substr(s);return x}function g(K,E){function A(r,N){for(var M=0;M<N.sm.length;M++){if(N.sm[M].bR.test(r)){return N.sm[M]}}return null}function x(M,r){if(D[M].e&&D[M].eR.test(r)){return 1}if(D[M].eW){var N=x(M-1,r);return N?N+1:0}return 0}function y(r,M){return M.iR&&M.iR.test(r)}function B(P,O){var N=[];for(var M=0;M<P.sm.length;M++){N.push(P.sm[M].b)}var r=D.length-1;do{if(D[r].e){N.push(D[r].e)}r--}while(D[r+1].eW);if(P.i){N.push(P.i)}return e(O,"("+N.join("|")+")",true)}function t(N,M){var O=D[D.length-1];if(!O.t){O.t=B(O,I)}O.t.lastIndex=M;var r=O.t.exec(N);if(r){return[N.substr(M,r.index-M),r[0],false]}else{return[N.substr(M),"",true]}}function c(P,r){var M=I.cI?r[0].toLowerCase():r[0];for(var O in P.keywordGroups){if(!P.keywordGroups.hasOwnProperty(O)){continue}var N=P.keywordGroups[O].hasOwnProperty(M);if(N){return[O,N]}}return false}function G(N,Q){if(!Q
 .k||!Q.l){return n(N)}if(!Q.lR){var P="("+Q.l.join("|")+")";Q.lR=e(I,P,true)}var O="";var R=0;Q.lR.lastIndex=0;var M=Q.lR.exec(N);while(M){O+=n(N.substr(R,M.index-R));var r=c(Q,M);if(r){u+=r[1];O+='<span class="'+r[0]+'">'+n(M[0])+"</span>"}else{O+=n(M[0])}R=Q.lR.lastIndex;M=Q.lR.exec(N)}O+=n(N.substr(R,N.length-R));return O}function L(r,N){if(N.subLanguage&&a[N.subLanguage]){var M=g(N.subLanguage,r);u+=M.keyword_count;C+=M.r;return M.value}else{return G(r,N)}}function J(N,r){var M=N.nM?"":'<span class="'+N.displayClassName+'">';if(N.rB){s+=M;N.buffer=""}else{if(N.eB){s+=n(r)+M;N.buffer=""}else{s+=M;N.buffer=r}}D[D.length]=N}function F(M,O,R){var P=D[D.length-1];if(R){s+=L(P.buffer+M,P);return false}var S=A(O,P);if(S){s+=L(P.buffer+M,P);J(S,O);C+=S.r;return S.rB}var r=x(D.length-1,O);if(r){var T=P.nM?"":"</span>";if(P.rE){s+=L(P.buffer+M,P)+T}else{if(P.eE){s+=L(P.buffer+M,P)+T+n(O)}else{s+=L(P.buffer+M+O,P)+T}}while(r>1){T=D[D.length-2].nM?"":"</span>";s+=T;r--;D.length--}va
 r Q=D[D.length-1];D.length--;D[D.length-1].buffer="";if(Q.starts){for(var N=0;N<I.m.length;N++){if(I.m[N].cN==Q.starts){J(I.m[N],"");break}}}return P.rE}if(y(O,P)){throw"Illegal"}}var I=p[K];var D=[I.dM];var C=0;var u=0;var s="";try{var w=0;I.dM.buffer="";do{var z=t(E,w);var v=F(z[0],z[1],z[2]);w+=z[0].length;if(!v){w+=z[1].length}}while(!z[2]);if(D.length>1){throw"Illegal"}return{language:K,r:C,keyword_count:u,value:s}}catch(H){if(H=="Illegal"){return{language:null,r:0,keyword_count:0,value:n(E)}}else{throw H}}}function i(){function r(y,x){if(y.compiled){return}if(y.b){y.bR=e(x,"^"+y.b)}if(y.e){y.eR=e(x,"^"+y.e)}if(y.i){y.iR=e(x,"^(?:"+y.i+")")}if(y.r==undefined){y.r=1}if(!y.displayClassName){y.displayClassName=y.cN}if(!y.cN){y.nM=true}for(var w in y.k){if(!y.k.hasOwnProperty(w)){continue}if(y.k[w] instanceof Object){y.keywordGroups=y.k}else{y.keywordGroups={keyword:y.k}}break}y.sm=[];if(y.c){for(var v=0;v<y.c.length;v++){if(y.c[v] instanceof Object){y.sm.push(y.c[v])}else{
 for(var u=0;u<x.m.length;u++){if(x.m[u].cN==y.c[v]){y.sm.push(x.m[u])}}}}}y.compiled=true;for(var v=0;v<y.sm.length;v++){r(y.sm[v],x)}}for(var t in p){if(!p.hasOwnProperty(t)){continue}var c=[p[t].dM].concat(p[t].m);for(var s=0;s<c.length;s++){r(c[s],p[t])}}}function f(){if(f.called){return}f.called=true;i();a=p}function q(v,A,r){f();var C=h(v,r);var t=b(v);if(t=="no-highlight"){return}if(t){var y=g(t,C)}else{var y={language:"",keyword_count:0,r:0,value:n(C)};var z=y;for(var B in a){if(!a.hasOwnProperty(B)){continue}var w=g(B,C);if(w.keyword_count+w.r>z.keyword_count+z.r){z=w}if(w.keyword_count+w.r>y.keyword_count+y.r){z=y;y=w}}}var u=v.className;if(!u.match(y.language)){u=u?(u+" "+y.language):y.language}var c=d(v);if(c.length){var s=document.createElement("pre");s.innerHTML=y.value;y.value=m(c,d(s),C)}if(A){y.value=y.value.replace(/^((<[^>]+>|\t)+)/gm,function(D,G,F,E){return G.replace(/\t/g,A)})}if(r){y.value=y.value.replace(/\n/g,"<br>")}if(/MSIE [678]/.test(navigator.use
 rAgent)&&v.tagName=="CODE"&&v.parentNode.tagName=="PRE"){var s=v.parentNode;var x=document.createElement("div");x.innerHTML="<pre><code>"+y.value+"</code></pre>";v=x.firstChild.firstChild;x.firstChild.cN=s.cN;s.parentNode.replaceChild(x.firstChild,s)}else{v.innerHTML=y.value}v.className=u;v.dataset={};v.dataset.result={language:y.language,kw:y.keyword_count,re:y.r};if(z&&z.language){v.dataset.second_best={language:z.language,kw:z.keyword_count,re:z.r}}}function l(){if(l.called){return}l.called=true;f();if(arguments.length){for(var c=0;c<arguments.length;c++){if(p[arguments[c]]){a[arguments[c]]=p[arguments[c]]}}}var s=document.getElementsByTagName("pre");for(var c=0;c<s.length;c++){var r=j(s[c]);if(r){q(r,hljs.tabReplace)}}}function o(){var c=arguments;var r=function(){l.apply(null,c)};if(window.addEventListener){window.addEventListener("DOMContentLoaded",r,false);window.addEventListener("load",r,false)}else{if(window.attachEvent){window.attachEvent("onload",r)}else{window.on
 load=r}}}this.LANGUAGES=p;this.initHighlightingOnLoad=o;this.highlightBlock=q;this.initHighlighting=l;this.IMR="\\b|\\B";this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0x[A-Za-z0-9]+|\\d+(\\.\\d+)?)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:["escape"],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:["escape"],r:0};this.BE={cN:"escape",b:"\\\\.",e:this.IMR,nM:true,r:0};this.CLCM={cN:"comment",b:"//",e:"$",r:0};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NUMBER_MODE={cN:"number",b:this.NR,e:this.IMR,r:0};this.CNM={cN:"number",b:this.CNR,e:this.IMR,r:0};this.inherit=function(c,t){var s={};for(var r in c){s[r]=c[r]}if(t){for(var r in t){s[r]=t[r]}}return s}}();var initHighlightingOnLoad=hljs.initHighlightingOnLoad;(funct
 ion(){var d="[A-Za-z0-9\\._:-]+";var k={cN:"pi",b:"<\\?",e:"\\?>",r:10};var i={cN:"doctype",b:"<!DOCTYPE",e:">",r:10};var j={cN:"comment",b:"<!--",e:"-->"};var g={cN:"tag",b:"</?",e:"/?>",c:["title","tag_internal"]};var e={cN:"title",b:d,e:hljs.IMR};var b={cN:"tag_internal",b:hljs.IMR,eW:true,nM:true,c:["attribute","value_container"],r:0};var f={cN:"attribute",b:d,e:hljs.IMR,r:0};var a={cN:"value_container",b:'="',rB:true,e:'"',nM:true,c:[{cN:"value",b:'"',eW:true}]};var c={cN:"value_container",b:"='",rB:true,e:"'",nM:true,c:[{cN:"value",b:"'",eW:true}]};hljs.LANGUAGES.xml={dM:{c:["pi","doctype","comment","cdata","tag"]},cI:true,m:[{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},k,i,j,g,hljs.inherit(e,{r:1.75}),b,f,a,c]};var h={code:1,kbd:1,font:1,noscript:1,style:1,img:1,title:1,menu:1,tt:1,tr:1,param:1,li:1,tfoot:1,th:1,input:1,td:1,dl:1,blockquote:1,fieldset:1,big:1,dd:1,abbr:1,optgroup:1,dt:1,button:1,isindex:1,p:1,small:1,div:1,dir:1,em:1,frame:1,meta:1,sub:1,bdo:1,la
 bel:1,acronym:1,sup:1,body:1,basefont:1,base:1,br:1,address:1,strong:1,legend:1,ol:1,script:1,caption:1,s:1,col:1,h2:1,h3:1,h1:1,h6:1,h4:1,h5:1,table:1,select:1,noframes:1,span:1,area:1,dfn:1,strike:1,cite:1,thead:1,head:1,option:1,form:1,hr:1,"var":1,link:1,b:1,colgroup:1,ul:1,applet:1,del:1,iframe:1,pre:1,frameset:1,ins:1,tbody:1,html:1,samp:1,map:1,object:1,a:1,xmlns:1,center:1,textarea:1,i:1,q:1,u:1,section:1,nav:1,article:1,aside:1,hgroup:1,header:1,footer:1,figure:1,figurecaption:1,time:1,mark:1,wbr:1,embed:1,video:1,audio:1,source:1,canvas:1,datalist:1,keygen:1,output:1,progress:1,meter:1,details:1,summary:1,command:1};hljs.LANGUAGES.html={dM:{c:["comment","pi","doctype","vbscript","tag"]},cI:true,m:[{cN:"tag",b:"<style",e:">",l:[hljs.IR],k:{style:1},c:["tag_internal"],starts:"css"},{cN:"tag",b:"<script",e:">",l:[hljs.IR],k:{script:1},c:["tag_internal"],starts:"javascript"},{cN:"css",e:"</style>",rE:true,subLanguage:"css"},{cN:"javascript",e:"<\/script>",rE:true,subLa
 nguage:"javascript"},{cN:"vbscript",b:"<%",e:"%>",subLanguage:"vbscript"},j,k,i,hljs.inherit(g),hljs.inherit(e,{l:[hljs.IR],k:h}),hljs.inherit(b),f,a,c,{cN:"value_container",b:"=",e:hljs.IMR,c:[{cN:"unquoted_value",displayClassName:"value",b:"[^\\s/>]+",e:hljs.IMR}]}]}})();
\ No newline at end of file

Modified: lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/main.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/main.js?rev=1298078&r1=1298077&r2=1298078&view=diff
==============================================================================
--- lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/main.js (original)
+++ lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/main.js Wed Mar  7 20:02:23 2012
@@ -1,36 +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.
+*/
+
 require
 (
-	[
-		'lib/order!lib/console',
-		'lib/order!jquery',
-		'lib/order!lib/jquery.form',
-		'lib/order!lib/jquery.jstree',
-		'lib/order!lib/jquery.sammy',
-		'lib/order!lib/jquery.sparkline',
-		'lib/order!lib/jquery.timeago',
-		'lib/order!lib/highlight',
-		'lib/order!scripts/app',
+  [
+    'lib/order!lib/console',
+    'lib/order!jquery',
+    'lib/order!lib/jquery.cookie',
+    'lib/order!lib/jquery.form',
+    'lib/order!lib/jquery.jstree',
+    'lib/order!lib/jquery.sammy',
+    'lib/order!lib/jquery.sparkline',
+    'lib/order!lib/jquery.timeago',
+    'lib/order!lib/highlight',
+    'lib/order!lib/ZeroClipboard',
+    'lib/order!scripts/app',
 
-		'lib/order!scripts/analysis',
-		'lib/order!scripts/cloud',
-		'lib/order!scripts/cores',
-		'lib/order!scripts/dataimport',
-		'lib/order!scripts/file',
-		'lib/order!scripts/index',
-		'lib/order!scripts/java-properties',
-		'lib/order!scripts/logging',
-		'lib/order!scripts/ping',
-		'lib/order!scripts/plugins',
-		'lib/order!scripts/query',
-		'lib/order!scripts/replication',
-		'lib/order!scripts/schema-browser',
-		'lib/order!scripts/threads',
+    'lib/order!scripts/analysis',
+    'lib/order!scripts/cloud',
+    'lib/order!scripts/cores',
+    'lib/order!scripts/dataimport',
+    'lib/order!scripts/file',
+    'lib/order!scripts/index',
+    'lib/order!scripts/java-properties',
+    'lib/order!scripts/logging',
+    'lib/order!scripts/ping',
+    'lib/order!scripts/plugins',
+    'lib/order!scripts/query',
+    'lib/order!scripts/replication',
+    'lib/order!scripts/schema-browser',
+    'lib/order!scripts/threads',
 
-		'lib/order!scripts/dashboard'
-		
-	],
-	function( $ )
-	{
-		app.run();
-	}
+    'lib/order!scripts/dashboard'
+  ],
+  function( $ )
+  {
+    app.run();
+  }
 );
\ No newline at end of file

Modified: lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/analysis.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/analysis.js?rev=1298078&r1=1298077&r2=1298078&view=diff
==============================================================================
--- lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/analysis.js (original)
+++ lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/analysis.js Wed Mar  7 20:02:23 2012
@@ -1,420 +1,441 @@
+/*
+ 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.
+*/
+
 // #/:core/analysis
 sammy.get
 (
-    /^#\/([\w\d-]+)\/(analysis)$/,
-    function( context )
-    {
-        var core_basepath = this.active_core.attr( 'data-basepath' );
-        var content_element = $( '#content' );
+  /^#\/([\w\d-]+)\/(analysis)$/,
+  function( context )
+  {
+    var core_basepath = this.active_core.attr( 'data-basepath' );
+    var content_element = $( '#content' );
         
-        $.get
-        (
-            'tpl/analysis.html',
-            function( template )
-            {
-                content_element
-                    .html( template );
+    $.get
+    (
+      'tpl/analysis.html',
+      function( template )
+      {
+        content_element
+          .html( template );
                 
-                var analysis_element = $( '#analysis', content_element );
-                var analysis_form = $( 'form', analysis_element );
-                var analysis_result = $( '#analysis-result', analysis_element );
-                analysis_result.hide();
+        var analysis_element = $( '#analysis', content_element );
+        var analysis_form = $( 'form', analysis_element );
+        var analysis_result = $( '#analysis-result', analysis_element );
+        analysis_result.hide();
                 
-                $.ajax
-                (
-                    {
-                        url : core_basepath + '/admin/luke?wt=json&show=schema',
-                        dataType : 'json',
-                        context : $( '#type_or_name', analysis_form ),
-                        beforeSend : function( xhr, settings )
-                        {
-                            this
-                                .html( '<option value="">Loading ... </option>' )
-                                .addClass( 'loader' );
-                        },
-                        success : function( response, text_status, xhr )
-                        {
-                            var content = '';
+        $.ajax
+        (
+          {
+            url : core_basepath + '/admin/luke?wt=json&show=schema',
+            dataType : 'json',
+            context : $( '#type_or_name', analysis_form ),
+            beforeSend : function( xhr, settings )
+            {
+              this
+                .html( '<option value="">Loading ... </option>' )
+                .addClass( 'loader' );
+            },
+            success : function( response, text_status, xhr )
+            {
+              var content = '';
                             
-                            var fields = [];
-                            for( var field_name in response.schema.fields )
-                            {
-                                fields.push
-                                (
-                                    '<option value="fieldname=' + field_name + '">' + field_name + '</option>'
-                                );
-                            }
-                            if( 0 !== fields.length )
-                            {
-                                content += '<optgroup label="Fields">' + "\n";
-                                content += fields.sort().join( "\n" ) + "\n";
-                                content += '</optgroup>' + "\n";
-                            }
+              var fields = [];
+              for( var field_name in response.schema.fields )
+              {
+                fields.push
+                (
+                  '<option value="fieldname=' + field_name + '">' + field_name + '</option>'
+                );
+              }
+              if( 0 !== fields.length )
+              {
+                content += '<optgroup label="Fields">' + "\n";
+                content += fields.sort().join( "\n" ) + "\n";
+                content += '</optgroup>' + "\n";
+              }
                             
-                            var types = [];
-                            for( var type_name in response.schema.types )
-                            {
-                                types.push
-                                (
-                                    '<option value="fieldtype=' + type_name + '">' + type_name + '</option>'
-                                );
-                            }
-                            if( 0 !== types.length )
-                            {
-                                content += '<optgroup label="Types">' + "\n";
-                                content += types.sort().join( "\n" ) + "\n";
-                                content += '</optgroup>' + "\n";
-                            }
+              var types = [];
+              for( var type_name in response.schema.types )
+              {
+                types.push
+                (
+                  '<option value="fieldtype=' + type_name + '">' + type_name + '</option>'
+                );
+              }
+              if( 0 !== types.length )
+              {
+                content += '<optgroup label="Types">' + "\n";
+                content += types.sort().join( "\n" ) + "\n";
+                content += '</optgroup>' + "\n";
+              }
                             
-                            this
-                                .html( content );
+              this
+                .html( content );
 
-                            $( 'option[value="fieldname\=' + response.schema.defaultSearchField + '"]', this )
-                                .attr( 'selected', 'selected' );
-                        },
-                        error : function( xhr, text_status, error_thrown)
-                        {
-                        },
-                        complete : function( xhr, text_status )
-                        {
-                            this
-                                .removeClass( 'loader' );
-                        }
-                    }
-                );
+              $( 'option[value="fieldname\=' + response.schema.defaultSearchField + '"]', this )
+                .attr( 'selected', 'selected' );
+            },
+            error : function( xhr, text_status, error_thrown)
+            {
+            },
+            complete : function( xhr, text_status )
+            {
+              this
+                .removeClass( 'loader' );
+            }
+          }
+        );
                         
-                $( '.analysis-error .head a', analysis_element )
-                    .die( 'click' )
-                    .live
-                    (
-                        'click',
-                        function( event )
-                        {
-                            $( this ).parents( '.analysis-error' )
-                                .toggleClass( 'expanded' );
-                        }
-                    );
+        $( '.analysis-error .head a', analysis_element )
+          .die( 'click' )
+          .live
+          (
+            'click',
+            function( event )
+            {
+              $( this ).parents( '.analysis-error' )
+                .toggleClass( 'expanded' );
+            }
+          );
                         
-                $( '.verbose_output a', analysis_element )
-                    .die( 'click' )
-                    .live
-                    (
-                        'click',
-                        function( event )
-                        {
-                            $( this ).parent()
-                                .toggleClass( 'active' );
+        $( '.verbose_output a', analysis_element )
+          .die( 'click' )
+          .live
+          (
+            'click',
+            function( event )
+            {
+              $( this ).parent()
+                .toggleClass( 'active' );
                             
-                            analysis_result
-                                .toggleClass( 'verbose_output' );
+              analysis_result
+                .toggleClass( 'verbose_output' );
                             
-                            check_empty_spacer();
-                        }
-                    );
+              check_empty_spacer();
+            }
+          );
                 
-                var check_empty_spacer = function()
-                {
-                    var spacer_holder = $( 'td.part.data.spacer .holder', analysis_result );
+        var check_empty_spacer = function()
+        {
+          var spacer_holder = $( 'td.part.data.spacer .holder', analysis_result );
+
+          if( 0 === spacer_holder.size() )
+          {
+            return false;
+          }
+
+          var verbose_output = analysis_result.hasClass( 'verbose_output' );
+
+          spacer_holder
+            .each
+            (
+              function( index, element )
+              {
+                element = $( element );
 
-                    if( 0 === spacer_holder.size() )
-                    {
-                        return false;
-                    }
-
-                    var verbose_output = analysis_result.hasClass( 'verbose_output' );
-
-                    spacer_holder
-                        .each
-                        (
-                            function( index, element )
-                            {
-                                element = $( element );
-
-                                if( verbose_output )
-                                {
-                                    var cell = element.parent();
-                                    element.height( cell.height() );
-                                }
-                                else
-                                {
-                                    element.removeAttr( 'style' );
-                                }
-                            }
-                        );
+                if( verbose_output )
+                {
+                  var cell = element.parent();
+                  element.height( cell.height() );
+                }
+                else
+                {
+                  element.removeAttr( 'style' );
                 }
+              }
+            );
+        }
 
-                var button = $( 'button', analysis_form )
+        var button = $( 'button', analysis_form )
                 
-                analysis_form
-                    .ajaxForm
-                    (
-                        {
-                            url : core_basepath + '/analysis/field?wt=json',
-                            dataType : 'json',
-                            beforeSubmit : function( array, form, options )
-                            {
-                                loader.show( button );
-                                button.attr( 'disabled', true );
+        analysis_form
+          .ajaxForm
+          (
+            {
+              url : core_basepath + '/analysis/field?wt=json',
+              dataType : 'json',
+              beforeSubmit : function( array, form, options )
+              {
+                loader.show( button );
+                button.attr( 'disabled', true );
                                 
-                                array.push( { name: 'analysis.showmatch', value: 'true' } );
+                array.push( { name: 'analysis.showmatch', value: 'true' } );
                                 
-                                var type_or_name = $( '#type_or_name', form ).val().split( '=' );
+                var type_or_name = $( '#type_or_name', form ).val().split( '=' );
                                 
-                                array.push( { name: 'analysis.' + type_or_name[0], value: type_or_name[1] } );
-                            },
-                            success : function( response, status_text, xhr, form )
-                            {
-                                $( '.analysis-error', analysis_element )
-                                    .hide();
+                array.push( { name: 'analysis.' + type_or_name[0], value: type_or_name[1] } );
+              },
+              success : function( response, status_text, xhr, form )
+              {
+                $( '.analysis-error', analysis_element )
+                  .hide();
                                 
-                                analysis_result
-                                    .empty()
-                                    .show();
+                analysis_result
+                  .empty()
+                  .show();
                                 
-                                for( var name in response.analysis.field_names )
-                                {
-                                    build_analysis_table( 'name', name, response.analysis.field_names[name] );
-                                }
+                for( var name in response.analysis.field_names )
+                {
+                  build_analysis_table( 'name', name, response.analysis.field_names[name] );
+                }
                                 
-                                for( var name in response.analysis.field_types )
-                                {
-                                    build_analysis_table( 'type', name, response.analysis.field_types[name] );
-                                }
-
-                                check_empty_spacer();
-                            },
-                            error : function( xhr, text_status, error_thrown )
-                            {
-                                analysis_result
-                                    .empty()
-                                    .hide();
-
-                                if( 404 === xhr.status )
-                                {
-                                    $( '#analysis-handler-missing', analysis_element )
-                                        .show();
-                                }
-                                else
-                                {
-                                    var error_message = error_thrown.match( /^(.+Exception):\s+(.*)$/ );
-
-                                    $( '#analysis-error', analysis_element )
-                                        .show();
-
-                                    $( '#analysis-error .head a span', analysis_element )
-                                        .text( error_message[1] );
-
-                                    $( '#analysis-error .body', analysis_element )
-                                        .text( error_message[2].replace( /(\s+at\s+)/g, " at\n" ) );
-                                }
-                            },
-                            complete : function()
-                            {
-                                loader.hide( $( 'button', analysis_form ) );
-                                button.removeAttr( 'disabled' );
-                            }
-                        }
-                    );
+                for( var name in response.analysis.field_types )
+                {
+                  build_analysis_table( 'type', name, response.analysis.field_types[name] );
+                }
 
-                    var generate_class_name = function( type )
-                    {
-                        var classes = [type];
-                        if( 'text' !== type )
-                        {
-                            classes.push( 'verbose_output' );
-                        }
-                        return classes.join( ' ' );
-                    }
+                check_empty_spacer();
+              },
+              error : function( xhr, text_status, error_thrown )
+              {
+                analysis_result
+                  .empty()
+                  .hide();
+
+                if( 404 === xhr.status )
+                {
+                  $( '#analysis-handler-missing', analysis_element )
+                    .show();
+                }
+                else
+                {
+                  var error_message = error_thrown.match( /^(.+Exception):\s+(.*)$/ );
+
+                  $( '#analysis-error', analysis_element )
+                    .show();
+
+                  if( error_message )
+                  {
+                    $( '#analysis-error .head a span', analysis_element )
+                      .text( error_message[1] );
+
+                    $( '#analysis-error .body', analysis_element )
+                      .text( error_message[2].replace( /(\s+at\s+)/g, " at\n" ) );
+                  }
+                  else
+                  {
+                    $( '#analysis-error .head a span', analysis_element )
+                      .text( error_thrown );
+                  }
+                }
+              },
+              complete : function()
+              {
+                loader.hide( $( 'button', analysis_form ) );
+                button.removeAttr( 'disabled' );
+              }
+            }
+          );
+
+          var generate_class_name = function( type )
+          {
+            var classes = [type];
+            if( 'text' !== type )
+            {
+              classes.push( 'verbose_output' );
+            }
+            return classes.join( ' ' );
+          }
                     
-                    var build_analysis_table = function( field_or_name, name, analysis_data )
-                    {        
-                        for( var type in analysis_data )
-                        {
-                            var type_length = analysis_data[type].length;
-                            if( 0 !== type_length )
-                            {
-                                var global_elements_count = 0;
-                                for( var i = 0; i < analysis_data[type].length; i += 2 )
-                                {
-                                    if( 'string' === typeof analysis_data[type][i+1] )
-                                    {
-                                        analysis_data[type][i+1] = [{ 'text': analysis_data[type][i+1] }]
-                                    }
-                                    global_elements_count = Math.max( global_elements_count,
-                                                                      analysis_data[type][i+1].length );
-                                }
+          var build_analysis_table = function( field_or_name, name, analysis_data )
+          {        
+            for( var type in analysis_data )
+            {
+              var type_length = analysis_data[type].length;
+              if( 0 !== type_length )
+              {
+                var global_elements_count = 0;
+                for( var i = 0; i < analysis_data[type].length; i += 2 )
+                {
+                  if( 'string' === typeof analysis_data[type][i+1] )
+                  {
+                    analysis_data[type][i+1] = [{ 'text': analysis_data[type][i+1] }]
+                  }
+                  global_elements_count = Math.max( global_elements_count, analysis_data[type][i+1].length );
+                }
 
-                                var content = '<div class="' + type + '">' + "\n";
-                                content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
+                var content = '<div class="' + type + '">' + "\n";
+                content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
                                 
-                                for( var i = 0; i < analysis_data[type].length; i += 2 )
-                                {
-                                    var colspan = 1;
-                                    var elements = analysis_data[type][i+1];
-                                    var elements_count = global_elements_count;
+                for( var i = 0; i < analysis_data[type].length; i += 2 )
+                {
+                  var colspan = 1;
+                  var elements = analysis_data[type][i+1];
+                  var elements_count = global_elements_count;
                                     
-                                    if( !elements[0].positionHistory )
-                                    {
-                                        colspan = elements_count;
-                                        elements_count = 1;
-                                    }
-
-                                    var legend = [];
-                                    for( var key in elements[0] )
-                                    {
-                                        var key_parts = key.split( '#' );
-                                        var used_key = key_parts.pop();
-                                        var short_key = used_key;
-
-                                        if( 1 === key_parts.length )
-                                        {
-                                            used_key = '<abbr title="' + key + '">' + used_key + '</abbr>';
-                                        }
-
-                                        if( 'positionHistory' === short_key || 'match' === short_key )
-                                        {
-                                            continue;
-                                        }
-
-                                        legend.push
-                                        (
-                                            '<tr class="' + generate_class_name( short_key ) + '">' +
-                                            '<td>' + used_key + '</td>' +
-                                            '</tr>'
-                                        );
-                                    }
+                  if( !elements[0].positionHistory )
+                  {
+                    colspan = elements_count;
+                    elements_count = 1;
+                  }
+
+                  var legend = [];
+                  for( var key in elements[0] )
+                  {
+                    var key_parts = key.split( '#' );
+                    var used_key = key_parts.pop();
+                    var short_key = used_key;
 
-                                    content += '<tbody>' + "\n";
-                                    content += '<tr class="step">' + "\n";
+                    if( 1 === key_parts.length )
+                    {
+                      used_key = '<abbr title="' + key + '">' + used_key + '</abbr>';
+                    }
+
+                    if( 'positionHistory' === short_key || 'match' === short_key )
+                    {
+                      continue;
+                    }
 
-                                        // analyzer
-                                        var analyzer_name = analysis_data[type][i]
+                    legend.push
+                    (
+                      '<tr class="' + generate_class_name( short_key ) + '">' +
+                      '<td>' + used_key + '</td>' +
+                      '</tr>'
+                    );
+                  }
+
+                  content += '<tbody>' + "\n";
+                  content += '<tr class="step">' + "\n";
+
+                    // analyzer
+                    var analyzer_name = analysis_data[type][i]
                                                                 .replace( /(\$1)+$/g, '' );
 
-                                        var analyzer_short = -1 !== analyzer_name.indexOf( '$' )
-                                                           ? analyzer_name.split( '$' )[1]
-                                                           : analyzer_name.split( '.' ).pop();
-                                        analyzer_short = analyzer_short.match( /[A-Z]/g ).join( '' );
-
-                                        content += '<td class="part analyzer"><div>' + "\n";
-                                        content += '<abbr title="' + analysis_data[type][i] + '">' + "\n";
-                                        content += analyzer_short + '</abbr></div></td>' + "\n";
-
-                                        // legend
-                                        content += '<td class="part legend"><div class="holder">' + "\n";
-                                        content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
-                                        content += '<tr><td>' + "\n";
-                                        content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
-                                        content += legend.join( "\n" ) + "\n";
-                                        content += '</table></td></tr></table></td>' + "\n";
-
-                                        // data
-                                        var cell_content = '<td class="part data spacer" '
-                                                         + '    colspan="' + colspan + '">'
-                                                         + '<div class="holder">&nbsp;</div>'
-                                                         + '</td>';
-                                        var cells = new Array( elements_count + 1 ).join( cell_content );
-                                        content += cells + "\n";
-
-                                    content += '</tr>' + "\n";
-                                    content += '</tbody>' + "\n";
-                                }
-                                content += '</table>' + "\n";
-                                content += '</div>' + "\n";
+                    var analyzer_short = -1 !== analyzer_name.indexOf( '$' )
+                                       ? analyzer_name.split( '$' )[1]
+                                       : analyzer_name.split( '.' ).pop();
+                    analyzer_short = analyzer_short.match( /[A-Z]/g ).join( '' );
+
+                    content += '<td class="part analyzer"><div>' + "\n";
+                    content += '<abbr title="' + analysis_data[type][i] + '">' + "\n";
+                    content += analyzer_short + '</abbr></div></td>' + "\n";
+
+                    // legend
+                    content += '<td class="part legend"><div class="holder">' + "\n";
+                    content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
+                    content += '<tr><td>' + "\n";
+                    content += '<table border="0" cellspacing="0" cellpadding="0">' + "\n";
+                    content += legend.join( "\n" ) + "\n";
+                    content += '</table></td></tr></table></td>' + "\n";
+
+                    // data
+                    var cell_content = '<td class="part data spacer" colspan="' + colspan + '"><div class="holder">&nbsp;</div></td>';
+                    var cells = new Array( elements_count + 1 ).join( cell_content );
+                    content += cells + "\n";
+
+                  content += '</tr>' + "\n";
+                  content += '</tbody>' + "\n";
+                }
+                content += '</table>' + "\n";
+                content += '</div>' + "\n";
 
-                                $( '.' + type, analysis_result )
-                                    .remove();
+                $( '.' + type, analysis_result )
+                  .remove();
 
-                                analysis_result
-                                    .append( content );
+                analysis_result
+                  .append( content );
                                 
-                                var analysis_result_type = $( '.' + type, analysis_result );
+                var analysis_result_type = $( '.' + type, analysis_result );
 
-                                for( var i = 0; i < analysis_data[type].length; i += 2 )
-                                {
-                                    for( var j = 0; j < analysis_data[type][i+1].length; j += 1 )
-                                    {
-                                        var pos = analysis_data[type][i+1][j].positionHistory
-                                                ? analysis_data[type][i+1][j].positionHistory[0]
-                                                : 1;
-                                        var selector = 'tr.step:eq(' + ( i / 2 ) +') '
-                                                     + 'td.data:eq(' + ( pos - 1 ) + ') '
-                                                     + '.holder';
-                                        var cell = $( selector, analysis_result_type );
-
-                                        cell.parent()
-                                            .removeClass( 'spacer' );
-
-                                        var table = $( 'table tr.details', cell );
-                                        if( 0 === table.size() )
-                                        {
-                                            cell
-                                                .html
-                                                (
-                                                    '<table border="0" cellspacing="0" cellpadding="0">' + 
-                                                    '<tr class="details"></tr></table>'
-                                                );
-                                            var table = $( 'table tr.details', cell );
-                                        }
-
-                                        var tokens = [];
-                                        for( var key in analysis_data[type][i+1][j] )
-                                        {
-                                            var short_key = key.split( '#' ).pop();
+                for( var i = 0; i < analysis_data[type].length; i += 2 )
+                {
+                  for( var j = 0; j < analysis_data[type][i+1].length; j += 1 )
+                  {
+                    var pos = analysis_data[type][i+1][j].positionHistory
+                        ? analysis_data[type][i+1][j].positionHistory[0]
+                        : 1;
+                    var selector = 'tr.step:eq(' + ( i / 2 ) +') '
+                                 + 'td.data:eq(' + ( pos - 1 ) + ') '
+                                 + '.holder';
+                    var cell = $( selector, analysis_result_type );
+
+                    cell.parent()
+                      .removeClass( 'spacer' );
+
+                    var table = $( 'table tr.details', cell );
+                    if( 0 === table.size() )
+                    {
+                      cell
+                        .html
+                        (
+                          '<table border="0" cellspacing="0" cellpadding="0">' + 
+                          '<tr class="details"></tr></table>'
+                        );
+                      var table = $( 'table tr.details', cell );
+                    }
+
+                    var tokens = [];
+                    for( var key in analysis_data[type][i+1][j] )
+                    {
+                      var short_key = key.split( '#' ).pop();
                                             
-                                            if( 'positionHistory' === short_key || 'match' === short_key )
-                                            {
-                                                continue;
-                                            }
-
-                                            var classes = [];
-                                            classes.push( generate_class_name( short_key ) );
-
-                                            var data = analysis_data[type][i+1][j][key];
-                                            if( 'object' === typeof data && data instanceof Array )
-                                            {
-                                                data = data.join( ' ' );
-                                            }
-                                            if( 'string' === typeof data )
-                                            {
-                                                data = data.esc();
-                                            }
-
-                                            if( null === data || 0 === data.length )
-                                            {
-                                                classes.push( 'empty' );
-                                                data = '&empty;';
-                                            }
-
-                                            if( analysis_data[type][i+1][j].match && 
-                                                ( 'text' === short_key || 'raw_bytes' === short_key ) )
-                                            {
-                                                classes.push( 'match' );
-                                            }
-
-                                            tokens.push
-                                            (
-                                                '<tr class="' + classes.join( ' ' ) + '">' +
-                                                '<td>' + data + '</td>' +
-                                                '</tr>'
-                                            );
-                                        }
-                                        table
-                                            .append
-                                            (
-                                                '<td class="details">' +
-                                                '<table border="0" cellspacing="0" cellpadding="0">' +
-                                                tokens.join( "\n" ) +
-                                                '</table></td>'
-                                            );
-                                    }
-                                }
-                
-                            }
-                        }
+                      if( 'positionHistory' === short_key || 'match' === short_key )
+                      {
+                        continue;
+                      }
+
+                      var classes = [];
+                      classes.push( generate_class_name( short_key ) );
+
+                      var data = analysis_data[type][i+1][j][key];
+                      if( 'object' === typeof data && data instanceof Array )
+                      {
+                        data = data.join( ' ' );
+                      }
+                      if( 'string' === typeof data )
+                      {
+                        data = data.esc();
+                      }
+
+                      if( null === data || 0 === data.length )
+                      {
+                        classes.push( 'empty' );
+                        data = '&empty;';
+                      }
+
+                      if( analysis_data[type][i+1][j].match && 
+                        ( 'text' === short_key || 'raw_bytes' === short_key ) )
+                      {
+                        classes.push( 'match' );
+                      }
+
+                      tokens.push
+                      (
+                        '<tr class="' + classes.join( ' ' ) + '">' +
+                        '<td>' + data + '</td>' +
+                        '</tr>'
+                      );
                     }
-                    
+                    table
+                      .append
+                      (
+                        '<td class="details">' +
+                        '<table border="0" cellspacing="0" cellpadding="0">' +
+                        tokens.join( "\n" ) +
+                        '</table></td>'
+                      );
+                  }
+                }
+                
+              }
             }
-        );
-    }
+          }
+                    
+      }
+    );
+  }
 );

Modified: lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/app.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/app.js?rev=1298078&r1=1298077&r2=1298078&view=diff
==============================================================================
--- lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/app.js (original)
+++ lucene/dev/branches/solr_3159_jetty8/solr/webapp/web/js/scripts/app.js Wed Mar  7 20:02:23 2012
@@ -1,263 +1,308 @@
+/*
+ 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.
+*/
+
 var loader = {
     
-    show : function( element )
-    {
-        $( element )
-            .addClass( 'loader' );
-    },
+  show : function( element )
+  {
+    $( element )
+      .addClass( 'loader' );
+  },
     
-    hide : function( element )
-    {
-        $( element )
-            .removeClass( 'loader' );
-    }
+  hide : function( element )
+  {
+    $( element )
+      .removeClass( 'loader' );
+  }
     
 };
 
 Number.prototype.esc = function()
 {
-    return new String( this ).esc();
+  return new String( this ).esc();
 }
 
 String.prototype.esc = function()
 {
-    return this.replace( /</g, '&lt;' ).replace( />/g, '&gt;' );
+  return this.replace( /</g, '&lt;' ).replace( />/g, '&gt;' );
+}
+
+SolrDate = function( date )
+{
+  // ["Sat Mar 03 11:00:00 CET 2012", "Sat", "Mar", "03", "11:00:00", "CET", "2012"]
+  var parts = date.match( /^(\w+)\s+(\w+)\s+(\d+)\s+(\d+\:\d+\:\d+)\s+(\w+)\s+(\d+)$/ );
+    
+  // "Sat Mar 03 2012 10:37:33"
+  return new Date( parts[1] + ' ' + parts[2] + ' ' + parts[3] + ' ' + parts[6] + ' ' + parts[4] );
 }
 
 var sammy = $.sammy
 (
-    function()
-    {
-        this.bind
-        (
-            'run',
-            function( event, config )
-            {
-                if( 0 === config.start_url.length )
-                {
-                    location.href = '#/';
-                    return false;
-                }
-            }
-        );
+  function()
+  {
+    this.bind
+    (
+      'run',
+      function( event, config )
+      {
+        if( 0 === config.start_url.length )
+        {
+          location.href = '#/';
+          return false;
+        }
+      }
+    );
         
-        // activate_core
-        this.before
-        (
-            {},
-            function( context )
-            {
-                $( 'li[id].active', app.menu_element )
-                    .removeClass( 'active' );
+    // activate_core
+    this.before
+    (
+      {},
+      function( context )
+      {
+        $( 'li[id].active', app.menu_element )
+          .removeClass( 'active' );
                 
-                $( 'ul li.active', app.menu_element )
-                    .removeClass( 'active' );
+        $( 'ul li.active', app.menu_element )
+          .removeClass( 'active' );
 
-                if( this.params.splat )
-                {
-                    var active_element = $( '#' + this.params.splat[0], app.menu_element );
+        if( this.params.splat )
+        {
+          var active_element = $( '#' + this.params.splat[0], app.menu_element );
                     
-                    if( 0 === active_element.size() )
-                    {
-                        var first_core = $( 'li[data-basepath]', app.menu_element ).attr( 'id' );
-                        var first_core_url = context.path.replace( new RegExp( '/' + this.params.splat[0] + '/' ), '/' + first_core + '/' );
-
-                        context.redirect( first_core_url );
-                        return false;
-                    }
-
-                    active_element
-                        .addClass( 'active' );
-
-                    if( this.params.splat[1] )
-                    {
-                        $( '.' + this.params.splat[1], active_element )
-                            .addClass( 'active' );
-                    }
-
-                    if( !active_element.hasClass( 'global' ) )
-                    {
-                        this.active_core = active_element;
-                    }
-                }
-            }
-        );
-    }
+          if( 0 === active_element.size() )
+          {
+            var first_core = $( 'li[data-basepath]', app.menu_element ).attr( 'id' );
+            var first_core_url = context.path.replace( new RegExp( '/' + this.params.splat[0] + '/' ), '/' + first_core + '/' );
+
+            context.redirect( first_core_url );
+            return false;
+          }
+
+          active_element
+            .addClass( 'active' );
+
+          if( this.params.splat[1] )
+          {
+            $( '.' + this.params.splat[1], active_element )
+              .addClass( 'active' );
+          }
+
+          if( !active_element.hasClass( 'global' ) )
+          {
+            this.active_core = active_element;
+          }
+        }
+      }
+    );
+  }
 );
 
 var solr_admin = function( app_config )
 {
 	self = this,
 
-    menu_element = null,
+  menu_element = null,
 
-    is_multicore = null,
-    cores_data = null,
-    active_core = null,
-    environment_basepath = null,
+  is_multicore = null,
+  cores_data = null,
+  active_core = null,
+  environment_basepath = null,
     
-    config = app_config,
-    params = null,
-    dashboard_values = null,
-    schema_browser_data = null,
+  config = app_config,
+  params = null,
+  dashboard_values = null,
+  schema_browser_data = null,
 
-    plugin_data = null,
+  plugin_data = null,
     
-    this.menu_element = $( '#menu ul' );
-    this.config = config;
+  this.menu_element = $( '#menu ul' );
+  this.config = config;
+
+  this.run = function()
+  {
+    $.ajax
+    (
+      {
+        url : config.solr_path + config.core_admin_path + '?wt=json',
+        dataType : 'json',
+        beforeSend : function( arr, form, options )
+        {               
+          $( '#content' )
+            .html( '<div id="index"><div class="loader">Loading ...</div></div>' );
+        },
+        success : function( response )
+        {
+          self.cores_data = response.status;
+          is_multicore = 'undefined' === typeof response.status[''];
+
+          if( is_multicore )
+          {
+            self.menu_element
+              .addClass( 'multicore' );
+
+            $( '#cores', menu_element )
+              .show();
+          }
+          else
+          {
+            self.menu_element
+              .addClass( 'singlecore' );
+          }
+
+          for( var core_name in response.status )
+          {
+            var core_path = config.solr_path + '/' + core_name;
+
+            if( !core_name )
+            {
+              core_name = 'singlecore';
+              core_path = config.solr_path
+            }
+
+            if( !environment_basepath )
+            {
+              environment_basepath = core_path;
+            }
+
+            var core_tpl = '<li id="' + core_name + '" data-basepath="' + core_path + '">' + "\n"
+                         + '  <p><a href="#/' + core_name + '">' + core_name + '</a></p>' + "\n"
+                         + '  <ul>' + "\n"
+
+                         + '    <li class="ping"><a rel="' + core_path + '/admin/ping"><span>Ping</span></a></li>' + "\n"
+                         + '    <li class="query"><a href="#/' + core_name + '/query"><span>Query</span></a></li>' + "\n"
+                         + '    <li class="schema"><a href="#/' + core_name + '/schema"><span>Schema</span></a></li>' + "\n"
+                         + '    <li class="config"><a href="#/' + core_name + '/config"><span>Config</span></a></li>' + "\n"
+                         + '    <li class="replication"><a href="#/' + core_name + '/replication"><span>Replication</span></a></li>' + "\n"
+                         + '    <li class="analysis"><a href="#/' + core_name + '/analysis"><span>Analysis</span></a></li>' + "\n"
+                         + '    <li class="schema-browser"><a href="#/' + core_name + '/schema-browser"><span>Schema Browser</span></a></li>' + "\n"
+                         + '    <li class="plugins"><a href="#/' + core_name + '/plugins"><span>Plugins</span></a></li>' + "\n"
+                         + '    <li class="dataimport"><a href="#/' + core_name + '/dataimport"><span>Dataimport</span></a></li>' + "\n"
+
+                         + '    </ul>' + "\n"
+                         + '</li>';
+
+            self.menu_element
+              .append( core_tpl );
+          }
 
-    this.run = function()
-    {
-        $.ajax
-        (
+          $.ajax
+          (
             {
-                url : config.solr_path + config.core_admin_path + '?wt=json',
-                dataType : 'json',
-                beforeSend : function( arr, form, options )
-                {               
-                    $( '#content' )
-                        .html( '<div id="index"><div class="loader">Loading ...</div></div>' );
-                },
-                success : function( response )
+              url : environment_basepath + '/admin/system?wt=json',
+              dataType : 'json',
+              beforeSend : function( arr, form, options )
+              {
+              },
+              success : function( response )
+              {
+                self.dashboard_values = response;
+
+                var environment_args = null;
+                var cloud_args = null;
+
+                if( response.jvm && response.jvm.jmx && response.jvm.jmx.commandLineArgs )
+                {
+                  var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );
+
+                  environment_args = command_line_args.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
+                  cloud_args = command_line_args.match( /-Dzk/i );
+                }
+
+                // title
+
+                $( 'title', document )
+                  .append( ' (' + response.core.host + ')' );
+
+                // environment
+
+                var environment_element = $( '#environment' );
+                if( environment_args )
                 {
-                    self.cores_data = response.status;
-                    is_multicore = 'undefined' === typeof response.status[''];
+                  environment_element
+                    .show();
 
-                    if( is_multicore )
-                    {
-                        self.menu_element
-                            .addClass( 'multicore' );
-
-                        $( '#cores', menu_element )
-                            .show();
-                    }
-                    else
-                    {
-                        self.menu_element
-                            .addClass( 'singlecore' );
-                    }
-
-                    for( var core_name in response.status )
-                    {
-                        var core_path = config.solr_path + '/' + core_name;
-
-                        if( !core_name )
-                        {
-                            core_name = 'singlecore';
-                            core_path = config.solr_path
-                        }
-
-                        if( !environment_basepath )
-                        {
-                            environment_basepath = core_path;
-                        }
-
-                        var core_tpl = '<li id="' + core_name + '" data-basepath="' + core_path + '">' + "\n"
-                                     + '    <p><a href="#/' + core_name + '">' + core_name + '</a></p>' + "\n"
-                                     + '    <ul>' + "\n"
-
-                                     + '        <li class="ping"><a rel="' + core_path + '/admin/ping"><span>Ping</span></a></li>' + "\n"
-                                     + '        <li class="query"><a href="#/' + core_name + '/query"><span>Query</span></a></li>' + "\n"
-                                     + '        <li class="schema"><a href="#/' + core_name + '/schema"><span>Schema</span></a></li>' + "\n"
-                                     + '        <li class="config"><a href="#/' + core_name + '/config"><span>Config</span></a></li>' + "\n"
-                                     + '        <li class="replication"><a href="#/' + core_name + '/replication"><span>Replication</span></a></li>' + "\n"
-                                     + '        <li class="analysis"><a href="#/' + core_name + '/analysis"><span>Analysis</span></a></li>' + "\n"
-                                     + '        <li class="schema-browser"><a href="#/' + core_name + '/schema-browser"><span>Schema Browser</span></a></li>' + "\n"
-                                     + '        <li class="plugins"><a href="#/' + core_name + '/plugins"><span>Plugins</span></a></li>' + "\n"
-                                     + '        <li class="dataimport"><a href="#/' + core_name + '/dataimport"><span>Dataimport</span></a></li>' + "\n"
-
-                                     + '    </ul>' + "\n"
-                                     + '</li>';
-
-                        self.menu_element
-                            .append( core_tpl );
-                    }
-
-                    $.ajax
-                    (
-                        {
-                            url : environment_basepath + '/admin/system?wt=json',
-                            dataType : 'json',
-                            beforeSend : function( arr, form, options )
-                            {
-                            },
-                            success : function( response )
-                            {
-                                self.dashboard_values = response;
-
-                                var environment_args = null;
-                                var cloud_args = null;
-
-                                if( response.jvm && response.jvm.jmx && response.jvm.jmx.commandLineArgs )
-                                {
-                                    var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );
-
-                                    environment_args = command_line_args
-                                                            .match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
-
-                                    cloud_args = command_line_args
-                                                            .match( /-Dzk/i );
-                                }
-
-                                // environment
-
-                                var environment_element = $( '#environment' );
-                                if( environment_args )
-                                {
-                                    environment_element
-                                        .show();
-
-                                    if( environment_args[1] )
-                                    {
-                                        environment_element
-                                            .html( environment_args[1] );
-                                    }
-
-                                    if( environment_args[2] )
-                                    {
-                                        environment_element
-                                            .addClass( environment_args[2] );
-                                    }
-                                }
-                                else
-                                {
-                                    environment_element
-                                        .remove();
-                                }
-
-                                // cloud
-
-                                var cloud_nav_element = $( '#menu #cloud' );
-                                if( cloud_args )
-                                {
-                                    cloud_nav_element
-                                        .show();
-                                }
-
-                                // sammy
-
-                                sammy.run( location.hash );
-                            },
-                            error : function()
-                            {
-                            },
-                            complete : function()
-                            {
-                                loader.hide( this );
-                            }
-                        }
-                    );
-                },
-                error : function()
+                  if( environment_args[1] )
+                  {
+                    environment_element
+                      .html( environment_args[1] );
+                  }
+
+                  if( environment_args[2] )
+                  {
+                    environment_element
+                      .addClass( environment_args[2] );
+                  }
+                }
+                else
                 {
-                },
-                complete : function()
+                  environment_element
+                    .remove();
+                }
+
+                // cloud
+
+                var cloud_nav_element = $( '#menu #cloud' );
+                if( cloud_args )
                 {
+                  cloud_nav_element
+                    .show();
                 }
+
+                // sammy
+
+                sammy.run( location.hash );
+              },
+              error : function()
+              {
+                var main = $( '#main' );
+
+                $( 'div[id$="-wrapper"]', main )
+                  .remove();
+
+                main
+                  .addClass( 'error' )
+                  .append
+                  (
+                    '<div class="message">This interface requires that you activate the admin request handlers, add the following configuration to your <code>solrconfig.xml:</code></div>' +
+                    '<div class="code"><pre class="syntax language-xml"><code>' +
+                    '<!-- Admin Handlers - This will register all the standard admin RequestHandlers. -->'.esc() + "\n" +
+                    '<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />'.esc() +
+                    '</code></pre></div>'
+                  );
+
+                hljs.highlightBlock( $( 'pre', main ).get(0) );
+              },
+              complete : function()
+              {
+                loader.hide( this );
+              }
             }
-        );
-    }
+          );
+        },
+        error : function()
+        {
+        },
+        complete : function()
+        {
+        }
+      }
+    );
+  }
 
 };
 
-var app = new solr_admin( app_config );
\ No newline at end of file
+var app = new solr_admin( app_config );