You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/02/12 07:20:33 UTC
[39/52] [abbrv] fauxton commit: updated refs/heads/import-master to
d11b90b
Fauxton: update dataSize
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/b526f00e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/b526f00e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/b526f00e
Branch: refs/heads/import-master
Commit: b526f00ed2d87783596ed7c1605234b7f5dfa635
Parents: 895cf6d
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Jan 29 18:28:44 2014 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Jan 29 18:29:03 2014 +0200
----------------------------------------------------------------------
app/addons/databases/resources.js | 11 ++++++-----
app/addons/databases/views.js | 1 +
2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b526f00e/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js
index 3510154..1b55f88 100644
--- a/app/addons/databases/resources.js
+++ b/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-fauxton/blob/b526f00e/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/views.js b/app/addons/databases/views.js
index df663eb..56001db 100644
--- a/app/addons/databases/views.js
+++ b/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,