From 59a877489da54fcfd3725c122c07ba50ef593e4e Mon Sep 17 00:00:00 2001 From: Erik Hatcher Date: Fri, 19 Jun 2009 14:10:26 +0000 Subject: [PATCH] SOLR-1230: Enhance data import developer console to work with all DataImportHandler request handlers git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@786516 13f79535-47bb-0310-9956-ffa450edef68 --- contrib/dataimporthandler/CHANGES.txt | 6 +++- .../src/main/webapp/admin/dataimport.jsp | 34 +++++++++++++++++-- .../src/main/webapp/admin/debug.jsp | 32 +++++++++++------ 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/contrib/dataimporthandler/CHANGES.txt b/contrib/dataimporthandler/CHANGES.txt index 9049ef5bb25..3a396fac39c 100644 --- a/contrib/dataimporthandler/CHANGES.txt +++ b/contrib/dataimporthandler/CHANGES.txt @@ -142,7 +142,11 @@ New Features 32.SOLR-1092: Added a new command named 'import' which does not automatically clean the index. This is useful and more appropriate when one needs to import only some of the entities. (Noble Paul via shalin) -33.SOLR-11153: 'deltaImportQuery' is honored on child entities as well (noble) + +33.SOLR-1153: 'deltaImportQuery' is honored on child entities as well (noble) + +34.SOLR-1230: Enhanced dataimport.jsp to work with all DataImportHandler request handler configurations, + rather than just a hardcoded /dataimport handler. (ehatcher) Optimizations ---------------------- diff --git a/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp b/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp index ff82d9c2c4a..3b9d71c1914 100644 --- a/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp +++ b/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp @@ -1,3 +1,6 @@ +<%@ page import="org.apache.solr.request.SolrRequestHandler" %> +<%@ page import="java.util.Map" %> +<%@ page import="org.apache.solr.handler.dataimport.DataImportHandler" %> <%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%> <%-- Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,9 +19,36 @@ limitations under the License. --%> <%-- do a verbatim include so we can use the local vars --%> +<%@include file="_info.jsp"%> +<% + String handler = request.getParameter("handler"); + + if (handler == null) { + Map handlers = core.getRequestHandlers(); +%> + + DataImportHandler Interactive Development + + + +Select handler: + + +<% } else { %> + - - + + +<% } %> diff --git a/contrib/dataimporthandler/src/main/webapp/admin/debug.jsp b/contrib/dataimporthandler/src/main/webapp/admin/debug.jsp index 0475031d6cd..0ebdf635b1a 100644 --- a/contrib/dataimporthandler/src/main/webapp/admin/debug.jsp +++ b/contrib/dataimporthandler/src/main/webapp/admin/debug.jsp @@ -27,10 +27,17 @@

DataImportHandler Development Console

-
-
- +<% + String handler = request.getParameter("handler"); // must be specified +%> + + + + + + + - +
Handler: <%=handler%> change handler
@@ -49,7 +56,7 @@ name="clean" type="checkbox"> -
Start Row No:of Rows No. of Rows 
@@ -61,17 +68,18 @@
-
+ + @@ -84,13 +92,15 @@
-
+ +
+ Return to Admin Page