whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Show apparently unused project groups
Date Tue, 02 Mar 2021 17:40:31 GMT
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 6cea3ad  Show apparently unused project groups
6cea3ad is described below

commit 6cea3adf534f301c972dff6fe0ac10f30ed5338a
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Mar 2 17:40:20 2021 +0000

    Show apparently unused project groups
---
 www/roster/main.rb             | 23 +++++++++++++
 www/roster/views/index.html.rb | 13 ++++++++
 www/roster/views/other.html.rb | 73 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+)

diff --git a/www/roster/main.rb b/www/roster/main.rb
index bbc7eda..60bd3b1 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -46,6 +46,10 @@ get '/' do
     @members = ASF::Member.list.keys - ASF::Member.status.keys # i.e. active member ids
     @groups = Group.list
     @podlings = ASF::Podling.to_h.values
+    @otherids = ASF::Project.list.map(&:name) -
+                @committees.map(&:name) -
+                @nonpmcs.map(&:name) -
+                ASF::Podling.currentids
     _html :index
   else
     redirect to('/')
@@ -72,6 +76,25 @@ get '/committee/:name' do |name|
   _html :committee
 end
 
+# Handle projects without apparent connections
+get '/other/' do
+  @otherids = ASF::Project.list.map(&:name) -
+                ASF::Committee.pmcs.map(&:name) -
+                ASF::Committee.nonpmcs.map(&:name) -
+                ASF::Podling.currentids
+  @atticids = ASF::Committee.load_committee_metadata[:tlps].filter_map {|k,v| k if v[:retired]}
+  @retiredids = ASF::Podling.retiredids
+  @podlingAliases = {}
+  @podlingURLs = {}
+  ASF::Podling.list.each do |podling|
+    podling.resourceAliases.each {|ra| @podlingAliases[ra] = podling.name}
+    if podling.graduated?
+      @podlingURLs[podling.name] = podling.resolutionURL if podling.resolutionURL
+    end
+  end
+  _html :other
+end
+
 # Handle individual committer (or member) records
 get '/committer/' do
   _html :committers
diff --git a/www/roster/views/index.html.rb b/www/roster/views/index.html.rb
index e7eb423..fba5d89 100644
--- a/www/roster/views/index.html.rb
+++ b/www/roster/views/index.html.rb
@@ -122,6 +122,19 @@ _html do
 
         end
 
+        # LDAP project groups without a PMC or active podling etc
+        _tr do
+          _td do
+            _a @otherids.length, href: 'other/'
+          end
+
+          _td do
+            _a 'Other', href: 'other/'
+          end
+
+          _td 'LDAP project groups with no apparent committee or podling'
+        end
+
         ### Groups
 
         _tr do
diff --git a/www/roster/views/other.html.rb b/www/roster/views/other.html.rb
new file mode 100644
index 0000000..22d43b4
--- /dev/null
+++ b/www/roster/views/other.html.rb
@@ -0,0 +1,73 @@
+#
+# List of apparently unused project groups
+#
+
+_html do
+  _base href: '..'
+  _link rel: 'stylesheet', href: "stylesheets/app.css?#{cssmtime}"
+  _whimsy_body(
+    title: 'LDAP projects without apparent active use',
+    breadcrumbs: {
+      roster: '.',
+      other: 'other/'
+    }
+  ) do
+    _p do
+      _ 'List of LDAP ou=project groups with no apparent active use.'
+      _ 'The list of LDAP projects is compared with:'
+      _ul do
+        _li 'Current PMCs'
+        _li 'ASF committees (non-PMCs)'
+        _li 'Current podlings'
+      end
+      _ 'Any that remain are then checked against:'
+      _ul do
+        _li 'Attic projects'
+        _li 'Retired podlings'
+        _li 'Podling aliases'
+        _li 'Podling graduated as part of another TLP'
+      end
+      _p 'None of the above normally have an LDAP project group'
+    end
+
+    _p @podlingURLs
+    _p 'Click on column names to sort.'
+
+    _table.table.table_hover do
+      _thead do
+        _tr do
+          _th.sorting_asc 'Name', data_sort: 'string-ins'
+          _th 'Description', data_sort: 'string'
+        end
+      end
+      _tbody do
+        @otherids.sort.each do |other|
+          _tr_ do
+            _td do
+              _a other
+            end
+
+            if @atticids.include? other
+              _td 'Attic'
+            elsif @retiredids.include? other
+              _td 'Retired Podling'
+            elsif @podlingAliases.include? other
+              _td "Podling alias for #{@podlingAliases[other]}"
+            elsif @podlingURLs.include? other
+              _td do
+                url = @podlingURLs[other]
+                _ "Podling graduated as"
+                _a url, href: url
+              end
+            else              
+              _td 'Unkown'
+            end
+          end
+        end
+      end
+    end
+  end
+  _script %{
+    $(".table").stupidtable();
+  }
+end


Mime
View raw message