diff --git a/backend/app/api/v1/endpoint_modules/ogm.py b/backend/app/api/v1/endpoint_modules/ogm.py index c72b167..9b986d6 100644 --- a/backend/app/api/v1/endpoint_modules/ogm.py +++ b/backend/app/api/v1/endpoint_modules/ogm.py @@ -78,7 +78,17 @@ async def ogm_repo_dashboard(request: Request): or f"https://github.com/OpenGeoMetadata/{quote(name, safe='')}", "ogm_search_url": "/api/v1/search?" + urlencode({"ogm_repo": name}), "display_last_commit_at": _format_timestamp(repo.get("last_commit_at")), - "display_last_harvest_at": _format_timestamp(repo.get("last_crawl_completed_at")), + "display_last_successful_harvest_at": _format_timestamp( + repo.get("last_successful_harvest_at") + ), + "display_harvest_started_at": _format_timestamp(repo.get("last_crawl_started_at")), + "display_harvest_stage": { + "sync": "Fetching metadata", + "import": "Importing records", + "search_index": "Updating search index", + "thumbnail_refresh": "Refreshing thumbnails", + "dumps": "Saving harvest files", + }.get(repo.get("last_run_stage"), "Processing"), "source_status": "Nightly" if scheduled else "Not scheduled", "indexed_record_count": count, } @@ -90,6 +100,7 @@ async def ogm_repo_dashboard(request: Request): } if templates is None: + no_success = "No successful harvest recorded" rows = "".join( ( "
Templates are unavailable, showing a minimal fallback view.
" "| Repository | Last commit | Last harvest | " + "Repository | Last commit | Last successful harvest | " + "Latest harvest | " "Indexed records | " f"
|---|