Apache Solr open-source search software
SOLR-4507: The Cloud tab does not show up in the Admin UI if you set zkHost in solr.xml.
Mark Robert Milleraeb50e205067
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex e08e111f3c1..320c74ea0cd 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -183,6 +183,8 @@ Bug Fixes* SOLR-4480: A trailing + or - caused the edismax parser to throwan exception. (Fiona Tay, Jan Høydahl, yonik)+* SOLR-4507: The Cloud tab does not show up in the Admin UI if you+ set zkHost in solr.xml. (Alfonso Presa, Mark Miller)Optimizations----------------------diff --git a/solr/cloud-dev/solrcloud-start.sh b/solr/cloud-dev/solrcloud-start.shindex 3f9c389e7e1..b9e2ee2cf0d 100644--- a/solr/cloud-dev/solrcloud-start.sh+++ b/solr/cloud-dev/solrcloud-start.sh@@ -22,7 +22,8 @@ cp -r -f example example4cp -r -f example example5cp -r -f example example6-java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd bootstrap -zkhost 127.0.0.1:9983 -solrhome example/solr -runzk 8983+unzip example/webapps/solr.war -d example/solr-webapp+java -classpath "example/solr-webapp/webapp/WEB-INF/lib/*" org.apache.solr.cloud.ZkCLI -cmd bootstrap -zkhost 127.0.0.1:9983 -solrhome example/solr -runzk 8983cd examplejava -DzkRun -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>example.log 2>&1 &diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.javaindex 84bdc8f7980..e8034c302b8 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java@@ -76,6 +76,8 @@ public class SystemInfoHandler extends RequestHandlerBasepublic void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception{rsp.add( "core", getCoreInfo( req.getCore() ) );+ boolean solrCloudMode = req.getCore().getCoreDescriptor().getCoreContainer().isZooKeeperAware();+ rsp.add( "mode", solrCloudMode ? "solrcloud" : "std");rsp.add( "lucene", getLuceneInfo() );rsp.add( "jvm", getJvmInfo() );rsp.add( "system", getSystemInfo() );diff --git a/solr/webapp/web/js/scripts/app.js b/solr/webapp/web/js/scripts/app.jsindex 7ee15453d57..3a21cc89b27 100644--- a/solr/webapp/web/js/scripts/app.js+++ b/solr/webapp/web/js/scripts/app.js@@ -408,9 +408,13 @@ var solr_admin = function( app_config )var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );environment_args = command_line_args.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );- cloud_args = command_line_args.match( /-Dzk/i );}+ if( response.mode )+ {+ cloud_args = response.mode.match( /solrcloud/i );+ }+// title$( 'title', document )