You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/01/10 21:29:54 UTC
[whimsy] branch master updated: Wire in the non-PMC code
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 932046a Wire in the non-PMC code
932046a is described below
commit 932046a34d06402ec7b6f0c4cb2ea5f8c7cb9d7b
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jan 10 21:29:53 2019 +0000
Wire in the non-PMC code
---
www/roster/main.rb | 24 ++++++++++++++++++++++++
www/roster/models.rb | 1 +
www/roster/models/committee.rb | 1 +
www/roster/views/app.js.rb | 6 ++++++
www/roster/views/committees.html.rb | 2 +-
www/roster/views/index.html.rb | 12 ++++++++++++
6 files changed, 45 insertions(+), 1 deletion(-)
diff --git a/www/roster/main.rb b/www/roster/main.rb
index 8e7e587..42b6e56 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -41,6 +41,7 @@ get '/' do
if env['REQUEST_URI'].end_with? '/'
@committers = ASF::Person.list
@committees = ASF::Committee.pmcs
+ @nonpmcs = ASF::Committee.nonpmcs
@members = ASF::Member.list.keys - ASF::Member.status.keys
@groups = Group.list
@podlings = ASF::Podling.to_h.values
@@ -68,6 +69,16 @@ get '/committee' do
redirect to('/committee/')
end
+get '/nonpmc/' do
+ @members = ASF::Member.list.keys
+ @nonpmcs = ASF::Committee.nonpmcs
+ _html :nonpmcs
+end
+
+get '/nonpmc' do
+ redirect to('/nonpmc/')
+end
+
index = nil
index_time = nil
index_etag = nil
@@ -114,6 +125,19 @@ get '/committee/:name' do |name|
_html :committee
end
+get '/nonpmc/:name.json' do |name|
+ data = NonPMC.serialize(name, env)
+ pass unless data
+ _json data
+end
+
+get '/nonpmc/:name' do |name|
+ @auth = Auth.info(env)
+ @nonpmc = NonPMC.serialize(name, env)
+ pass unless @nonpmc
+ _html :nonpmc
+end
+
get '/committer/:name.json' do |name|
data = Committer.serialize(name, env)
pass unless data
diff --git a/www/roster/models.rb b/www/roster/models.rb
index ee790f5..0239483 100644
--- a/www/roster/models.rb
+++ b/www/roster/models.rb
@@ -2,6 +2,7 @@ require_relative 'models/attic'
require_relative 'models/auth'
require_relative 'models/committer'
require_relative 'models/committee'
+require_relative 'models/nonpmc'
require_relative 'models/group'
require_relative 'models/orgchart'
require_relative 'models/ppmc'
diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index bc4adf4..52f60bf 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -3,6 +3,7 @@ class Committee
response = {}
pmc = ASF::Committee.find(id)
+# return if pmc.nonpmc? # Only show PMCs TODO later
members = pmc.owners
committers = pmc.committers
return if members.empty? and committers.empty?
diff --git a/www/roster/views/app.js.rb b/www/roster/views/app.js.rb
index 47950dd..2d1247c 100644
--- a/www/roster/views/app.js.rb
+++ b/www/roster/views/app.js.rb
@@ -10,6 +10,12 @@ require_relative 'pmc/committers'
require_relative 'pmc/add'
require_relative 'pmc/mod'
+require_relative 'nonpmc/main'
+require_relative 'nonpmc/nonpmc'
+require_relative 'nonpmc/committers'
+require_relative 'nonpmc/add'
+require_relative 'nonpmc/mod'
+
require_relative 'person'
require_relative 'person/fullname'
require_relative 'person/urls'
diff --git a/www/roster/views/committees.html.rb b/www/roster/views/committees.html.rb
index 7a925fc..9ec6bb7 100644
--- a/www/roster/views/committees.html.rb
+++ b/www/roster/views/committees.html.rb
@@ -6,7 +6,7 @@ _html do
_base href: '..'
_link rel: 'stylesheet', href: "stylesheets/app.css?#{cssmtime}"
_whimsy_body(
- title: 'ASF Committees Listing',
+ title: 'ASF PMC Listing',
breadcrumbs: {
roster: '.',
committee: 'committee/'
diff --git a/www/roster/views/index.html.rb b/www/roster/views/index.html.rb
index 9b7f421..5834de2 100644
--- a/www/roster/views/index.html.rb
+++ b/www/roster/views/index.html.rb
@@ -57,6 +57,18 @@ _html do
_td 'Active projects at the ASF'
end
+ _tr do
+ _td do
+ _a @nonpmcs.length, href: 'nonpmc/'
+ end
+
+ _td do
+ _a 'nonPMCs', href: 'nonpmc/'
+ end
+
+ _td 'ASF Committees (non-PMC)'
+ end
+
### Podlings
_tr do