This is an automated email from the ASF dual-hosted git repository.

tn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 59229a1  correctly access committer info, add hover effect for cards
59229a1 is described below

commit 59229a1a3cae6544f4da381a5f553b7718ba6cb9
Author: Thomas Neidhart <[email protected]>
AuthorDate: Mon Mar 17 11:22:09 2025 +0100

    correctly access committer info, add hover effect for cards
---
 atr/blueprints/admin/admin.py        | 13 ++++++++-----
 atr/static/css/atr.css               |  4 ++++
 atr/templates/project-directory.html |  2 +-
 atr/templates/project-view.html      |  2 +-
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/atr/blueprints/admin/admin.py b/atr/blueprints/admin/admin.py
index 5e01f73..0556e7c 100644
--- a/atr/blueprints/admin/admin.py
+++ b/atr/blueprints/admin/admin.py
@@ -186,6 +186,7 @@ async def admin_projects_update() -> str | 
response.Response | tuple[Mapping[str
 
 async def _update_committees() -> int:
     ldap_projects = await apache.get_ldap_projects_data()
+    projects = await apache.get_projects_data()
     podlings_data = await apache.get_current_podlings_data()
     groups_data = await apache.get_groups_data()
 
@@ -206,13 +207,15 @@ async def _update_committees() -> int:
                     committee = models.Committee(name=name)
                     data.add(committee)
                     committee_core_project = models.Project(name=name, 
committee=committee)
+
+                    project_status = projects.get(name)
+                    if project_status is not None:
+                        committee_core_project.full_name = project_status.name
+
                     data.add(committee_core_project)
 
-                # Update PMC data from groups.json
-                pmc_members = groups_data.get(f"{name}-pmc")
-                committers = groups_data.get(name)
-                committee.committee_members = pmc_members if pmc_members is 
not None else []
-                committee.committers = committers if committers is not None 
else []
+                committee.committee_members = project.owners
+                committee.committers = project.members
                 # Ensure this is set for PMCs
                 committee.is_podling = False
 
diff --git a/atr/static/css/atr.css b/atr/static/css/atr.css
index 6288cb3..b5e1d9c 100644
--- a/atr/static/css/atr.css
+++ b/atr/static/css/atr.css
@@ -365,3 +365,7 @@ span.warning {
     margin: 0 0 2rem;
     border-radius: 4px;
 }
+
+.card:hover {
+    border-color: gray;
+}
diff --git a/atr/templates/project-directory.html 
b/atr/templates/project-directory.html
index cd134dc..27deff8 100644
--- a/atr/templates/project-directory.html
+++ b/atr/templates/project-directory.html
@@ -39,7 +39,7 @@
                 <div class="card h-100 bg-light border-0">
                   <div class="card-body p-2 d-flex flex-column 
justify-content-between text-center">
                     <small class="text-secondary">Committers</small>
-                    <span class="fs-4 fw-medium mt-2">{{ 
project.committers|length }}</span>
+                    <span class="fs-4 fw-medium mt-2">{{ 
project.committee.committers|length }}</span>
                   </div>
                 </div>
               </div>
diff --git a/atr/templates/project-view.html b/atr/templates/project-view.html
index d773aea..3b0a5d0 100644
--- a/atr/templates/project-view.html
+++ b/atr/templates/project-view.html
@@ -19,7 +19,7 @@
       <div class="d-flex flex-wrap gap-3 small mb-1">
         <span>Committee members: {{ project.committee.committee_members|length 
}}</span>
         <span class="d-flex align-items-center">
-          <span>Committers: {{ project.committers|length }}</span>
+          <span>Committers: {{ project.committee.committers|length }}</span>
         </span>
       </div>
     </div>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to