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 2011/06/07 00:54:06 UTC
svn commit: r1132826 - in /lucene/dev/trunk/solr/src/webapp/web:
css/screen.css css/syntax.css js/script.js tpl/cores.html
tpl/dataimport.html tpl/schema-browser.html
Author: ryan
Date: Mon Jun 6 22:54:05 2011
New Revision: 1132826
URL: http://svn.apache.org/viewvc?rev=1132826&view=rev
Log:
SOLR-2399: Solr Admin Interface, reworked
Removed:
lucene/dev/trunk/solr/src/webapp/web/css/syntax.css
Modified:
lucene/dev/trunk/solr/src/webapp/web/css/screen.css
lucene/dev/trunk/solr/src/webapp/web/js/script.js
lucene/dev/trunk/solr/src/webapp/web/tpl/cores.html
lucene/dev/trunk/solr/src/webapp/web/tpl/dataimport.html
lucene/dev/trunk/solr/src/webapp/web/tpl/schema-browser.html
Modified: lucene/dev/trunk/solr/src/webapp/web/css/screen.css
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/webapp/web/css/screen.css?rev=1132826&r1=1132825&r2=1132826&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/webapp/web/css/screen.css (original)
+++ lucene/dev/trunk/solr/src/webapp/web/css/screen.css Mon Jun 6 22:54:05 2011
@@ -293,7 +293,7 @@ ul
display: 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 @@ ul
padding: 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 @@ ul
display: 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 a
Modified: lucene/dev/trunk/solr/src/webapp/web/js/script.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/webapp/web/js/script.js?rev=1132826&r1=1132825&r2=1132826&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/webapp/web/js/script.js (original)
+++ lucene/dev/trunk/solr/src/webapp/web/js/script.js Mon Jun 6 22:54:05 2011
@@ -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) );
+ }
+ }
+ }
+ );
}
);
Modified: lucene/dev/trunk/solr/src/webapp/web/tpl/cores.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/webapp/web/tpl/cores.html?rev=1132826&r1=1132825&r2=1132826&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/webapp/web/tpl/cores.html (original)
+++ lucene/dev/trunk/solr/src/webapp/web/tpl/cores.html Mon Jun 6 22:54:05 2011
@@ -174,7 +174,7 @@
</div>
- <div id="navigation">
+ <div id="navigation" class="clearfix">
<div class="actions">
Modified: lucene/dev/trunk/solr/src/webapp/web/tpl/dataimport.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/webapp/web/tpl/dataimport.html?rev=1132826&r1=1132825&r2=1132826&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/webapp/web/tpl/dataimport.html (original)
+++ lucene/dev/trunk/solr/src/webapp/web/tpl/dataimport.html Mon Jun 6 22:54:05 2011
@@ -1,4 +1,3 @@
-<link rel="stylesheet" type="text/css" href="css/syntax.css">
<div id="dataimport" class="clearfix">
<div id="frame">
Modified: lucene/dev/trunk/solr/src/webapp/web/tpl/schema-browser.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/webapp/web/tpl/schema-browser.html?rev=1132826&r1=1132825&r2=1132826&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/webapp/web/tpl/schema-browser.html (original)
+++ lucene/dev/trunk/solr/src/webapp/web/tpl/schema-browser.html Mon Jun 6 22:54:05 2011
@@ -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">