fix doc count calculation
This commit is contained in:
@@ -85,9 +85,7 @@
|
|||||||
<div id="right-panel">
|
<div id="right-panel">
|
||||||
<div id="tool-panel">
|
<div id="tool-panel">
|
||||||
<div id="summary-bar">
|
<div id="summary-bar">
|
||||||
<span>
|
<span id="docCount"></span>
|
||||||
{{doc_count}} documents
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="download">
|
<div id="download">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -149,10 +149,17 @@ var recline = function() {
|
|||||||
|
|
||||||
if( util.inURL("_rewrite", app.baseURL) ) app.dbInfo.db_name = "api";
|
if( util.inURL("_rewrite", app.baseURL) ) app.dbInfo.db_name = "api";
|
||||||
|
|
||||||
util.render('tableContainer', app.container, app.dbInfo);
|
util.render('tableContainer', app.container);
|
||||||
util.render('title', 'project-title', app.dbInfo);
|
util.render('title', 'project-title', app.dbInfo);
|
||||||
util.render( 'generating', 'project-actions' );
|
util.render( 'generating', 'project-actions' );
|
||||||
|
|
||||||
|
couch.request({url: app.baseURL + 'api/_all_docs?' + $.param({startkey: '"_design/"', endkey: '"_design0"'})}).then(
|
||||||
|
function ( data ) {
|
||||||
|
var ddocCount = data.rows.length;
|
||||||
|
$('#docCount').text(app.dbInfo.doc_count - ddocCount + " documents");
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
couch.session().then(function(session) {
|
couch.session().then(function(session) {
|
||||||
if ( session.userCtx.name ) {
|
if ( session.userCtx.name ) {
|
||||||
var text = "Sign out";
|
var text = "Sign out";
|
||||||
|
|||||||
Reference in New Issue
Block a user