whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject [whimsy] branch master updated: WHIMSY-98 - Adding more display information of the podling status on the whimsy roster.
Date Sat, 10 Jun 2017 12:33:07 GMT
This is an automated email from the ASF dual-hosted git repository.

johndament 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 c788193  WHIMSY-98 - Adding more display information of the podling status on the
whimsy roster.
c788193 is described below

commit c78819327400a1aacbe0968ecd3f609756dff7c8
Author: John D. Ament <johndament@apache.org>
AuthorDate: Sat Jun 10 08:23:21 2017 -0400

    WHIMSY-98 - Adding more display information of the podling status on the whimsy roster.
---
 lib/whimsy/asf/podlings.rb            | 75 +++++++++++++++++++++--------------
 tools/migrate_podlings.rb             |  2 +-
 www/roster/public/stylesheets/app.css |  2 +
 www/roster/views/ppmc/main.js.rb      | 55 +++++++++++++++++++++----
 4 files changed, 96 insertions(+), 38 deletions(-)

diff --git a/lib/whimsy/asf/podlings.rb b/lib/whimsy/asf/podlings.rb
index e4b64b4..0f219e2 100644
--- a/lib/whimsy/asf/podlings.rb
+++ b/lib/whimsy/asf/podlings.rb
@@ -11,9 +11,9 @@ module ASF
     # three consecutive months, starting with this one
     def quarter
       [
-        Date.today.strftime('%B'),
-        Date.today.next_month.strftime('%B'),
-        Date.today.next_month.next_month.strftime('%B')
+          Date.today.strftime('%B'),
+          Date.today.next_month.strftime('%B'),
+          Date.today.next_month.next_month.strftime('%B')
       ]
     end
 
@@ -29,7 +29,7 @@ module ASF
       @enddate = node['enddate']
       @startdate = node['startdate']
       @description = node.at('description').text
-      @mentors = node.search('mentor').map {|mentor| mentor['username']}
+      @mentors = node.search('mentor').map { |mentor| mentor['username'] }
       @champion = node.at('champion')['availid'] if node.at('champion')
 
       @reporting = node.at('reporting') if node.at('reporting')
@@ -120,7 +120,7 @@ module ASF
     end
 
     def self.current
-      list.select {|podling| podling.status == 'current'}
+      list.select { |podling| podling.status == 'current' }
     end
 
     def self.mtime
@@ -129,7 +129,7 @@ module ASF
 
     # find a podling by name
     def self.find(name)
-      list.find {|podling| podling.name == name}
+      list.find { |podling| podling.name == name }
     end
 
     # below is for backwards compatibility
@@ -146,7 +146,7 @@ module ASF
 
     # provide a list of podling names and descriptions
     def self.each(&block)
-      list.each {|podling| block.call podling.name, podling}
+      list.each { |podling| block.call podling.name, podling }
     end
 
     # allow attributes to be accessed as hash
@@ -167,18 +167,18 @@ module ASF
     # development mailing list associated with a given podling
     def dev_mail_list
       case name
-      when 'climatemodeldiagnosticanalyzer'
-        'dev@cmda.incubator.apache.org'
-      when 'odftoolkit'
-        'odf-dev@incubator.apache.org'
-      when 'log4cxx2'
-        'log4cxx-dev@logging.apache.org'
-      else
-        if ASF::Mail.lists.include? "#{name}-dev"
-          "dev@#{name}.apache.org" 
-        elsif ASF::Mail.lists.include? "incubator-#{name}-dev"
-          "#{name}-dev@incubator.apache.org" 
-        end
+        when 'climatemodeldiagnosticanalyzer'
+          'dev@cmda.incubator.apache.org'
+        when 'odftoolkit'
+          'odf-dev@incubator.apache.org'
+        when 'log4cxx2'
+          'log4cxx-dev@logging.apache.org'
+        else
+          if ASF::Mail.lists.include? "#{name}-dev"
+            "dev@#{name}.apache.org"
+          elsif ASF::Mail.lists.include? "incubator-#{name}-dev"
+            "#{name}-dev@incubator.apache.org"
+          end
       end
     end
 
@@ -196,7 +196,7 @@ module ASF
     def mail_list?(list)
       return true if _match_mailname?(list, name())
       # Also check aliases
-      @resourceAliases.each {|name|
+      @resourceAliases.each { |name|
         return true if _match_mailname?(list, name)
       }
       return false
@@ -214,7 +214,25 @@ module ASF
       incubator_content = ASF::SVN['asf/incubator/public/trunk/content']
       resource_yml = "#{incubator_content}/podlings/#{@resource}.yml"
       if File.exist?(resource_yml)
-        Psych.load_file(resource_yml)
+        rawYaml = Psych.load_file(resource_yml)
+        hash = { }
+        hash[:sga] = rawYaml[:sga].strftime('%Y-%m-%d') if rawYaml[:sga]
+        hash[:asfCopyright] = rawYaml[:asfCopyright].strftime('%Y-%m-%d') if rawYaml[:asfCopyright]
+        hash[:distributionRights] = rawYaml[:distributionRights].strftime('%Y-%m-%d') if
rawYaml[:distributionRights]
+        hash[:ipClearance] = rawYaml[:ipClearance]
+        hash[:sourceControl] = rawYaml[:sourceControl]
+        hash[:wiki] = rawYaml[:wiki]
+        hash[:jira] = rawYaml[:jira]
+        hash[:proposal] = rawYaml[:proposal]
+        hash[:website] = rawYaml[:website]
+        hash[:news] = []
+        for ni in rawYaml[:news]
+          newsItem = {}
+          newsItem[:date] = ni[:date].strftime('%Y-%m-%d')
+          newsItem[:note] = ni[:note]
+          hash[:news].push(newsItem)
+        end if  rawYaml[:news]
+        hash
       else
         nil
       end
@@ -223,11 +241,11 @@ module ASF
     # Return the instance as a hash
     def as_hash # might be confusing to use to_h here?
       hash = {
-        name: @name,
-        status: status,
-        description: description,
-        mentors: mentors,
-        startdate: startdate,
+          name: @name,
+          status: status,
+          description: description,
+          mentors: mentors,
+          startdate: startdate,
       }
       hash[:enddate] = enddate if enddate
       hash[:champion] = champion if champion
@@ -238,7 +256,7 @@ module ASF
       if r.instance_of? Nokogiri::XML::Element
         group = r['group']
         hash[:reporting] = {
-          group: group
+            group: group
         }
         hash[:reporting][:text] = r.text if r.text.length > 0
         hash[:reporting][:monthly] = r.text.split(/,\s*/) if r['monthly']
@@ -262,7 +280,6 @@ module ASF
     def default_status
       {
           issueTracker: 'jira',
-          dateAccepted: nil,
           wiki: self.resource.upcase,
           jira: self.resource.upcase,
           proposal: 'http://wiki.apache.org/incubator/'+self.resource.capitalize+"Proposal",
@@ -282,7 +299,7 @@ module ASF
       cache = "#{ASF::Config.get(:cache)}/pns.jira"
       if not File.exist?(cache) or File.mtime(cache) > Time.now - 300
         query = 'https://issues.apache.org/jira/rest/api/2/search?' +
-          'jql=project=PODLINGNAMESEARCH&fields=summary,resolution'
+            'jql=project=PODLINGNAMESEARCH&fields=summary,resolution'
         File.write cache, Net::HTTP.get(URI(query))
       end
 
diff --git a/tools/migrate_podlings.rb b/tools/migrate_podlings.rb
index fca1059..39295af 100644
--- a/tools/migrate_podlings.rb
+++ b/tools/migrate_podlings.rb
@@ -4,5 +4,5 @@ require 'yaml'
 incubator_content = ASF::SVN['asf/incubator/public/trunk/content']
 ASF::Podlings.list.select{ |p| p.status == 'current'}.each_entry{ |podling|
   pod_status_yml = "#{incubator_content}/podlings/#{podling.resource}.yml"
-  File.open(pod_status_yml, 'a') {|f| f.write(podling.default_status.to_yaml) }
+  File.open(pod_status_yml, 'w') {|f| f.write(podling.default_status.to_yaml) }
 }
\ No newline at end of file
diff --git a/www/roster/public/stylesheets/app.css b/www/roster/public/stylesheets/app.css
index 591f967..eb7075e 100644
--- a/www/roster/public/stylesheets/app.css
+++ b/www/roster/public/stylesheets/app.css
@@ -18,6 +18,8 @@ td, th {padding-left: 0.5em; padding-right: 0.5em}
 .chair {color: green; font-weight:bold} 
 .member {font-weight: bold}
 .editable td:first-child {color: blue}
+.podlingWarning{color: red; font-weight: bold}
+.podlingWarning > a{color: red; font-weight: bold}
 
 .status {font-weight: bold; float: left; color: green}
 
diff --git a/www/roster/views/ppmc/main.js.rb b/www/roster/views/ppmc/main.js.rb
index 1abfde6..4a96c8e 100644
--- a/www/roster/views/ppmc/main.js.rb
+++ b/www/roster/views/ppmc/main.js.rb
@@ -21,6 +21,7 @@ class PPMC < React
     end
 
     _p @ppmc.description
+    _a 'Podling Proposal', href: @ppmc.podlingStatus.proposal if @ppmc.podlingStatus.proposal
 
     # usage information for authenticated users (PMC chair, etc.)
     if @@auth.ppmc or @@auth.ipmc
@@ -52,7 +53,7 @@ class PPMC < React
 
     # mailing lists
     if @ppmc.moderators
-      _h2.mail! 'Mail list moderators'
+      _h2.mail! 'Mailing list moderators'
       _table do
         _thead do
           _tr do
@@ -73,7 +74,7 @@ class PPMC < React
         end
       end
     else
-      _h2.mail! 'Mail lists'
+      _h2.mail! 'Mailing lists'
       _ul do
         for mail_name in @ppmc.mail
           parsed = mail_name.match(/^(.*?)-(.*)/)
@@ -86,27 +87,65 @@ class PPMC < React
       end
     end
 
+    _h2.podlingStatus! 'Podling Status'
+
+    # infra styled resources
+    _h3 'Resources'
+    _ul do
+      _li do
+        _a "GitHub", href: 'https://github.com/apache?q=incubator-' + @ppmc.id
+      end if @ppmc.podlingStatus.sourceControl == 'github'
+      _li do
+        _a 'https://issues.apache.org/jira/browse/' + @ppmc.podlingStatus.jira,href: 'https://issues.apache.org/jira/browse/'
+ @ppmc.podlingStatus.jira
+      end if @ppmc.podlingStatus.jira
+      _li do
+        _a 'https://cwiki.apache.org/confluence/display/' + @ppmc.podlingStatus.wiki,href:
'https://cwiki.apache.org/confluence/display/' + @ppmc.podlingStatus.wiki
+      end if @ppmc.podlingStatus.wiki
+    end
+
+    _h3 'Licensing'
+    _ul do
+      _li do
+        _a 'IP Clearance Form: '+ @ppmc.podlingStatus.ipClearance, href: @ppmc.podlingStatus.ipClearance
+      end if @ppmc.podlingStatus.ipClearance
+      _li 'Software Grant Received on: '+@ppmc.podlingStatus.sga if @ppmc.podlingStatus.sga
+      _li.podlingWarning 'No Software Grant and No IP Clearance Filed' unless @ppmc.podlingStatus.sga
|| @ppmc.podlingStatus.ipClearance
+      _li 'Confirmation of ASF Copyright Headers on Source Code on: '+@ppmc.podlingStatus.asfCopyright
if @ppmc.podlingStatus.asfCopyright
+      _li.podlingWarning 'No Release Yet/Missing ASF Copyright Headers on Source Code' unless
@ppmc.podlingStatus.asfCopyright
+      _li 'Confirmation of Binary Distribution Licensing: '+@ppmc.podlingStatus.distributionRights
if @ppmc.podlingStatus.distributionRights
+      _li.podlingWarning 'No Release Yet/Binary has licensing issues' unless @ppmc.podlingStatus.distributionRights
+    end
+
     # reporting schedule
-    _h2.reporting! 'Reporting Schedule'
+    _h3.reporting! 'Reporting Schedule'
     _ul do
       _li @ppmc.schedule.join(', ')
       _li "Monthly: #{@ppmc.monthly.join (', ')}" if @ppmc.monthly and !@ppmc.monthly.empty?
       _li do
-        _a 'Prior Board Reports', href: 'https://whimsy.apache.org/board/minutes/' +
-          @ppmc.display_name.gsub(/\s+/, '_')
+        _a 'Prior Board Reports', href: '/board/minutes/' +
+            @ppmc.display_name.gsub(/\s+/, '_')
       end
     end
 
-    _h2.podlingStatus! 'Podling Status'
+    # website and naming
     _h3 'Naming'
     _ul do
       _li do
         _a "Podling name search (#{@ppmc.namesearch.resolution})", href: 'https://issues.apache.org/jira/browse/'
+ @ppmc.namesearch.issue
       end if @ppmc.namesearch
-      _li do
+      _li.podlingWarning do
         _a "No Podling Name Search on file", href: 'https://incubator.apache.org/guides/names.html#name-search'
-      end if !@ppmc.namesearch
+      end unless @ppmc.namesearch
+      _li do
+        _a @ppmc.display_name + ' Website', href: @ppmc.podlingStatus.website
+      end
     end
+    _h3 'News' unless @ppmc.podlingStatus.news.empty?
+    _ul do
+      @ppmc.podlingStatus.news.each { |ni|
+        _li ni.date + ' - ' + ni.note
+      }
+    end unless @ppmc.podlingStatus.news.empty?
 
     # Graduation resolution
     _PPMCGraduate ppmc: @ppmc, id: @@auth.id

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

Mime
View raw message