You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/06/25 02:06:52 UTC

[30/47] lucene-solr:feature/autoscaling: SOLR-10763: Admin UI replication tab sometimes empty when failed replications

SOLR-10763: Admin UI replication tab sometimes empty when failed replications


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/69d0c706
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/69d0c706
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/69d0c706

Branch: refs/heads/feature/autoscaling
Commit: 69d0c7065162bcc69ef67e34167562ebd27d9b73
Parents: 4676410
Author: Jan Høydahl <ja...@apache.org>
Authored: Fri Jun 23 08:26:34 2017 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Fri Jun 23 08:26:34 2017 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                      | 2 ++
 solr/webapp/web/js/angular/controllers/replication.js | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/69d0c706/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a8cf4a3..6477ada 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -435,6 +435,8 @@ Bug Fixes
 
 * SOLR-10832: Fixed VersionInfo.getMaxVersionFromIndex when using PointsField with indexed="true" (hossman)
 
+* SOLR-10763: Admin UI replication tab sometimes empty when failed replications (janhoy, Bojan Vitnik)
+
 Optimizations
 ----------------------
 * SOLR-10634: JSON Facet API: When a field/terms facet will retrieve all buckets (i.e. limit:-1)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/69d0c706/solr/webapp/web/js/angular/controllers/replication.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/replication.js b/solr/webapp/web/js/angular/controllers/replication.js
index 830825d..9f7ac3e 100644
--- a/solr/webapp/web/js/angular/controllers/replication.js
+++ b/solr/webapp/web/js/angular/controllers/replication.js
@@ -105,13 +105,13 @@ var getIterations = function(slave) {
     for (var i in slave.replicationFailedAtList) {
         var failedDate = slave.replicationFailedAtList[i];
         var matchingIterations = find(iterations, failedDate);
-        if (matchingIterations) {
+        if (matchingIterations[0]) {
             iteration = matchingIterations[0];
+            iteration.status = "failed";
         } else {
-            iteration = {date: failedDate, latest:false};
+            iteration = {date: failedDate, status:"failed", latest:false};
             iterations.push(iteration);
         }
-        iteration.status = "failed";
         if (failedDate == slave.replicationFailedAt) {
             iteration.latest = true;
         }