Skip to content

Apache Lucene open-source search software

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

Alexandre Rafalovitchdd03d39dd662
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 68834576ad4..3451a4f96c5 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)
diff --git a/solr/webapp/web/js/angular/controllers/dataimport.js b/solr/webapp/web/js/angular/controllers/dataimport.js
index 9ca723985da..a051ad2178b 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) {
diff --git a/solr/webapp/web/partials/dataimport.html b/solr/webapp/web/partials/dataimport.html
index 5fde5975eaa..5cd6d2c3a0b 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>