Milimetric has uploaded a new change for review.
https://gerrit.wikimedia.org/r/223793
Change subject: Add overall aggregate to project and language list
......................................................................
Add overall aggregate to project and language list
Bug: T95340
Change-Id: I29d83f4e9aaff6db33e12052ddcd82f6e5ee64e2
---
M scripts/admin
1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics
refs/changes/93/223793/1
diff --git a/scripts/admin b/scripts/admin
index 2d5a244..c7d7ef4 100755
--- a/scripts/admin
+++ b/scripts/admin
@@ -30,6 +30,7 @@
def get_wikis_we_care_about(limit_to=None):
"""
Queries site matrix and filters all wikis that aren't private
+ Also manually adds any aggregations that are known to exist
Parameters
limit_to : limit output to wikis found in this set (default all wikis)
@@ -109,6 +110,12 @@
}
if sites:
length = len(sites)
+
+ # manually add the overall aggregate
+ if name == 'All Languages':
+ sites['totals'] = 'all'
+ length = length + 1
+
languages.append({
'name': name,
'shortName': code,
@@ -134,6 +141,22 @@
'project': project
}
+ # manually add the overall aggregate
+ projects['totals'] = {
+ 'languages': {
+ 'All languages': 'all'
+ },
+ 'count': 1,
+ 'name': 'totals',
+ 'description': [
+ '1 language'
+ ]
+ }
+ reverse['all'] = {
+ 'language': 'All Languages',
+ 'project': 'totals'
+ }
+
return {
'languages': languages,
'projects': [v for k, v in projects.items()],
@@ -152,6 +175,7 @@
'wikiversity': 'Wikiversity',
'wikivoyage': 'Wikivoyage',
'wiktionary': 'Wiktionary',
+ 'totals': 'Totals',
},
}
--
To view, visit https://gerrit.wikimedia.org/r/223793
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29d83f4e9aaff6db33e12052ddcd82f6e5ee64e2
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits