couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [10/50] [abbrv] fauxton commit: updated refs/heads/import-master to b32c617
Date Tue, 01 Apr 2014 09:14:26 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-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/175c258c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/175c258c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/175c258c

Branch: refs/heads/import-master
Commit: 175c258c43b623253e2c5ce85bbbd8aa3771d8b8
Parents: f1e04a9
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

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


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/175c258c/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/views.js b/app/addons/activetasks/views.js
index 2b2effc..8a305f1 100644
--- a/app/addons/activetasks/views.js
+++ b/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