This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 81a0508  Add summary counts
81a0508 is described below

commit 81a0508190be0fc148bf6b5c579ffcb057654517
Author: Sebb <[email protected]>
AuthorDate: Fri Sep 10 14:04:37 2021 +0100

    Add summary counts
---
 www/roster/public_ldap_committees.rb | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/www/roster/public_ldap_committees.rb 
b/www/roster/public_ldap_committees.rb
index e535bd9..7f7a0f2 100644
--- a/www/roster/public_ldap_committees.rb
+++ b/www/roster/public_ldap_committees.rb
@@ -9,9 +9,16 @@
 #
 # {
 #   "lastTimestamp": "20160119171152Z", // most recent modifyTimestamp
+#   "committee_count": 123,
+#   "roster_counts": {
+#     "accumulo": 40,
+#     "activemq": 25,
+#     ...
+#   },
 #   "committees": {
 #     "abdera": {
 #       "modifyTimestamp": "20111204095436Z",
+#       "roster_count": 123
 #       "roster": ["uid",
 #       ...
 #       ]
@@ -39,7 +46,7 @@ if projects.empty?
 end
 
 lastStamp = ''
-
+roster_counts = Hash.new(0)
 projects.keys.sort_by(&:name).each do |project|
   next unless pmcs.include? project.name
   m = []
@@ -52,13 +59,17 @@ projects.keys.sort_by(&:name).each do |project|
   entries[project.name] = {
     createTimestamp: createTimestamp,
     modifyTimestamp: modifyTimestamp,
+    roster_count: m.size,
     roster: m
   }
+  roster_counts[project.name] = m.size
 end
 
 info = {
   # Is there a use case for the last createTimestamp ?
   lastTimestamp: lastStamp,
+  committee_count: entries.size,
+  roster_counts: roster_counts,
   committees: entries,
 }
 

Reply via email to