Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 123881d42 -> 1847ef8d2


hasDataSize() method added to Databases.Status


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

Branch: refs/heads/master
Commit: 1847ef8d288aa49fdd2477056b3f1f6d9fa9beac
Parents: 123881d
Author: Ben Keen <[email protected]>
Authored: Tue Apr 14 15:43:12 2015 -0700
Committer: Ben Keen <[email protected]>
Committed: Thu Apr 16 10:49:58 2015 -0700

----------------------------------------------------------------------
 app/addons/databases/resources.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/1847ef8d/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js 
b/app/addons/databases/resources.js
index 58b265f..882f89d 100644
--- a/app/addons/databases/resources.js
+++ b/app/addons/databases/resources.js
@@ -158,6 +158,12 @@ function (app, FauxtonAPI, Documents) {
       } else {
         return 0;
       }
+    },
+
+    // a sure-fire way to know when the DB size info is actually available; 
dataSize() may return 0 before or after
+    // the data has been loaded
+    hasDataSize: function () {
+      return this.get('other') || this.get('data_size') || 
this.get('disk_size');
     }
   });
 

Reply via email to