[whimsy] branch master updated: Simplify front page and add officer's tool listing

2020-04-14 Thread curcuru
This is an automated email from the ASF dual-hosted git repository.

curcuru 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 59bbe3e  Simplify front page and add officer's tool listing
59bbe3e is described below

commit 59bbe3e137a8090a440a5097ce41832bd8215a5a
Author: Shane Curcuru 
AuthorDate: Tue Apr 14 17:48:17 2020 -0400

Simplify front page and add officer's tool listing
---
 www/index.html | 32 +-
 www/officers/index.cgi | 61 ++
 2 files changed, 66 insertions(+), 27 deletions(-)

diff --git a/www/index.html b/www/index.html
index ba69ee8..9526076 100644
--- a/www/index.html
+++ b/www/index.html
@@ -84,7 +84,7 @@
 Whimsy is a site where a set of unnecessary yet highly useful 
applications are deployed at Apache. 
   
 
-  The http://whimsical.apache.org/;>Apache Whimsy PMC 
manages this server, and maintains the tools here.
+  The https://whimsical.apache.org/;>Apache Whimsy PMC 
manages this server, and maintains the tools here.
  Our focus is on providing organizational information about the 
ASF and our projects
  in easy to consume ways, and to help automate corporate processes 
at the ASF to 
  make the paperwork behind the scenes easier for our many 
volunteers.
@@ -121,7 +121,7 @@
 https://people.apache.org/unlistedclas.html;>Persons with signed CLAs but 
who are not (yet) committers.
 https://www.apache.org/dev;>Apache Developer 
How-Tos
 https://community.apache.org/;>Apache Community 
How-Tos
-https://reference.apache.org/;>Apache Infra 
Reference Library
+https://infra.apache.org/;>Apache Infra Reference 
Library
   
 
   
@@ -161,17 +161,13 @@

   
 
-  Available to Members and Officers
+  Tools Restricted To Officers Or 
Members
 
 
   
 Board Agenda
-New Account Request
-ICLAs
-Mailing List Request
-Bill Upload
-PMC-chair vs board 
subscriptions
-Board mail traffic 
analysis
+Overview Of Useful Officer 
Tools
+Overview Of Useful Member Tools
   
 
   
@@ -179,24 +175,6 @@
   
   
 
-  
-
-  Available to Members
-
-
-  
-Member subscription 
cross-checks
-Member watch
-STV Explorer
-Proxy form (ASF members 
meeting)
-Security Mailing List 
Subscriptions
-Archiver Subscription Issues - 
ignoring missing mail-archive subs
-Archiver 
Subscription Issues - including missing mail-archive subs
-Archiver Subscription 
Checks (all entries)
-
-  
-
-
   
 
   Available to Secretarial Team
diff --git a/www/officers/index.cgi b/www/officers/index.cgi
new file mode 100755
index 000..bb052aa
--- /dev/null
+++ b/www/officers/index.cgi
@@ -0,0 +1,61 @@
+#!/usr/bin/env ruby
+PAGETITLE = "Overview of Whimsy Tools for Officers" # Wvisible:meeting
+
+$LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'json'
+require 'whimsy/asf'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+
+OFFICERS = {
+  '/board/agenda' => "Monthly Board Agenda Tool",
+  'acreq.cgi' => "New Account Request Helper",
+  'mlreq.cgi' => "New Mailing List Request Form",
+  '/committers/subscribe.cgi' => "Apache Mailing List 
Subscription/Unsubscription Tool",
+  '/board/subscriptions' => "PMC Chair board@ Subscription Crosscheck",
+  'list-traffic.cgi' => "Statistics About The board@ Mailing List",
+  'board-stats.cgi' => "Statistics About Board Meetings",
+  '/treasurer/bill-upload' => "Treasurer's Bill Upload Helper",
+  'http://treasurer.apache.org' => "Treasurer's Office Payment Processing 
Overview",
+  'https://www.apache.org/foundation/governance/orgchart' => "Apache Corporate 
Organization Chart"
+}
+
+_html do
+  _body? do
+_whimsy_body(
+  title: PAGETITLE,
+  subtitle: 'Officer and Member-restricted tools only',
+  relatedtitle: 'More Useful Links',
+  related: {
+"/committers/tools" => "Whimsy All Available Tools Listing",
+"https://svn.apache.org/repos/private/foundation/; => "Checkout the 
private 'foundation/officers' repo for Officers",
+
"https://github.com/apache/whimsy/blob/master/www#{ENV['SCRIPT_NAME']}" => "See 
This Source Code",
+"mailto:d...@whimsical.apache.org?subject=[FEEDBACK] members/index 
idea" => "Email Feedback 

[whimsy] branch master updated: Fail gracefully if cohorts not available

2020-04-14 Thread curcuru
This is an automated email from the ASF dual-hosted git repository.

curcuru 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 457faf4  Fail gracefully if cohorts not available
457faf4 is described below

commit 457faf4aa08368b57cd196cc9987e124efb6542a
Author: Shane Curcuru 
AuthorDate: Tue Apr 14 17:49:08 2020 -0400

Fail gracefully if cohorts not available
---
 www/members/list-traffic.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/list-traffic.cgi b/www/members/list-traffic.cgi
index f3b7a7f..561f1aa 100755
--- a/www/members/list-traffic.cgi
+++ b/www/members/list-traffic.cgi
@@ -180,7 +180,7 @@ _html do
 ) do
   months = Dir["#{SRV_MAIL}/*"].map {|path| 
File.basename(path).untaint}.grep(/^\d+$/)
   attendance = MeetingUtil.get_attendance(ASF::SVN['Meetings'])
-  style_cohorts(attendance)
+  style_cohorts(attendance) if attendance.has_key?('cohorts') # Allow to 
fail silently if data missing
   # if ENV['QUERY_STRING'].include? 'Clear-Cache-No-Really'
   #   _p do # Danger, Will Robinson!
   # _ 'Note: deleting cached .json files: '



[whimsy] branch master updated: add a txt format

2020-04-14 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

rubys 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 12e18c4  add a txt format
12e18c4 is described below

commit 12e18c4ce767b7d7d1a1dd5f4a5c613478f33565
Author: Sam Ruby 
AuthorDate: Tue Apr 14 10:58:48 2020 -0400

add a txt format
---
 www/board/calendar.cgi | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/www/board/calendar.cgi b/www/board/calendar.cgi
index 87593e1..f08a95a 100755
--- a/www/board/calendar.cgi
+++ b/www/board/calendar.cgi
@@ -19,6 +19,25 @@ zones = [
 
 prev = {}
 
+if CGI.new.params['format'] == ['txt']
+  _text do
+@time ||= '21:30'
+@zone ||= 'UTC'
+base = TZInfo::Timezone.get(@zone)
+rotate = (@rotate || 0).to_i
+
+calendar.scan(pattern).flatten.each_with_index do |date, index|
+  date = Date.parse(date)
+  next if date < Date.today
+  time = base.local_to_utc(Time.parse("#{date}T#{@time}"))
+  @time = (time + rotate.hour).strftime("%H:%M")
+  _ '' unless index == 0
+  _ time.strftime("*) %a, %d %B %Y, %H:%M UTC")
+end
+  end
+  exit
+end
+
 _html do
   @time ||= '21:30'
   @zone ||= 'UTC'



[whimsy] branch master updated: add time links

2020-04-14 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

rubys 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 cf2cb8a  add time links
cf2cb8a is described below

commit cf2cb8a7e3789c88201951c32350c9e187b24441
Author: Sam Ruby 
AuthorDate: Tue Apr 14 10:36:44 2020 -0400

add time links
---
 www/board/calendar.cgi | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www/board/calendar.cgi b/www/board/calendar.cgi
index 29a2803..87593e1 100755
--- a/www/board/calendar.cgi
+++ b/www/board/calendar.cgi
@@ -43,7 +43,7 @@ _html do
 _thead do
  _tr do
_th
-   _th 'UTC' if rotate != 0
+   _th 'UTC'
_th 'Los Angeles'
_th 'New York'
_th 'Brussels'
@@ -58,10 +58,14 @@ _html do
 
   time = base.local_to_utc(Time.parse("#{date}T#{@time}"))
   @time = (time + rotate.hour).strftime("%H:%M")
+  timeurl = 'https://www.timeanddate.com/worldclock/fixedtime.html?iso='
 
   _tr do
 _td date
-_td time.strftime('%H:%M') if rotate != 0
+_td do 
+  _a time.strftime('%H:%M'), href: "#{timeurl}#{time.iso8601}"
+end
+
 zones.each do |zone|
   if zone.to_s.include? 'Asia' or zone.to_s.include? 'Europe'
 local = time.in_time_zone(zone).strftime("%H:%M")



[whimsy] branch master updated: add rotate and am/pm

2020-04-14 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

rubys 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 f009ea4  add rotate and am/pm
f009ea4 is described below

commit f009ea444a6ba0678fc9f5b49caf7018758a5f7a
Author: Sam Ruby 
AuthorDate: Tue Apr 14 10:28:40 2020 -0400

add rotate and am/pm
---
 www/board/calendar.cgi | 29 -
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/www/board/calendar.cgi b/www/board/calendar.cgi
index a94cb69..29a2803 100755
--- a/www/board/calendar.cgi
+++ b/www/board/calendar.cgi
@@ -23,27 +23,31 @@ _html do
   @time ||= '21:30'
   @zone ||= 'UTC'
   base = TZInfo::Timezone.get(@zone)
+  rotate = (@rotate || 0).to_i
 
   _h2 'Proposed board meeting times'
 
   _p %{
 Future meeting times, presuming that the time of the meeting is
-set to #{@time} #{@zone}.
+set to #{@time} #{@zone}, rotating each meeting time by #{rotate} hours.
   }
   
-  _p.bg_danger %{
-This background color indicate a local time change from the previous
-month.
-  }
+  if rotate == 0
+_p.bg_danger %{
+  This background color indicate a local time change from the previous
+  month.
+}
+  end
   
   _table.table do
 _thead do
  _tr do
_th
+   _th 'UTC' if rotate != 0
_th 'Los Angeles'
_th 'New York'
_th 'Brussels'
-   _th 'Kuala Lumpur '
+   _th 'Kuala Lumpur'
_th 'Sydney'
  end
 end
@@ -52,13 +56,20 @@ _html do
   date = Date.parse(date)
   next if date < Date.today
 
-  time = base.local_to_utc(Time.parse("#{date}/#{@time}"))
+  time = base.local_to_utc(Time.parse("#{date}T#{@time}"))
+  @time = (time + rotate.hour).strftime("%H:%M")
 
   _tr do
 _td date
+_td time.strftime('%H:%M') if rotate != 0
 zones.each do |zone|
-  local = time.in_time_zone(zone).strftime("%H:%M")
-  if prev[zone] != local and prev[zone]
+  if zone.to_s.include? 'Asia' or zone.to_s.include? 'Europe'
+local = time.in_time_zone(zone).strftime("%H:%M")
+  else
+local = time.in_time_zone(zone).strftime("%-I:%M%P")
+  end
+
+  if prev[zone] != local and prev[zone] and rotate == 0
 _td.bg_danger local
   else
 _td local