mirror of https://github.com/apache/lucene.git
SOLR-3238: Link Schema-Browser to Analysis and Query
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1331707 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
269ff0028d
commit
937658dbcf
|
@ -152,10 +152,34 @@
|
|||
{
|
||||
margin-right: 5px;
|
||||
text-align: right;
|
||||
width: 100px;
|
||||
width: 125px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer p a
|
||||
{
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer p a.analysis
|
||||
{
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer p a.analysis span
|
||||
{
|
||||
background-image: url( ../../img/ico/question-white.png );
|
||||
background-position: 0 50%;
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer p a.analysis:hover span
|
||||
{
|
||||
background-image: url( ../../img/ico/question.png );
|
||||
color: #008;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer a
|
||||
{
|
||||
cursor: auto;
|
||||
|
@ -186,7 +210,7 @@
|
|||
{
|
||||
clear: left;
|
||||
display: none;
|
||||
margin-left: 30px;
|
||||
margin-left: 55px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
|
@ -327,6 +351,31 @@
|
|||
color: #008;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .head #query_link
|
||||
{
|
||||
background-image: url( ../../img/ico/question-white.png );
|
||||
background-position: 0 50%;
|
||||
color: #c0c0c0;
|
||||
padding-left: 21px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .head #query_link:hover
|
||||
{
|
||||
background-image: url( ../../img/ico/question.png );
|
||||
}
|
||||
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .head #query_link span
|
||||
{
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .head #query_link:hover span
|
||||
{
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#content #schema-browser .topterms-holder li
|
||||
{
|
||||
border-top: 1px solid #999;
|
||||
|
|
|
@ -135,6 +135,9 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
|
|||
$( 'p.head .max', topterms_holder_element )
|
||||
.html( field_data.distinct );
|
||||
|
||||
$( 'p.head #query_link', topterms_holder_element )
|
||||
.attr( 'href', '#/' + current_core + '/query?q=' + field.esc() + ':[* TO *]' );
|
||||
|
||||
$( 'ul li:even', topterms_table_element )
|
||||
.addClass( 'odd' );
|
||||
}
|
||||
|
@ -884,9 +887,16 @@ sammy.get
|
|||
var analyzer_element = $( '.analyzer', data_element );
|
||||
var analyzer_data = null;
|
||||
|
||||
var analysis_link = false;
|
||||
var analysis_link_elements = $( 'p a', analyzer_element );
|
||||
var analysis_target = '#/' + current_core + '/analysis?';
|
||||
|
||||
if( is_f )
|
||||
{
|
||||
analyzer_data = schema_browser_data.types[schema_browser_data.relations.f_t[field]];
|
||||
|
||||
analysis_link = true;
|
||||
analysis_target += 'analysis.fieldname=' + field;
|
||||
}
|
||||
else if( is_df )
|
||||
{
|
||||
|
@ -895,8 +905,25 @@ sammy.get
|
|||
else if( is_t )
|
||||
{
|
||||
analyzer_data = schema_browser_data.types[field];
|
||||
|
||||
analysis_link = true;
|
||||
analysis_target += 'analysis.fieldtype=' + field;
|
||||
}
|
||||
|
||||
if( analysis_link )
|
||||
{
|
||||
analysis_link_elements
|
||||
.addClass( 'analysis' )
|
||||
.attr( 'href', analysis_target );
|
||||
}
|
||||
else
|
||||
{
|
||||
analysis_link_elements
|
||||
.removeClass( 'analysis' )
|
||||
.removeAttr( 'href' );
|
||||
}
|
||||
|
||||
|
||||
if( analyzer_data )
|
||||
{
|
||||
var transform_analyzer_data_into_list = function( analyzer_data )
|
||||
|
|
|
@ -52,7 +52,7 @@ limitations under the License.
|
|||
<ul class="analyzer">
|
||||
<li class="clearfix index">
|
||||
|
||||
<p>Index Analyzer:</p>
|
||||
<p><a><span>Index Analyzer:</span></a></p>
|
||||
<dl>
|
||||
<dt><a class="toggle"></a></dt>
|
||||
</dl>
|
||||
|
@ -73,7 +73,7 @@ limitations under the License.
|
|||
</li>
|
||||
<li class="clearfix query">
|
||||
|
||||
<p>Query Analyzer:</p>
|
||||
<p><a><span>Query Analyzer:</span></a></p>
|
||||
<dl>
|
||||
<dt><a class="toggle"></a></dt>
|
||||
</dl>
|
||||
|
@ -114,6 +114,7 @@ limitations under the License.
|
|||
<p class="head">
|
||||
<input type="text">
|
||||
<a class="max-holder" title="Load all Top-Terms">/<span class="max"></span></a> Top-Terms:
|
||||
<a id="query_link" href="#"><span>Query</span> </a>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
|
Loading…
Reference in New Issue