Commit feb68845ad47af48cca59f568a00bbbbfaf625bf:
add podlings
Branch: refs/heads/master
Author: Sam Ruby <[email protected]>
Committer: Sam Ruby <[email protected]>
Pusher: rubys <[email protected]>
------------------------------------------------------------
www/roster/main.rb | +++++++++
www/roster/views/index.html.rb | +++++++++++++++
www/roster/views/members.html.rb | + -
www/roster/views/podlings.html.rb | ++++++++++
------------------------------------------------------------
99 changes: 98 additions, 1 deletions.
------------------------------------------------------------
diff --git a/www/roster/main.rb b/www/roster/main.rb
index 6eb4dcb..dec065e 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -5,6 +5,7 @@
#
require 'whimsy/asf'
+require 'whimsy/asf/podlings'
require 'wunderbar/sinatra'
require 'wunderbar/bootstrap/theme'
@@ -21,6 +22,7 @@
@committers = ASF::Person.list
@committees = ASF::Committee.list
@members = ASF::Member.list.keys - ASF::Member.status.keys
+ @podlings = ASF::Podlings.new.to_h.values
_html :index
end
@@ -101,6 +103,13 @@
_json Hash[ASF.members.map {|person| [person.id, person.public_name]}.sort]
end
+# member list
+get '/podlings' do
+ @podlings = ASF::Podlings.new.to_a.map {|id, hash| hash.merge id: id}
+
+ _html :podlings
+end
+
# posted actions
post '/actions/:file' do
_json :"actions/#{params[:file]}"
diff --git a/www/roster/views/index.html.rb b/www/roster/views/index.html.rb
index 2a8b308..fbaebc3 100644
--- a/www/roster/views/index.html.rb
+++ b/www/roster/views/index.html.rb
@@ -56,5 +56,20 @@
_td 'Active projects at the ASF'
end
+ ### Podlings
+
+ _tr do
+ _td do
+ _a @podlings.select {|podling| podling[:status] == 'current'}.length,
+ href: 'podlings'
+ end
+
+ _td do
+ _a 'Podlings', href: 'podlings'
+ end
+
+ _td 'Active podlings at the ASF'
+ end
+
end
end
diff --git a/www/roster/views/members.html.rb b/www/roster/views/members.html.rb
index 295cb23..8f54b7f 100644
--- a/www/roster/views/members.html.rb
+++ b/www/roster/views/members.html.rb
@@ -1,5 +1,5 @@
#
-# A single committer
+# ASF Member List
#
_html do
diff --git a/www/roster/views/podlings.html.rb
b/www/roster/views/podlings.html.rb
new file mode 100644
index 0000000..0e3a6a4
--- /dev/null
+++ b/www/roster/views/podlings.html.rb
@@ -0,0 +1,73 @@
+#
+# List of all Podings
+#
+
+_html do
+ _title 'ASF Podling list'
+ _link rel: 'stylesheet', href: 'stylesheets/app.css'
+
+ _banner breadcrumbs: {
+ roster: '.',
+ podlings: 'podlings'
+ }
+
+ members = ASF::Member.list.dup
+
+ # ********************************************************************
+ # * Summary *
+ # ********************************************************************
+
+ _h1_ 'Summary'
+
+ _table.counts do
+ @podlings.group_by {|podling| podling[:status]}.sort.each do |status, list|
+ _tr do
+ _td list.count
+ _td do
+ _a status, href: "http://incubator.apache.org/projects/##{status}"
+ end
+ end
+ end
+ end
+
+ # ********************************************************************
+ # * Complete list *
+ # ********************************************************************
+
+ color = {
+ 'current' => 'bg-info',
+ 'graduated' => 'bg-success',
+ 'retired' => 'bg-warning'
+ }
+
+ _h1_ 'Podlings'
+
+ _table.table.table_hover do
+ _thead do
+ _tr do
+ _th.sorting_asc 'name', data_sort: 'string-ins'
+ _th 'description', data_sort: 'string'
+ _th 'status', data_sort: 'string'
+ end
+ end
+
+ _tbody do
+ @podlings.sort_by {|podling| podling[:name].downcase}.each do |podling|
+ _tr_ class: color[podling[:status]] do
+ _td do
+ _a podling[:name], href:
+ "http://incubator.apache.org/projects/#{podling[:id]}.html"
+ end
+
+ _td podling[:description]
+ _td podling[:status]
+ end
+ end
+ end
+ end
+
+
+ _script %{
+ $(".table").stupidtable();
+ }
+end