lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r964306 - in /lucene/dev/trunk/solr: CHANGES.txt src/webapp/web/admin/index.jsp
Date Thu, 15 Jul 2010 05:37:27 GMT
Author: koji
Date: Thu Jul 15 05:37:27 2010
New Revision: 964306

URL: http://svn.apache.org/viewvc?rev=964306&view=rev
Log:
SOLR-1791: Fix messed up core names on admin gui

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/src/webapp/web/admin/index.jsp

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=964306&r1=964305&r2=964306&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Thu Jul 15 05:37:27 2010
@@ -371,6 +371,8 @@ Bug Fixes
 * SOLR-1981: Solr will now fail correctly if solr.xml attempts to
   specify multiple cores that have the same name (hossman)
 
+* SOLR-1791: Fix messed up core names on admin gui (yonik via koji)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/trunk/solr/src/webapp/web/admin/index.jsp
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/webapp/web/admin/index.jsp?rev=964306&r1=964305&r2=964306&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/webapp/web/admin/index.jsp (original)
+++ lucene/dev/trunk/solr/src/webapp/web/admin/index.jsp Thu Jul 15 05:37:27 2010
@@ -58,11 +58,16 @@
 <%-- List the cores (that arent this one) so we can switch --%>
 <% org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer");
   if (cores!=null) {
-    Collection<SolrCore> names = cores.getCores();
+    Collection<String> names = cores.getCoreNames();
     if (names.size() > 1) {%><tr><td><strong>Cores:</strong><br></td><td><%
-    for (SolrCore name : names) {
-      if(name.equals(core.getName())) continue;
-    %>[<a href="../../<%=name.getName()%>/admin/"><%=name%></a>]<%
        
+    String url = request.getContextPath();
+    for (String name : names) {
+      String lname = name.length()==0 ? cores.getDefaultCoreName() : name; // use the real
core name rather than the default
+      if(name.equals(core.getName())) {
+        %>[<%=lname%>]<%
+      } else {
+        %>[<a href="<%=url%>/<%=lname%>/admin/"><%=lname%></a>]<%
+      }
   }%></td></tr><%
 }}%>
 



Mime
View raw message