diff --git a/changedetectionio/blueprint/tags/__init__.py b/changedetectionio/blueprint/tags/__init__.py index ba20cb4a..7a49822b 100644 --- a/changedetectionio/blueprint/tags/__init__.py +++ b/changedetectionio/blueprint/tags/__init__.py @@ -12,9 +12,15 @@ def construct_blueprint(datastore: ChangeDetectionStore): from .form import SingleTag add_form = SingleTag(request.form) sorted_tags = sorted(datastore.data['settings']['application'].get('tags').items(), key=lambda x: x[1]['title']) + + from collections import Counter + + tag_count = Counter(tag for watch in datastore.data['watching'].values() if watch.get('tags') for tag in watch['tags']) + output = render_template("groups-overview.html", - form=add_form, available_tags=sorted_tags, + form=add_form, + tag_count=tag_count ) return output diff --git a/changedetectionio/blueprint/tags/templates/groups-overview.html b/changedetectionio/blueprint/tags/templates/groups-overview.html index 7d942f43..23eca0a6 100644 --- a/changedetectionio/blueprint/tags/templates/groups-overview.html +++ b/changedetectionio/blueprint/tags/templates/groups-overview.html @@ -27,6 +27,7 @@ + # Watches Tag / Label name @@ -45,7 +46,8 @@ Mute notifications - {{tag.title}} + {{ "{:,}".format(tag_count[uuid]) if uuid in tag_count else 0 }} + {{ tag.title }} Edit  Delete