lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r915553 - /lucene/solr/branches/cloud/src/webapp/web/admin/index.jsp
Date Tue, 23 Feb 2010 22:23:48 GMT
Author: yonik
Date: Tue Feb 23 22:23:48 2010
New Revision: 915553

URL: http://svn.apache.org/viewvc?rev=915553&view=rev
Log:
SOLR-1791: fix core display in admin/index.jsp

Modified:
    lucene/solr/branches/cloud/src/webapp/web/admin/index.jsp

Modified: lucene/solr/branches/cloud/src/webapp/web/admin/index.jsp
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/webapp/web/admin/index.jsp?rev=915553&r1=915552&r2=915553&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/webapp/web/admin/index.jsp (original)
+++ lucene/solr/branches/cloud/src/webapp/web/admin/index.jsp Tue Feb 23 22:23:48 2010
@@ -59,11 +59,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