You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by up...@apache.org on 2015/10/08 11:31:24 UTC

svn commit: r1707463 - in /lucene/dev/trunk/solr/webapp/web: js/angular/controllers/core-overview.js js/angular/services.js partials/cores.html

Author: upayavira
Date: Thu Oct  8 09:31:24 2015
New Revision: 1707463

URL: http://svn.apache.org/viewvc?rev=1707463&view=rev
Log:
SOLR-7666 Resolve exceptions and tidy HTML label name

Modified:
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/core-overview.js
    lucene/dev/trunk/solr/webapp/web/js/angular/services.js
    lucene/dev/trunk/solr/webapp/web/partials/cores.html

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/controllers/core-overview.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/core-overview.js?rev=1707463&r1=1707462&r2=1707463&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/core-overview.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/core-overview.js Thu Oct  8 09:31:24 2015
@@ -103,14 +103,13 @@ function($scope, $rootScope, $routeParam
 
   $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";
       }
     });
   };

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/services.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/services.js?rev=1707463&r1=1707462&r2=1707463&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/services.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/services.js Thu Oct  8 09:31:24 2015
@@ -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) {

Modified: lucene/dev/trunk/solr/webapp/web/partials/cores.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/cores.html?rev=1707463&r1=1707462&r2=1707463&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/cores.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/cores.html Thu Oct  8 09:31:24 2015
@@ -109,7 +109,7 @@ limitations under the License.
           <input type="text" id="swap_core" name="core" ng-model="selectedCore" readonly="readonly"></p>
 
           <p class="clearfix"><label for="swap_other">and:</label>
-          <select name="other" ng-model="swapOther" ng-options="core.name as core.name for core in swapCorelist" class="other">
+          <select id="swap_other" ng-model="swapOther" ng-options="core.name as core.name for core in swapCorelist" class="other">
           </select></p>
 
           <p class="clearfix note error" ng-show="swapMessage">