You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ar...@apache.org on 2016/08/10 11:30:24 UTC

lucene-solr:master: SOLR-9003: DIH Debug now works in new Admin UI

Repository: lucene-solr
Updated Branches:
  refs/heads/master 3816a0eb2 -> dd03d39dd


SOLR-9003: DIH Debug now works in new Admin UI


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/dd03d39d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/dd03d39d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/dd03d39d

Branch: refs/heads/master
Commit: dd03d39dd6624a5d41325397ca246e01b12ec71d
Parents: 3816a0e
Author: Alexandre Rafalovitch <ar...@apache.org>
Authored: Wed Aug 10 21:26:50 2016 +1000
Committer: Alexandre Rafalovitch <ar...@apache.org>
Committed: Wed Aug 10 21:27:57 2016 +1000

----------------------------------------------------------------------
 solr/CHANGES.txt                                  |  2 ++
 .../web/js/angular/controllers/dataimport.js      | 18 ++++++++++++++----
 solr/webapp/web/partials/dataimport.html          |  8 ++++----
 3 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/dd03d39d/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6883457..3451a4f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -190,6 +190,8 @@ Bug Fixes
 
 * SOLR-8379: UI Cloud->Tree view now shows .txt files correctly (Alexandre Rafalovitch via janhoy)
 
+* SOLR-9003: New Admin UI's Dataimport screen now correctly displays DIH Debug output (Alexandre Rafalovitch)
+
 * SOLR-9308: Fix distributed RTG to forward request params, fixes fq and non-default fl params (hossman)
 
 * SOLR-9179: NPE in IndexSchema using IBM JDK (noble, Colvin Cowie)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/dd03d39d/solr/webapp/web/js/angular/controllers/dataimport.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/dataimport.js b/solr/webapp/web/js/angular/controllers/dataimport.js
index 9ca7239..a051ad2 100644
--- a/solr/webapp/web/js/angular/controllers/dataimport.js
+++ b/solr/webapp/web/js/angular/controllers/dataimport.js
@@ -61,6 +61,10 @@ solrAdminApp.controller('DataImportController',
 
         $scope.toggleDebug = function () {
             $scope.isDebugMode = !$scope.isDebugMode;
+            if ($scope.isDebugMode) {
+                // also enable Debug checkbox
+                $scope.form.showDebug = true;
+            }
             $scope.showConfiguration = true;
         }
 
@@ -100,7 +104,13 @@ solrAdminApp.controller('DataImportController',
         $scope.submit = function () {
             var params = {};
             for (var key in $scope.form) {
-                params[key] = $scope.form[key];
+                if (key == "showDebug") {
+                    if ($scope.form.showDebug) {
+                        params["debug"] = true;
+                    }
+                } else {
+                    params[key] = $scope.form[key];
+                }
             }
             if (params.custom.length) {
                 var customParams = $scope.form.custom.split("&");
@@ -111,10 +121,10 @@ solrAdminApp.controller('DataImportController',
             }
             delete params.custom;
 
-            if (params.isDebugMode) {
-                params.dataConfig = $scope.rawConfig;
+            if ($scope.isDebugMode) {
+                params.dataConfig = $scope.config;
             }
-            delete params.showDebug;
+
             params.core = $routeParams.core;
 
             DataImport.post(params, function (data) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/dd03d39d/solr/webapp/web/partials/dataimport.html
----------------------------------------------------------------------
diff --git a/solr/webapp/web/partials/dataimport.html b/solr/webapp/web/partials/dataimport.html
index 5fde597..5cd6d2c 100644
--- a/solr/webapp/web/partials/dataimport.html
+++ b/solr/webapp/web/partials/dataimport.html
@@ -94,7 +94,7 @@ limitations under the License.
 
           <div class="editable" ng-show="isDebugMode">
 
-            <textarea>{{config}}</textarea>
+            <textarea ng-model="config"></textarea>
           
           </div>
 
@@ -115,11 +115,11 @@ limitations under the License.
       </div>
 
       <div class="content" ng-show="showRawDebug">
-          <span ng-show="true">
+          <span ng-hide="rawResponse">
               <em>No Request executed</em>
           </span>
-          <span ng-show="false">
-            <pre class="syntax language-json"><code ng-bind-html="rawResponse | highlight:'xml' | unsafe"></code></pre>
+          <span ng-show="rawResponse">
+            <pre class="syntax language-json"><code ng-bind-html="rawResponse | highlight:'json' | unsafe"></code></pre>
           </span>
       </div>