couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to 5e64a1b
Date Tue, 10 May 2016 15:17:28 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master c4e670b33 -> 5e64a1bcc


Show total amount of databases on server

Closes COUCHDB-2105


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

Branch: refs/heads/master
Commit: 5e64a1bcc7d3237ecc4dc29b9999df8e13429e71
Parents: c4e670b
Author: Michael Wheeler <mpwheeler@gmail.com>
Authored: Thu Apr 28 14:43:20 2016 -0400
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue May 10 17:17:08 2016 +0200

----------------------------------------------------------------------
 app/addons/databases/components.react.jsx | 3 +++
 assets/less/fauxton.less                  | 1 +
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5e64a1bc/app/addons/databases/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/databases/components.react.jsx b/app/addons/databases/components.react.jsx
index 70b1804..395130c 100644
--- a/app/addons/databases/components.react.jsx
+++ b/app/addons/databases/components.react.jsx
@@ -383,12 +383,15 @@ define([
       var page = this.state.page;
       var total = this.props.total || this.state.databaseNames.length;
       var urlPrefix = '#/' + this.props.linkPath + '?page=';
+      var start = 1 + (page - 1) * FauxtonAPI.constants.MISC.DEFAULT_PAGE_SIZE;
+      var end = Math.min(total, page * FauxtonAPI.constants.MISC.DEFAULT_PAGE_SIZE);
 
       return (
         <footer className="all-db-footer pagination-footer">
           <div id="database-pagination">
             <FauxtonComponentsReact.Pagination page={page} total={total} urlPrefix={urlPrefix}
/>
           </div>
+          <div className="current-databases">Showing {start}&ndash;{end} of {total}
databases.</div>
         </footer>
       );
     }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5e64a1bc/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/assets/less/fauxton.less b/assets/less/fauxton.less
index ef6a79e..f6dae31 100644
--- a/assets/less/fauxton.less
+++ b/assets/less/fauxton.less
@@ -555,6 +555,7 @@ footer.pagination-footer {
 
   }
 
+  .current-databases,
   .current-docs {
     float: right;
     margin: 17px 20px 17px 20px;


Mime
View raw message