mirror of https://github.com/apache/lucene.git
SOLR-1791: Fix messed up core names on admin gui
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@964306 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d592103d63
commit
2fbf7ec677
|
@ -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
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -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><%
|
||||
}}%>
|
||||
|
||||
|
|
Loading…
Reference in New Issue