summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2014-01-29 18:28:44 +0200
committerGarren Smith <garren.smith@gmail.com>2014-01-29 18:29:03 +0200
commit428099c77df46c42a2e2fc52a1ee8ec02d24981b (patch)
treeb32dbf82edb3b48c5f87747ead1181d242b087fe
parent7ca5f56721e4228e0e0fe4f0f47efc0b7ef83ed0 (diff)
downloadcouchdb-428099c77df46c42a2e2fc52a1ee8ec02d24981b.tar.gz
Fauxton: update dataSize
-rw-r--r--src/fauxton/app/addons/databases/resources.js11
-rw-r--r--src/fauxton/app/addons/databases/views.js1
2 files changed, 7 insertions, 5 deletions
diff --git a/src/fauxton/app/addons/databases/resources.js b/src/fauxton/app/addons/databases/resources.js
index 35101547a..1b55f8885 100644
--- a/src/fauxton/app/addons/databases/resources.js
+++ b/src/fauxton/app/addons/databases/resources.js
@@ -151,16 +151,17 @@ function(app, FauxtonAPI, Documents) {
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];
},
- diskSize: function () {
- return this.get("disk_size");
- },
dataSize: function () {
if (this.get("other")){
return this.get("other").data_size;
- }else{
+ } else if (this.get('data_size')) {
+ return this.get('data_size');
+ } else if (this.get('disk_size')) {
+ return this.get('disk_size');
+ } else {
return 0;
- }
+ }
}
});
diff --git a/src/fauxton/app/addons/databases/views.js b/src/fauxton/app/addons/databases/views.js
index df663ebc2..56001dbac 100644
--- a/src/fauxton/app/addons/databases/views.js
+++ b/src/fauxton/app/addons/databases/views.js
@@ -28,6 +28,7 @@ function(app, Components, FauxtonAPI, Databases) {
return [this.model.fetch()];
},
serialize: function() {
+ console.log('db', this.model);
return {
encoded: app.utils.safeURLName(this.model.get("name")),
database: this.model,