aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-07-25 09:21:58 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-07-25 09:21:58 +0200
commited31a6c5af9edb81c4bd2646c74f2ed47f2c21d8 (patch)
tree528783f37775e6e3e8860574a599da928f02cec0 /source
parentAdded a function which returns the number of undeleted documents of the Whoos... (diff)
downloadnewspipe-ed31a6c5af9edb81c4bd2646c74f2ed47f2c21d8.tar.gz
newspipe-ed31a6c5af9edb81c4bd2646c74f2ed47f2c21d8.tar.bz2
newspipe-ed31a6c5af9edb81c4bd2646c74f2ed47f2c21d8.zip
The /management page dislays the number of indexed documents.
Diffstat (limited to 'source')
-rwxr-xr-xsource/pyAggr3g470r.py4
-rw-r--r--source/static/templates/management.html2
2 files changed, 4 insertions, 2 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 05ec7479..4a99ce2d 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -139,11 +139,13 @@ class pyAggr3g470r(object):
nb_favorites = self.mongo.nb_favorites()
nb_articles = format(self.mongo.nb_articles(), ",d")
nb_unread_articles = format(self.mongo.nb_unread_articles(), ",d")
+ nb_indexed_documents = format(search.nb_documents(), ",d")
tmpl = lookup.get_template("management.html")
return tmpl.render(feeds=feeds, nb_mail_notifications=nb_mail_notifications, \
nb_favorites=nb_favorites, nb_articles=nb_articles, \
nb_unread_articles=nb_unread_articles, \
- mail_notification_enabled=conf.MAIL_ENABLED)
+ mail_notification_enabled=conf.MAIL_ENABLED, \
+ nb_indexed_documents=nb_indexed_documents)
management.exposed = True
diff --git a/source/static/templates/management.html b/source/static/templates/management.html
index 313b2cfd..bbb98e27 100644
--- a/source/static/templates/management.html
+++ b/source/static/templates/management.html
@@ -64,7 +64,7 @@
<br />
<form method=get action="/index_base">
- <input type="submit" value="Index database" /> (faster searches)
+ <input type="submit" value="Index database" /> (${nb_indexed_documents} indexed documents)
</form>
bgstack15