Apache Lucene open-source search software
SOLR-2399: Solr Admin Interface, reworked
Ryan McKinleyd280169fefc0
diff --git a/solr/src/webapp/web/css/screen.css b/solr/src/webapp/web/css/screen.cssindex 0c2f0594a15..5fc779d2540 100644--- a/solr/src/webapp/web/css/screen.css+++ b/solr/src/webapp/web/css/screen.css@@ -293,7 +293,7 @@ uldisplay: none;}-#menu .singlecore li:last-child+#menu li.active:last-child{border-bottom: 0;}@@ -310,10 +310,14 @@ ul#menu ul .active ul{- border-bottom: 1px solid #f0f0f0;display: block;}+#menu ul li.active:last-child ul+{+ border-bottom: 1px solid #f0f0f0;+}+#menu ul ul li{border-bottom: 0;@@ -406,6 +410,18 @@ ul#menu .plugins a { background-image: url( ../img/ico/block.png ); }#menu .dataimport a { background-image: url( ../img/ico/document-import.png ); }+#menu .ping.error+{+ background-color: #f7f7e9;+}++#menu .ping.error a+{+ background-color: transparent;+ background-image: url( ../img/ico/system-monitor--exclamation.png );+ cursor: help;+}+#content-wrapper{float: right;@@ -417,17 +433,16 @@ ulpadding: 10px;}-#content.single+#content > .loader{- padding: 0;+ background-position: 0 50%;+ padding-left: 21px;}-#content iframe+#content > pre{- border: 0;- display: block;- min-height: 400px;- width: 100%;+ max-height: 600px;+ overflow: auto;}#content .block@@ -462,6 +477,155 @@ uldisplay: none;}+/* syntax */++pre.syntax+{+ overflow: auto;+}++pre.syntax code+{+ display: block;+ color: #000;+}++pre.syntax .comment,+pre.syntax .template_comment,+pre.syntax .diff .header,+pre.syntax .javadoc+{+ color: #998;+ font-style: italic;+}++pre.syntax .keyword,+pre.syntax .css .rule .keyword,+pre.syntax .winutils,+pre.syntax .javascript .title,+pre.syntax .lisp .title,+pre.syntax .subst+{+ color: #000;+ font-weight: bold;+}++pre.syntax .number,+pre.syntax .hexcolor+{+ color: #40a070;+}++pre.syntax .string,+pre.syntax .tag .value,+pre.syntax .phpdoc,+pre.syntax .tex .formula+{+ color: #d14;+}++pre.syntax .title,+pre.syntax .id+{+ color: #900;+ font-weight: bold;+}++pre.syntax .javascript .title,+pre.syntax .lisp .title,+pre.syntax .subst+{+ font-weight: normal;+}++pre.syntax .class .title,+pre.syntax .tex .command+{+ color: #458;+ font-weight: bold;+}++pre.syntax .tag,+pre.syntax .css .keyword,+pre.syntax .html .keyword,+pre.syntax .tag .title,+pre.syntax .django .tag .keyword+{+ color: #000080;+ font-weight: normal;+}++pre.syntax .attribute,+pre.syntax .variable,+pre.syntax .instancevar,+pre.syntax .lisp .body+{+ color: #008080;+}++pre.syntax .regexp+{+ color: #009926;+}++pre.syntax .class+{+ color: #458;+ font-weight: bold;+}++pre.syntax .symbol,+pre.syntax .ruby .symbol .string,+pre.syntax .ruby .symbol .keyword,+pre.syntax .ruby .symbol .keymethods,+pre.syntax .lisp .keyword,+pre.syntax .tex .special+{+ color: #990073;+}++pre.syntax .builtin,+pre.syntax .built_in,+pre.syntax .lisp .title+{+ color: #0086b3;+}++pre.syntax .preprocessor,+pre.syntax .pi,+pre.syntax .doctype,+pre.syntax .shebang,+pre.syntax .cdata+{+ color: #999;+ font-weight: bold;+}++pre.syntax .deletion+{+ background: #fdd;+}++pre.syntax .addition+{+ background: #dfd;+}++pre.syntax .diff .change+{+ background: #0086b3;+}++pre.syntax .chunk+{+ color: #aaa;+}++pre.syntax .tex .formula+{+ opacity: 0.5;+}+/* dashboard */#content #dashboard .block@@ -2177,22 +2341,27 @@ ul#content #cores{- background-image: url( ../img/div.gif );- background-position: 150px 0;- background-repeat: repeat-y;}#content #cores #frame{float: right;- width: 610px;+ width: 78%;+}++#content #cores #navigation+{+ background-image: url( ../img/div.gif );+ background-position: 100% 0;+ background-repeat: repeat-y;+ width: 20%;}#content #cores #list{float: left;padding-top: 15px;- width: 151px;+ width: 100%;}#content #cores #list adiff --git a/solr/src/webapp/web/css/syntax.css b/solr/src/webapp/web/css/syntax.cssdeleted file mode 100644index ea21cf9afa2..00000000000--- a/solr/src/webapp/web/css/syntax.css+++ /dev/null@@ -1,153 +0,0 @@--/*--github.com style (c) Vasily Polovnyov <[email protected]>--*/--pre.syntax-{- overflow: auto;-}--pre.syntax code-{- display: block;- color: #000;-}--pre.syntax .comment,-pre.syntax .template_comment,-pre.syntax .diff .header,-pre.syntax .javadoc-{- color: #998;- font-style: italic;-}--pre.syntax .keyword,-pre.syntax .css .rule .keyword,-pre.syntax .winutils,-pre.syntax .javascript .title,-pre.syntax .lisp .title,-pre.syntax .subst-{- color: #000;- font-weight: bold;-}--pre.syntax .number,-pre.syntax .hexcolor-{- color: #40a070;-}--pre.syntax .string,-pre.syntax .tag .value,-pre.syntax .phpdoc,-pre.syntax .tex .formula-{- color: #d14;-}--pre.syntax .title,-pre.syntax .id-{- color: #900;- font-weight: bold;-}--pre.syntax .javascript .title,-pre.syntax .lisp .title,-pre.syntax .subst-{- font-weight: normal;-}--pre.syntax .class .title,-pre.syntax .tex .command-{- color: #458;- font-weight: bold;-}--pre.syntax .tag,-pre.syntax .css .keyword,-pre.syntax .html .keyword,-pre.syntax .tag .title,-pre.syntax .django .tag .keyword-{- color: #000080;- font-weight: normal;-}--pre.syntax .attribute,-pre.syntax .variable,-pre.syntax .instancevar,-pre.syntax .lisp .body-{- color: #008080;-}--pre.syntax .regexp-{- color: #009926;-}--pre.syntax .class-{- color: #458;- font-weight: bold;-}--pre.syntax .symbol,-pre.syntax .ruby .symbol .string,-pre.syntax .ruby .symbol .keyword,-pre.syntax .ruby .symbol .keymethods,-pre.syntax .lisp .keyword,-pre.syntax .tex .special-{- color: #990073;-}--pre.syntax .builtin,-pre.syntax .built_in,-pre.syntax .lisp .title-{- color: #0086b3;-}--pre.syntax .preprocessor,-pre.syntax .pi,-pre.syntax .doctype,-pre.syntax .shebang,-pre.syntax .cdata-{- color: #999;- font-weight: bold;-}--pre.syntax .deletion-{- background: #fdd;-}--pre.syntax .addition-{- background: #dfd;-}--pre.syntax .diff .change-{- background: #0086b3;-}--pre.syntax .chunk-{- color: #aaa;-}--pre.syntax .tex .formula-{- opacity: 0.5;-}\ No newline at end of filediff --git a/solr/src/webapp/web/js/script.js b/solr/src/webapp/web/js/script.jsindex 45d6789aabc..acc697ed2c1 100644--- a/solr/src/webapp/web/js/script.js+++ b/solr/src/webapp/web/js/script.js@@ -36,26 +36,31 @@ var sammy = $.sammy'ping',function( event ){- var element = $( this.params.element );-$.ajax({- url : element.attr( 'href' ) + '?wt=json',+ url : $( this.params.element ).attr( 'href' ) + '?wt=json',dataType : 'json',+ context: this.params.element,beforeSend : function( arr, form, options ){- loader.show( element );+ loader.show( this );},- success : function( response )+ success : function( response, text_status, xhr ){- var qtime_element = $( '.qtime', element );+ $( this )+ .removeAttr( 'title' );++ $( this ).parents( 'li' )+ .removeClass( 'error' );++ var qtime_element = $( '.qtime', this );if( 0 === qtime_element.size() ){qtime_element = $( '<small class="qtime"> (<span></span>)</small>' );- element+ $( this ).append(qtime_element@@ -65,12 +70,17 @@ var sammy = $.sammy$( 'span', qtime_element ).html( response.responseHeader.QTime + 'ms' );},- error : function()+ error : function( xhr, text_status, error_thrown ){+ $( this )+ .attr( 'title', '/admin/ping is not configured (' + xhr.status + ': ' + error_thrown + ')' );++ $( this ).parents( 'li' )+ .addClass( 'error' );},- complete : function()+ complete : function( xhr, text_status ){- loader.hide( element );+ loader.hide( this );}});@@ -261,6 +271,8 @@ var sammy = $.sammy/^#\/(cores)$/,function( context ){+ delete app.cores_template;+sammy.trigger('cores_load_data',@@ -1991,6 +2003,8 @@ var sammy = $.sammy.hide();};+ delete app.schema_browser_data;+sammy.trigger('schema_browser_load',@@ -3510,13 +3524,33 @@ var sammy = $.sammy/^#\/([\w\d]+)\/(schema|config)$/,function( context ){- var content_element = $( '#content' );+ $.ajax+ (+ {+ url : $( '.active a', this.active_core ).attr( 'href' ),+ dataType : 'xml',+ context : $( '#content' ),+ beforeSend : function( xhr, settings )+ {+ this+ .html( '<div class="loader">Loading ...</div>' );+ },+ complete : function( xhr, text_status )+ {+ var code = $(+ '<pre class="syntax language-xml"><code>' ++ xhr.responseText.replace( /\</g, '<' ).replace( /\>/g, '>' ) ++ '</code></pre>'+ );+ this.html( code );- content_element- .html( '<iframe src="' + $( '.active a', this.active_core ).attr( 'href' ) + '"></iframe>' );-- $( 'iframe', content_element )- .css( 'height', $( '#main' ).height() );+ if( 'success' === text_status )+ {+ hljs.highlightBlock( code.get(0) );+ }+ }+ }+ );});diff --git a/solr/src/webapp/web/tpl/cores.html b/solr/src/webapp/web/tpl/cores.htmlindex 5baf4bb2a86..c5e02a92e07 100644--- a/solr/src/webapp/web/tpl/cores.html+++ b/solr/src/webapp/web/tpl/cores.html@@ -174,7 +174,7 @@</div>- <div id="navigation">+ <div id="navigation" class="clearfix"><div class="actions">diff --git a/solr/src/webapp/web/tpl/dataimport.html b/solr/src/webapp/web/tpl/dataimport.htmlindex 4a6f757dfc0..9a245da782d 100644--- a/solr/src/webapp/web/tpl/dataimport.html+++ b/solr/src/webapp/web/tpl/dataimport.html@@ -1,4 +1,3 @@-<link rel="stylesheet" type="text/css" href="css/syntax.css"><div id="dataimport" class="clearfix"><div id="frame">diff --git a/solr/src/webapp/web/tpl/schema-browser.html b/solr/src/webapp/web/tpl/schema-browser.htmlindex 592c8547981..6aa3a2c4f31 100644--- a/solr/src/webapp/web/tpl/schema-browser.html+++ b/solr/src/webapp/web/tpl/schema-browser.html@@ -119,7 +119,7 @@<div id="related"><select>- <option value="" selected="selected">Please select �</option>+ <option value="" selected="selected">Please select ...</option></select><dl id="f-df-t">