diff --git a/frontends/etiquette_flask/backend/endpoints/admin_endpoints.py b/frontends/etiquette_flask/backend/endpoints/admin_endpoints.py index 02f15ad..66569ad 100644 --- a/frontends/etiquette_flask/backend/endpoints/admin_endpoints.py +++ b/frontends/etiquette_flask/backend/endpoints/admin_endpoints.py @@ -25,7 +25,14 @@ def get_admin(): 'tags': common.P.get_tag_count(), 'users': common.P.get_user_count(), }) - return common.render_template(request, 'admin.html', counts=counts) + cached = dotdict.DotDict({ + 'albums': len(common.P.caches[etiquette.objects.Album]), + 'bookmarks': len(common.P.caches[etiquette.objects.Bookmark]), + 'photos': len(common.P.caches[etiquette.objects.Photo]), + 'tags': len(common.P.caches[etiquette.objects.Tag]), + 'users': len(common.P.caches[etiquette.objects.User]), + }) + return common.render_template(request, 'admin.html', cached=cached, counts=counts) @site.route('/admin/dbdownload') def get_dbdump(): diff --git a/frontends/etiquette_flask/templates/admin.html b/frontends/etiquette_flask/templates/admin.html index 1616150..1a2ee55 100644 --- a/frontends/etiquette_flask/templates/admin.html +++ b/frontends/etiquette_flask/templates/admin.html @@ -14,6 +14,15 @@ @@ -30,11 +39,14 @@
{{counts.albums}} albums
-{{counts.bookmarks}} bookmarks
-{{counts.photos}} photos
-{{counts.tags}} tags
-{{counts.users}} users
+Stored | Cached | |
---|---|---|
Albums | {{counts.albums}} | {{cached.albums}} |
Bookmarks | {{counts.bookmarks}} | {{cached.bookmarks}} |
Photos | {{counts.photos}} | {{cached.photos}} |
Tags | {{counts.tags}} | {{cached.tags}} |
Users | {{counts.users}} | {{cached.users}} |