diff --git a/run.py b/run.py index 41fd959..d06655e 100644 --- a/run.py +++ b/run.py @@ -919,12 +919,19 @@ async def html_job(request, job_id): job = job[0] - app = Repo.select().where(Repo.url == job.url_or_path) - app = app[0] if app else None + application = Repo.select().where(Repo.url == job.url_or_path) + application = application[0] if application else None + + job_url = app.config.BASE_URL + app.url_for("html_job", job_id=job.id) + badge_url = app.config.BASE_URL + app.url_for("api_badge_job", job_id=job.id) + shield_badge_url = f"https://img.shields.io/endpoint?url={badge_url}" return { "job": job, - 'app': app, + 'app': application, + 'job_url': job_url, + 'badge_url': badge_url, + 'shield_badge_url': shield_badge_url, 'relative_path_to_root': '../', 'path': request.path } diff --git a/templates/job.html b/templates/job.html index d19f296..d1da01f 100644 --- a/templates/job.html +++ b/templates/job.html @@ -22,6 +22,7 @@