mirror of https://github.com/apache/lucene.git
SOLR-7568: Dataimport non-existence error lingers across new admin UI tabs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1680457 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
144b4e8f12
commit
bea194df80
|
@ -280,6 +280,9 @@ solrAdminApp.config([
|
||||||
};
|
};
|
||||||
|
|
||||||
var failed = function(rejection) {
|
var failed = function(rejection) {
|
||||||
|
if (rejection.config.params.doNotIntercept) {
|
||||||
|
return rejection;
|
||||||
|
}
|
||||||
activeRequests--;
|
activeRequests--;
|
||||||
if (activeRequests == 0) {
|
if (activeRequests == 0) {
|
||||||
$rootScope.$broadcast('loadingStatusInactive');
|
$rootScope.$broadcast('loadingStatusInactive');
|
||||||
|
|
|
@ -40,9 +40,14 @@ solrAdminApp.controller('DataImportController',
|
||||||
});
|
});
|
||||||
|
|
||||||
DataImport.config({core: $routeParams.core}, function (data) {
|
DataImport.config({core: $routeParams.core}, function (data) {
|
||||||
|
try {
|
||||||
|
var xml = $.parseXML(data.config);
|
||||||
|
} catch (err) {
|
||||||
|
$scope.hasHandlers = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
$scope.config = data.config;
|
$scope.config = data.config;
|
||||||
$scope.entities = [];
|
$scope.entities = [];
|
||||||
var xml = $.parseXML($scope.config);
|
|
||||||
$('document > entity', xml).each(function (i, element) {
|
$('document > entity', xml).each(function (i, element) {
|
||||||
$scope.entities.push($(element).attr('name'));
|
$scope.entities.push($(element).attr('name'));
|
||||||
});
|
});
|
||||||
|
@ -134,6 +139,10 @@ solrAdminApp.controller('DataImportController',
|
||||||
|
|
||||||
$scope.isStatusLoading = true;
|
$scope.isStatusLoading = true;
|
||||||
DataImport.status({core: $routeParams.core}, function (data) {
|
DataImport.status({core: $routeParams.core}, function (data) {
|
||||||
|
if (data[0] == "<") {
|
||||||
|
$scope.hasHandlers = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
$scope.lastUpdate = now.toTimeString().split(' ').shift();
|
$scope.lastUpdate = now.toTimeString().split(' ').shift();
|
||||||
|
|
|
@ -133,10 +133,12 @@ solrAdminServices.factory('System',
|
||||||
.factory('DataImport',
|
.factory('DataImport',
|
||||||
['$resource', function($resource) {
|
['$resource', function($resource) {
|
||||||
return $resource('/solr/:core/dataimport', {core: '@core', indent:'on', wt:'json', _:Date.now()}, {
|
return $resource('/solr/:core/dataimport', {core: '@core', indent:'on', wt:'json', _:Date.now()}, {
|
||||||
"config": {params: {command: "show-config"}, transformResponse: function(data) {
|
"config": {params: {command: "show-config", doNotIntercept: "true"},
|
||||||
|
transformResponse: function(data) {
|
||||||
return {config: data};
|
return {config: data};
|
||||||
}},
|
}
|
||||||
"status": {params: {command: "status"}},
|
},
|
||||||
|
"status": {params: {command: "status", doNotIntercept: "true"}},
|
||||||
"reload": {params: {command: "reload-config"}},
|
"reload": {params: {command: "reload-config"}},
|
||||||
"post": {method: "POST",
|
"post": {method: "POST",
|
||||||
headers: {'Content-type': 'application/x-www-form-urlencoded'},
|
headers: {'Content-type': 'application/x-www-form-urlencoded'},
|
||||||
|
|
Loading…
Reference in New Issue