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

This commit is contained in:
Alexandre Rafalovitch 2016-08-10 21:26:50 +10:00
parent 3816a0eb2b
commit dd03d39dd6
3 changed files with 20 additions and 8 deletions

View File

@ -190,6 +190,8 @@ Bug Fixes
* SOLR-8379: UI Cloud->Tree view now shows .txt files correctly (Alexandre Rafalovitch via janhoy) * 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-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) * SOLR-9179: NPE in IndexSchema using IBM JDK (noble, Colvin Cowie)

View File

@ -61,6 +61,10 @@ solrAdminApp.controller('DataImportController',
$scope.toggleDebug = function () { $scope.toggleDebug = function () {
$scope.isDebugMode = !$scope.isDebugMode; $scope.isDebugMode = !$scope.isDebugMode;
if ($scope.isDebugMode) {
// also enable Debug checkbox
$scope.form.showDebug = true;
}
$scope.showConfiguration = true; $scope.showConfiguration = true;
} }
@ -100,7 +104,13 @@ solrAdminApp.controller('DataImportController',
$scope.submit = function () { $scope.submit = function () {
var params = {}; var params = {};
for (var key in $scope.form) { 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) { if (params.custom.length) {
var customParams = $scope.form.custom.split("&"); var customParams = $scope.form.custom.split("&");
@ -111,10 +121,10 @@ solrAdminApp.controller('DataImportController',
} }
delete params.custom; delete params.custom;
if (params.isDebugMode) { if ($scope.isDebugMode) {
params.dataConfig = $scope.rawConfig; params.dataConfig = $scope.config;
} }
delete params.showDebug;
params.core = $routeParams.core; params.core = $routeParams.core;
DataImport.post(params, function (data) { DataImport.post(params, function (data) {

View File

@ -94,7 +94,7 @@ limitations under the License.
<div class="editable" ng-show="isDebugMode"> <div class="editable" ng-show="isDebugMode">
<textarea>{{config}}</textarea> <textarea ng-model="config"></textarea>
</div> </div>
@ -115,11 +115,11 @@ limitations under the License.
</div> </div>
<div class="content" ng-show="showRawDebug"> <div class="content" ng-show="showRawDebug">
<span ng-show="true"> <span ng-hide="rawResponse">
<em>No Request executed</em> <em>No Request executed</em>
</span> </span>
<span ng-show="false"> <span ng-show="rawResponse">
<pre class="syntax language-json"><code ng-bind-html="rawResponse | highlight:'xml' | unsafe"></code></pre> <pre class="syntax language-json"><code ng-bind-html="rawResponse | highlight:'json' | unsafe"></code></pre>
</span> </span>
</div> </div>