From 37341ab1c8f3277550c09e7b2790cbeab4b88568 Mon Sep 17 00:00:00 2001
From: Upayavira
Date: Thu, 8 Oct 2015 09:31:24 +0000
Subject: [PATCH] SOLR-7666 Resolve exceptions and tidy HTML label name
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1707463 13f79535-47bb-0310-9956-ffa450edef68
---
.../web/js/angular/controllers/core-overview.js | 11 +++++------
solr/webapp/web/js/angular/services.js | 6 +++---
solr/webapp/web/partials/cores.html | 2 +-
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/solr/webapp/web/js/angular/controllers/core-overview.js b/solr/webapp/web/js/angular/controllers/core-overview.js
index a2c2b5753f9..710e6f24269 100644
--- a/solr/webapp/web/js/angular/controllers/core-overview.js
+++ b/solr/webapp/web/js/angular/controllers/core-overview.js
@@ -103,14 +103,13 @@ function($scope, $rootScope, $routeParams, Luke, CoreSystem, Update, Replication
$scope.refreshPing = function() {
Ping.status({core: $routeParams.core}, function(data) {
- $scope.healthcheckStatus = data.status == "enabled";
- }).$promise.catch(function(error) {
- if (error.status == 404) {
+ if (data.error) {
$scope.healthcheckStatus = false;
+ if (data.error.code == 503) {
+ $scope.healthcheckMessage = 'Ping request handler is not configured with a healthcheck file.';
+ }
} else {
- $scope.healthcheckStatus = false;
- delete $rootScope.exception;
- $scope.healthcheckMessage = 'Ping request handler is not configured with a healthcheck file.';
+ $scope.healthcheckStatus = data.status == "enabled";
}
});
};
diff --git a/solr/webapp/web/js/angular/services.js b/solr/webapp/web/js/angular/services.js
index 0db31d6dd2a..3030dd7ab67 100644
--- a/solr/webapp/web/js/angular/services.js
+++ b/solr/webapp/web/js/angular/services.js
@@ -136,7 +136,7 @@ solrAdminServices.factory('System',
.factory('Luke',
['$resource', function($resource) {
return $resource('/solr/:core/admin/luke', {core: '@core', wt:'json', _:Date.now()}, {
- "index": {params: {numTerms: 0}},
+ "index": {params: {numTerms: 0, show: 'index'}},
"schema": {params: {show:'schema'}},
"field": {},
"fields": {params: {show:'schema'}, interceptor: {
@@ -178,8 +178,8 @@ solrAdminServices.factory('System',
['$resource', function($resource) {
return $resource('/solr/:core/admin/ping', {wt:'json', core: '@core', ts:Date.now(), _:Date.now()}, {
"ping": {},
- "status": {params:{action:"status"}}
- });
+ "status": {params:{action:"status"}, headers: {doNotIntercept: "true"}
+ }});
}])
.factory('Mbeans',
['$resource', function($resource) {
diff --git a/solr/webapp/web/partials/cores.html b/solr/webapp/web/partials/cores.html
index a6bb5520346..7a989ba2eef 100644
--- a/solr/webapp/web/partials/cores.html
+++ b/solr/webapp/web/partials/cores.html
@@ -109,7 +109,7 @@ limitations under the License.
-