couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [09/12] couchdb commit: updated refs/heads/2128-autocomplete-section-name to 6e93561
Date Thu, 06 Mar 2014 21:32:16 GMT
Fauxton: Fix status messages in Active Tasks

Show Progress, current Sequence and Changes. Fix the display
of `undefined` if value is undefined.

Fixes #COUCHDB-2123


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/abe96eb2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/abe96eb2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/abe96eb2

Branch: refs/heads/2128-autocomplete-section-name
Commit: abe96eb2c8f2a6fc2d8c6aec91af0676854ea598
Parents: 18cf47a
Author: Robert Kowalski <rok@kowalski.gd>
Authored: Wed Mar 5 21:33:25 2014 +0100
Committer: suelockwood <deathbear@apache.org>
Committed: Thu Mar 6 10:19:18 2014 -0500

----------------------------------------------------------------------
 src/fauxton/app/addons/activetasks/views.js | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/abe96eb2/src/fauxton/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/views.js b/src/fauxton/app/addons/activetasks/views.js
index 2b2effc..8a305f1 100644
--- a/src/fauxton/app/addons/activetasks/views.js
+++ b/src/fauxton/app/addons/activetasks/views.js
@@ -165,10 +165,20 @@ function (app, FauxtonAPI, activetasks) {
         progress = "Processed " +this.model.get('changes_done')+ " of "+this.model.get('total_changes')+
' changes.';
       } else if (this.type === "replication"){
         progress = this.model.get('docs_written')+ " docs written. ";
-        if (this.model.get('changes_pending') !== null) { 
-          progress += this.model.get('changes_pending')+' pending changes.';
+        if (this.model.get('changes_pending') !== undefined) {
+          progress += this.model.get('changes_pending') + ' pending changes. ';
         }
       }
+      if (this.model.get('source_seq') !== undefined) {
+        progress += "Current source sequence: " + this.model.get('source_seq') + ". "
+      }
+      if (this.model.get('changes_done') !== undefined) {
+        progress += this.model.get('changes_done') + " Changes done. "
+      }
+      if (this.model.get('progress') !== undefined) {
+        progress += "Progress: " + this.model.get('progress') + "% "
+      }
+
       return progress;
     },
     serialize: function(){


Mime
View raw message