From 3290945f02a7c59818c99a00093dcbd819698b66 Mon Sep 17 00:00:00 2001 From: wicky <130177258+wicky-zipstack@users.noreply.github.com> Date: Fri, 1 May 2026 10:05:31 +0530 Subject: [PATCH] fix: project list job stats not showing + uniform card height + clickable links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix apps.is_installed("job_scheduler") returning False — use apps.get_app_config() instead (checks by label, not module path) - Add min-height to "No jobs" section for uniform card height - Make Scheduled/In Progress/Failed clickable — navigate to Jobs list or Run History page --- .../application/context/base_context.py | 7 +++++- .../project-list/ProjectListCard.css | 12 ++++++++++ .../project-list/ProjectListCard.jsx | 24 ++++++++++++++++--- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/backend/backend/application/context/base_context.py b/backend/backend/application/context/base_context.py index 564d3191..3b316d93 100644 --- a/backend/backend/application/context/base_context.py +++ b/backend/backend/application/context/base_context.py @@ -182,7 +182,12 @@ def get_project_lists( ) # Only annotate user_tasks if scheduler app is installed from django.apps import apps - if apps.is_installed("job_scheduler") and hasattr(ProjectDetails, "user_tasks"): + try: + apps.get_app_config("job_scheduler") + _scheduler_installed = True + except LookupError: + _scheduler_installed = False + if _scheduler_installed and hasattr(ProjectDetails, "user_tasks"): annotations["_total_scheduled_jobs"] = Count("user_tasks", distinct=True) annotations["_total_active_jobs"] = Count( "user_tasks__periodic_task", diff --git a/frontend/src/base/components/project-list/ProjectListCard.css b/frontend/src/base/components/project-list/ProjectListCard.css index 53577fd9..3f2d87af 100644 --- a/frontend/src/base/components/project-list/ProjectListCard.css +++ b/frontend/src/base/components/project-list/ProjectListCard.css @@ -222,6 +222,18 @@ font-size: 12px; color: var(--circle-color); opacity: 0.6; + min-height: 38px; + display: flex; + align-items: center; +} + +.project-list-card-job-link { + cursor: pointer; + transition: opacity 0.15s; +} + +.project-list-card-job-link:hover { + opacity: 0.7; } .project-list-card-status-icon.warning { diff --git a/frontend/src/base/components/project-list/ProjectListCard.jsx b/frontend/src/base/components/project-list/ProjectListCard.jsx index f1804289..3571fdd9 100644 --- a/frontend/src/base/components/project-list/ProjectListCard.jsx +++ b/frontend/src/base/components/project-list/ProjectListCard.jsx @@ -223,15 +223,33 @@ function ProjectListCard({ Jobs