mirror of https://github.com/apache/lucene.git
SOLR-3401: Always show CoreAdmin
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1339232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3f73342025
commit
4898a6eb8e
|
@ -79,7 +79,7 @@ limitations under the License.
|
||||||
<li id="index" class="global"><p><a href="#/">Dashboard</a></p></li>
|
<li id="index" class="global"><p><a href="#/">Dashboard</a></p></li>
|
||||||
<li id="logging" class="global"><p><a href="#/~logging">Logging</a></p></li>
|
<li id="logging" class="global"><p><a href="#/~logging">Logging</a></p></li>
|
||||||
<li id="cloud" class="global optional"><p><a href="#/~cloud">Cloud</a></p></li>
|
<li id="cloud" class="global optional"><p><a href="#/~cloud">Cloud</a></p></li>
|
||||||
<li id="cores" class="global optional"><p><a href="#/~cores">Core Admin</a></p></li>
|
<li id="cores" class="global"><p><a href="#/~cores">Core Admin</a></p></li>
|
||||||
<li id="java-properties" class="global"><p><a href="#/~java-properties">Java Properties</a></li>
|
<li id="java-properties" class="global"><p><a href="#/~java-properties">Java Properties</a></li>
|
||||||
<li id="threads" class="global"><p><a href="#/~threads">Thread Dump</a></p></li>
|
<li id="threads" class="global"><p><a href="#/~threads">Thread Dump</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -131,7 +131,7 @@ var sammy = $.sammy
|
||||||
|
|
||||||
var solr_admin = function( app_config )
|
var solr_admin = function( app_config )
|
||||||
{
|
{
|
||||||
self = this,
|
self = this,
|
||||||
|
|
||||||
menu_element = null,
|
menu_element = null,
|
||||||
|
|
||||||
|
@ -168,41 +168,29 @@ var solr_admin = function( app_config )
|
||||||
{
|
{
|
||||||
self.cores_data = response.status;
|
self.cores_data = response.status;
|
||||||
|
|
||||||
var core_count = 0; for( var i in response.status ) { core_count++; }
|
|
||||||
is_multicore = core_count > 1;
|
|
||||||
|
|
||||||
if( is_multicore )
|
|
||||||
{
|
|
||||||
self.menu_element
|
|
||||||
.addClass( 'multicore' );
|
|
||||||
|
|
||||||
$( '#cores', menu_element )
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
self.menu_element
|
|
||||||
.addClass( 'singlecore' );
|
|
||||||
}
|
|
||||||
|
|
||||||
for( var core_name in response.status )
|
for( var core_name in response.status )
|
||||||
{
|
{
|
||||||
var core_path = config.solr_path + '/' + core_name;
|
var core_path = config.solr_path + '/' + core_name;
|
||||||
var schema = response['status'][core_name]['schema'];
|
var schema = response['status'][core_name]['schema'];
|
||||||
var solrconfig = response['status'][core_name]['config'];
|
var solrconfig = response['status'][core_name]['config'];
|
||||||
|
var classes = [];
|
||||||
if( !core_name )
|
|
||||||
{
|
|
||||||
core_name = 'singlecore';
|
|
||||||
core_path = config.solr_path
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !environment_basepath )
|
if( !environment_basepath )
|
||||||
{
|
{
|
||||||
environment_basepath = core_path;
|
environment_basepath = core_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
var core_tpl = '<li id="' + core_name + '" data-basepath="' + core_path + '" schema="' + schema + '" config="' + solrconfig + '">' + "\n"
|
if( response['status'][core_name]['isDefaultCore'] )
|
||||||
|
{
|
||||||
|
classes.push( 'default' );
|
||||||
|
}
|
||||||
|
|
||||||
|
var core_tpl = '<li id="' + core_name + '" '
|
||||||
|
+ ' class="' + classes.join( ' ' ) + '"'
|
||||||
|
+ ' data-basepath="' + core_path + '"'
|
||||||
|
+ ' schema="' + schema + '"'
|
||||||
|
+ ' config="' + solrconfig + '"'
|
||||||
|
+ '>' + "\n"
|
||||||
+ ' <p><a href="#/' + core_name + '">' + core_name + '</a></p>' + "\n"
|
+ ' <p><a href="#/' + core_name + '">' + core_name + '</a></p>' + "\n"
|
||||||
+ ' <ul>' + "\n"
|
+ ' <ul>' + "\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue