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:
Stefan Matheis 2012-05-16 15:36:35 +00:00
parent 3f73342025
commit 4898a6eb8e
2 changed files with 14 additions and 26 deletions

View File

@ -79,7 +79,7 @@ limitations under the License.
<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="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="threads" class="global"><p><a href="#/~threads">Thread Dump</a></p></li>
</ul>

View File

@ -131,7 +131,7 @@ var sammy = $.sammy
var solr_admin = function( app_config )
{
self = this,
self = this,
menu_element = null,
@ -168,41 +168,29 @@ var solr_admin = function( app_config )
{
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 )
{
var core_path = config.solr_path + '/' + core_name;
var schema = response['status'][core_name]['schema'];
var solrconfig = response['status'][core_name]['config'];
if( !core_name )
{
core_name = 'singlecore';
core_path = config.solr_path
}
var classes = [];
if( !environment_basepath )
{
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"
+ ' <ul>' + "\n"