mirror of https://github.com/apache/lucene.git
SOLR-3238: Link Analysis to Schema-Browser
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1331705 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7f2ed71391
commit
d2a4908ac8
|
@ -47,6 +47,30 @@
|
|||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#content #analysis .settings #tor_schema
|
||||
{
|
||||
background-image: url( ../../img/ico/question-white.png );
|
||||
background-position: 0 50%;
|
||||
color: #c0c0c0;
|
||||
margin-left: 5px;
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #analysis .settings #tor_schema:hover
|
||||
{
|
||||
background-image: url( ../../img/ico/question.png );
|
||||
}
|
||||
|
||||
#content #analysis .settings #tor_schema span
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #analysis .settings #tor_schema:hover span
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#content #analysis .settings .buttons
|
||||
{
|
||||
float: right;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 766 B |
|
@ -21,7 +21,8 @@ sammy.get
|
|||
/^#\/([\w\d-]+)\/(analysis)$/,
|
||||
function( context )
|
||||
{
|
||||
var core_basepath = this.active_core.attr( 'data-basepath' );
|
||||
var active_core = this.active_core;
|
||||
var core_basepath = active_core.attr( 'data-basepath' );
|
||||
var content_element = $( '#content' );
|
||||
|
||||
$.get
|
||||
|
@ -37,12 +38,31 @@ sammy.get
|
|||
var analysis_result = $( '#analysis-result', analysis_element );
|
||||
analysis_result.hide();
|
||||
|
||||
var type_or_name = $( '#type_or_name', analysis_form );
|
||||
var schema_browser_element = $( '#tor_schema' );
|
||||
var schema_browser_path = $( 'p > a', active_core ).attr( 'href' ) + '/schema-browser'
|
||||
var schema_browser_map = { 'fieldname' : 'field', 'fieldtype' : 'type' };
|
||||
|
||||
type_or_name
|
||||
.die( 'change' )
|
||||
.live
|
||||
(
|
||||
'change',
|
||||
function( event )
|
||||
{
|
||||
var info = $( this ).val().split( '=' );
|
||||
|
||||
schema_browser_element
|
||||
.attr( 'href', schema_browser_path + '?' + schema_browser_map[info[0]] + '=' + info[1] );
|
||||
}
|
||||
);
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : core_basepath + '/admin/luke?wt=json&show=schema',
|
||||
dataType : 'json',
|
||||
context : $( '#type_or_name', analysis_form ),
|
||||
context : type_or_name,
|
||||
beforeSend : function( xhr, settings )
|
||||
{
|
||||
this
|
||||
|
|
|
@ -55,6 +55,7 @@ limitations under the License.
|
|||
|
||||
<label for="type_or_name">Analyse Fieldname / FieldType:</label>
|
||||
<select id="type_or_name"></select>
|
||||
<a id="tor_schema" href="#"><span>Schema Browser</span> </a>
|
||||
|
||||
<div class="buttons clearfix">
|
||||
|
||||
|
|
Loading…
Reference in New Issue