whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: add a search for memberless PMCs
Date Thu, 09 Jun 2016 01:38:40 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  37a9a41   add a search for memberless PMCs
37a9a41 is described below

commit 37a9a412d692b4666deae2970fb00bff94335378
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Wed Jun 8 21:38:10 2016 -0400

    add a search for memberless PMCs
---
 www/members/memberless-pmcs.cgi | 63 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/www/members/memberless-pmcs.cgi b/www/members/memberless-pmcs.cgi
new file mode 100755
index 0000000..885653b
--- /dev/null
+++ b/www/members/memberless-pmcs.cgi
@@ -0,0 +1,63 @@
+#!/usr/bin/ruby
+
+#
+# Provide a report on PMCs with a given number of ASF members
+#
+
+require 'whimsy/asf'
+require 'wunderbar/bootstrap'
+
+members = ASF::Member.list.keys
+committees = ASF::Committee.load_committee_info
+
+_html do
+  count = (@count || 1).to_i
+
+  if count == 1
+    title = 'PMCs without any ASF members'
+  else
+    title = "PMCs without at least #{count} ASF members"
+  end
+
+  _title title
+
+  _style %{
+    img.logo {
+      width: 160px;
+      margin-left: 10px;
+    }
+  }
+
+  # banner
+  _a href: 'https://whimsy.apache.org/' do
+    _img title: "ASF Logo", alt: "ASF Logo",
+      src: "https://www.apache.org/img/asf_logo.png"
+  end
+  _img.logo src: '../../whimsy.svg'
+
+  _h1_ title
+
+  _table_.table.table_striped do
+    _thead_ do
+      _tr do
+        _th 'PMC'
+        _th 'Established'
+        _th 'Count' if count > 1
+      end
+    end
+
+    _tbody do
+      committees.sort_by {|pmc| pmc.display_name.downcase}.each do |pmc|
+        next if pmc.roster.keys.empty? # EA, Marketing, etc.
+        next unless (pmc.roster.keys & members).length < count
+        _tr_ do
+          _td! do
+            _a pmc.display_name, href: "../roster/committee/#{pmc.id}"
+          end
+          _td pmc.established
+          _td (pmc.roster.keys & members).length if count > 1
+        end
+      end
+    end
+  end
+end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message