SOLR-2399: Solr Admin Interface, reworked

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1132826 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2011-06-06 22:54:05 +00:00
parent 31479ab48c
commit d280169fef
6 changed files with 235 additions and 186 deletions

View File

@ -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

View File

@ -1,153 +0,0 @@

/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
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;
}

View File

@ -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, '&lt;' ).replace( /\>/g, '&gt;' ) +
'</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) );
}
}
}
);
}
);

View File

@ -174,7 +174,7 @@
</div>
<div id="navigation">
<div id="navigation" class="clearfix">
<div class="actions">

View File

@ -1,4 +1,3 @@
<link rel="stylesheet" type="text/css" href="css/syntax.css">
<div id="dataimport" class="clearfix">
<div id="frame">

View File

@ -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">