summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kowalski <rok@kowalski.gd>2014-03-05 21:33:25 +0100
committersuelockwood <deathbear@apache.org>2014-03-06 10:19:18 -0500
commitabe96eb2c8f2a6fc2d8c6aec91af0676854ea598 (patch)
treed421e0821e60ce3c58b2e36f9d9f47f48c933647
parent18cf47aa36285b6f9c0ecfe5248db2c9acefa588 (diff)
downloadcouchdb-abe96eb2c8f2a6fc2d8c6aec91af0676854ea598.tar.gz
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
-rw-r--r--src/fauxton/app/addons/activetasks/views.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fauxton/app/addons/activetasks/views.js b/src/fauxton/app/addons/activetasks/views.js
index 2b2effc97..8a305f108 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(){