Updated Branches: refs/heads/master 7ca5f5672 -> 428099c77
Fauxton: update dataSize Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/428099c7 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/428099c7 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/428099c7 Branch: refs/heads/master Commit: 428099c77df46c42a2e2fc52a1ee8ec02d24981b Parents: 7ca5f56 Author: Garren Smith <[email protected]> Authored: Wed Jan 29 18:28:44 2014 +0200 Committer: Garren Smith <[email protected]> Committed: Wed Jan 29 18:29:03 2014 +0200 ---------------------------------------------------------------------- src/fauxton/app/addons/databases/resources.js | 11 ++++++----- src/fauxton/app/addons/databases/views.js | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/428099c7/src/fauxton/app/addons/databases/resources.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/databases/resources.js b/src/fauxton/app/addons/databases/resources.js index 3510154..1b55f88 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; - } + } } }); http://git-wip-us.apache.org/repos/asf/couchdb/blob/428099c7/src/fauxton/app/addons/databases/views.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/databases/views.js b/src/fauxton/app/addons/databases/views.js index df663eb..56001db 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,
