Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
replace old index.jsp
Browse files Browse the repository at this point in the history
  • Loading branch information
steffkes committed Mar 3, 2011
1 parent 84888f4 commit 5f80bb0
Showing 1 changed file with 119 additions and 151 deletions.
270 changes: 119 additions & 151 deletions index.jsp
@@ -1,163 +1,131 @@
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
<% request.setCharacterEncoding("UTF-8"); %>

http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--%>

<%-- $Id: index.jsp 1022188 2010-10-13 17:01:13Z markrmiller $ --%>
<%-- $Source: /cvs/main/searching/SolrServer/resources/admin/index.jsp,v $ --%>
<%-- $Name: $ --%>

<%@ page import="java.util.Date" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Collection" %>
<%@ page import="org.apache.solr.request.SolrRequestHandler"%>
<%@ page import="org.apache.solr.handler.ReplicationHandler" %>

<%-- jsp:include page="header.jsp"/ --%>
<%-- do a verbatim include so we can use the local vars --%>
<%@include file="header.jsp" %>
<%boolean replicationhandler = !core.getRequestHandlers(ReplicationHandler.class).isEmpty();%>
<br clear="all">
<table>

<tr>
<td>
<h3>Solr</h3>
</td>
<td>
<% if (null != core.getSchemaResource()) { %>
[<a href="file/?file=<%=core.getSchemaResource()%>">Schema</a>]
<% }
if (null != core.getConfigResource()) { %>
[<a href="file/?file=<%=core.getConfigResource()%>">Config</a>]
<% } %>
[<a href="analysis.jsp?highlight=on">Analysis</a>]
[<a href="schema.jsp">Schema Browser</a>] <%if(replicationhandler){%>[<a href="replication/index.jsp">Replication</a>]<%}%>
<br>
[<a href="stats.jsp">Statistics</a>]
[<a href="registry.jsp">Info</a>]
[<a href="distributiondump.jsp">Distribution</a>]
[<a href="zookeeper.jsp">ZooKeeper</a>]
[<a href="ping">Ping</a>]
[<a href="logging">Logging</a>]
</td>
</tr>
<html>
<head>

<title>solr-admin</title>

<link rel="stylesheet" type="text/css" href="css/screen.css">
<link rel="icon" type="image/ico" href="img/favicon.ico">

<script type="text/javascript">
var app_config = {};
app_config.solr_path = '<%= request.getContextPath() %>';
</script>

</head>
<body>

<div id="wrapper">

<p id="header"><a href="./"><span>Apache SOLR</span></a></p>

<div id="main" class="clearfix">

<div id="content-wrapper">
<div id="content">

&nbsp;

</div>
</div>

<div id="menu-wrapper">
<div id="menu">

<ul>

<%
<%-- 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) {
org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer");
if( null != cores )
{
Collection<String> names = cores.getCoreNames();
if (names.size() > 1) {%><tr><td><strong>Cores:</strong><br></td><td><%
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><%
}}%>
for( String name : names )
{
String core_name = "singlecore";
String core_path = url;
if( 0 != name.length() )
{
core_name = name;
core_path += "/" + name;
}
%>
<li id="<%= core_name %>" data-basepath="<%= core_path %>">
<p><a href="#/<%= core_name %>"><%= core_name %></a></p>

<ul>

<li class="query"><a rel="#/<%= core_name %>/query"><span>Query</span></a></li>

<tr>
<td>
<strong>App server:</strong><br>
</td>
<td>
[<a href="get-properties.jsp">Java Properties</a>]
[<a href="threaddump.jsp">Thread Dump</a>]
<%
if (enabledFile!=null)
if (isEnabled) {
%>
[<a href="action.jsp?action=Disable">Disable</a>]
<%
} else {
%>
[<a href="action.jsp?action=Enable">Enable</a>]
<%
<% if( true ) { //(null != core.getSchemaResource()) { %>
<li class="schema"><a href="<%= core_path %>/admin/file/?file=schema.xml" rel="#/<%= core_name %>/schema"><span>Schema</span></a></li>
<li class="config"><a href="<%= core_path %>/admin/file/?file=solrconfig.xml" rel="#/<%= core_name %>/config"><span>Config</span></a></li>
<% } %>
<% if( true ) { // !core.getRequestHandlers(ReplicationHandler.class).isEmpty() %>
<!--<li class="replication"><a href="<%= core_path %>/admin/replication/index.jsp"><span>Replication</span></a></li>-->
<% } %>
<li class="analysis"><a href="<%= core_path %>/admin/analysis.jsp?highlight=on" rel="#/<%= core_name %>/analysis"><span>Analysis</span></a></li>
<!--<li class="schema-browser"><a href="<%= core_path %>/admin/schema.jsp"><span>Schema Browser</span></a></li>-->
<!--<li class="stats"><a href="<%= core_path %>/admin/stats.jsp"><span>Statistics</span></a></li>-->
<!--<li class="info"><a href="<%= core_path %>/admin/registry.jsp"><span>Info</span></a></li>-->
<!--<li class="zookeeper"><a href="<%= core_path %>/admin/zookeeper.jsp"><span>ZooKeeper</span></a></li>-->
<li class="ping"><a href="<%= core_path %>/admin/ping"><span>Ping</span></a></li>
<!--<li class="logging"><a href="<%= core_path %>/admin/logging"><span>Logging</span></a></li>-->
<!--
<li class="distribution"><a href="<%= core_path %>/admin/distributiondump.jsp"><span>Distribution</span></a></li>
-->
<li class="plugins"><a href="<%= core_path %>/admin/plugins" rel="#/<%= core_name %>/plugins"><span>Plugins</span></a></li>
<!--<li class="java-properties"><a href="<%= core_path %>/admin/get-properties.jsp"><span>Java-Properties</span></a></li>-->
</ul>
</li>
<%
}
%>
</td>
</tr>
}

<%
// a quick hack to get rid of get-file.jsp -- note this still spits out invalid HTML
out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents( "admin-extra.html" ) );
%>

</table><P>


<table>
<tr>
<td>
<h3>Make a Query</h3>
</td>
<td>
[<a href="form.jsp">Full Interface</a>]
</td>

</tr>
<tr>
<td>
Query String:
</td>
<td colspan=2>
<form name=queryForm method="GET" action="../select/" accept-charset="UTF-8">
<textarea class="std" rows="4" cols="40" name="q"><%= defaultSearch %></textarea>
<input name="version" type="hidden" value="2.2">
<input name="start" type="hidden" value="0">
<input name="rows" type="hidden" value="10">
<input name="indent" type="hidden" value="on">
<br><input class="stdbutton" type="submit" value="search"
onclick="if (queryForm.q.value.length==0) { alert('no empty queries, please'); return false; } else { queryForm.submit(); } ">
</form>
</td>
</tr>
</table><p>

<table>
<tr>
<td>
<h3>Assistance</h3>
</td>
<td>
[<a href="http://lucene.apache.org/solr/">Documentation</a>]
[<a href="http://issues.apache.org/jira/browse/SOLR">Issue Tracker</a>]
[<a href="mailto:solr-user@lucene.apache.org">Send Email</a>]
<br>
[<a href="http://wiki.apache.org/solr/SolrQuerySyntax">Solr Query Syntax</a>]
</td>
</tr>
<tr>
<td>
</td>
<td>
Current Time: <%= new Date() %>
</td>
</tr>
<tr>
<td>
</td>
<td>
Server Start At: <%= new Date(core.getStartTime()) %>
</td>
</tr>
</table>
</ul>
</div>
</div>
<div id="meta">
<ul>
<li class="documentation"><a href="http://lucene.apache.org/solr/"><span>Documentation</span></a></li>
<li class="issues"><a href="http://issues.apache.org/jira/browse/SOLR"><span>Issue Tracker</span></a></li>
<li class="mailinglist"><a href="mailto:solr-user@lucene.apache.org"><span>Send Email</span></a></li>
<li class="wiki-query-syntax"><a href="http://wiki.apache.org/solr/SolrQuerySyntax"><span>Solr Query Syntax</span></a></li>
</ul>
</div>
</div>
</div>
<script type="text/javascript" src="js/0_console.js"></script>
<script type="text/javascript" src="js/1_jquery.js"></script>
<script type="text/javascript" src="js/jquery.timeago.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/jquery.sammy.js"></script>
<script type="text/javascript" src="js/script.js"></script>
</body>
</html>
</html>

0 comments on commit 5f80bb0

Please sign in to comment.