From 4898a6eb8e9fdffd53eeb2cad83f9c556b158980 Mon Sep 17 00:00:00 2001 From: Stefan Matheis Date: Wed, 16 May 2012 15:36:35 +0000 Subject: [PATCH] SOLR-3401: Always show CoreAdmin git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1339232 13f79535-47bb-0310-9956-ffa450edef68 --- solr/webapp/web/admin.html | 2 +- solr/webapp/web/js/scripts/app.js | 38 +++++++++++-------------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/solr/webapp/web/admin.html b/solr/webapp/web/admin.html index db484c79c3f..f77e802ba60 100644 --- a/solr/webapp/web/admin.html +++ b/solr/webapp/web/admin.html @@ -79,7 +79,7 @@ limitations under the License.
  • Dashboard

  • Logging

  • Cloud

  • -
  • Core Admin

  • +
  • Core Admin

  • Java Properties

  • Thread Dump

  • diff --git a/solr/webapp/web/js/scripts/app.js b/solr/webapp/web/js/scripts/app.js index 67282bf5ef9..4ae37140b8b 100644 --- a/solr/webapp/web/js/scripts/app.js +++ b/solr/webapp/web/js/scripts/app.js @@ -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 = '
  • ' + "\n" + if( response['status'][core_name]['isDefaultCore'] ) + { + classes.push( 'default' ); + } + + var core_tpl = '
  • ' + "\n" + '

    ' + core_name + '

    ' + "\n" + '