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:51:58 UTC

lucene-solr:branch_6x: SOLR-9003: DIH Debug now works in new Admin UI This resolves #61

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 8a9aa6f1d -> e58c83f0a


SOLR-9003: DIH Debug now works in new Admin UI
This resolves #61


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

Branch: refs/heads/branch_6x
Commit: e58c83f0aba8832eabc786a3a8dadd89099c8f61
Parents: 8a9aa6f
Author: Alexandre Rafalovitch <ar...@apache.org>
Authored: Wed Aug 10 21:50:31 2016 +1000
Committer: Alexandre Rafalovitch <ar...@apache.org>
Committed: Wed Aug 10 21:50:31 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/e58c83f0/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6e9868c..ccbbea1 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -156,6 +156,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/e58c83f0/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/e58c83f0/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>