You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by st...@apache.org on 2012/09/06 10:26:58 UTC

svn commit: r1381520 - in /lucene/dev/branches/branch_4x/solr: CHANGES.txt webapp/web/js/scripts/dataimport.js webapp/web/tpl/dataimport.html

Author: steffkes
Date: Thu Sep  6 08:26:58 2012
New Revision: 1381520

URL: http://svn.apache.org/viewvc?rev=1381520&view=rev
Log:
SOLR-3668: fix handling of custom parameters for dataimport on admin ui

Modified:
    lucene/dev/branches/branch_4x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/dataimport.js
    lucene/dev/branches/branch_4x/solr/webapp/web/tpl/dataimport.html

Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1381520&r1=1381519&r2=1381520&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Thu Sep  6 08:26:58 2012
@@ -60,6 +60,8 @@ New Features
 * SOLR-3597: seems like a lot of wasted whitespace at the top of the admin screens
   (steffkes)
 
+* SOLR-3668: DataImport : Specifying Custom Parameters (steffkes)
+
 Optimizations
 ----------------------
 

Modified: lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/dataimport.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/dataimport.js?rev=1381520&r1=1381519&r2=1381520&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/dataimport.js (original)
+++ lucene/dev/branches/branch_4x/solr/webapp/web/js/scripts/dataimport.js Thu Sep  6 08:26:58 2012
@@ -531,7 +531,12 @@ sammy.get
                 var custom_parameters = $( '#custom_parameters', form ).val();
                 if( custom_parameters.length )
                 {
-                  array.push( { name : 'custom_parameters', value: custom_parameters } );
+                  var params = custom_parameters.split( '&' );
+                  for( var i in params )
+                  {
+                    var tmp = params[i].split( '=' );
+                    array.push( { name : tmp[0], value: tmp[1] } );
+                  }
                 }
               },
               success : function( response, text_status, xhr )

Modified: lucene/dev/branches/branch_4x/solr/webapp/web/tpl/dataimport.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/webapp/web/tpl/dataimport.html?rev=1381520&r1=1381519&r2=1381520&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/webapp/web/tpl/dataimport.html (original)
+++ lucene/dev/branches/branch_4x/solr/webapp/web/tpl/dataimport.html Thu Sep  6 08:26:58 2012
@@ -112,7 +112,7 @@ limitations under the License.
       <label for="custom_parameters">
         <a rel="help">Custom Parameters</a>
       </label>
-      <input type="text" id="custom_parameters" value="">
+      <input type="text" id="custom_parameters" value="" placeholder="key1=val1&amp;key2=val2">
 
       <button type="submit">Execute Import</button>