couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [08/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Date Thu, 05 Sep 2013 17:34:51 GMT
Fauxton: Factor disk size to own method


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

Branch: refs/heads/1807-Replication
Commit: 64ac2d60f6788a8e39a45f5ca69761a1b8677684
Parents: e41edf5
Author: Garren Smith <garren.smith@gmail.com>
Authored: Tue Aug 27 16:08:53 2013 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue Aug 27 16:08:53 2013 +0200

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js                       | 1 +
 src/fauxton/app/modules/databases/resources.js | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/64ac2d60/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index a548a9d..29a70ba 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -245,6 +245,7 @@ module.exports = function(grunt) {
       },
       options: {
         nospawn: true,
+        debounceDelay: 500
       }
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/64ac2d60/src/fauxton/app/modules/databases/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/resources.js b/src/fauxton/app/modules/databases/resources.js
index 04e6c1e..e019bdd 100644
--- a/src/fauxton/app/modules/databases/resources.js
+++ b/src/fauxton/app/modules/databases/resources.js
@@ -115,13 +115,17 @@ function(app, FauxtonAPI, Documents) {
       // cribbed from http://stackoverflow.com/questions/10420352/converting-file-size-in-bytes-to-human-readable
       var i = -1;
       var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
-      var fileSizeInBytes = this.get("disk_size");
+      var fileSizeInBytes = this.diskSize();
       do {
           fileSizeInBytes = fileSizeInBytes / 1024;
           i++;
       } while (fileSizeInBytes > 1024);
 
       return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];
+    },
+
+    diskSize: function () {
+      return this.get("disk_size");
     }
   });
 


Mime
View raw message