Skip to content

Commit

Permalink
feat: link to gitlab logs on visualisation page
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefSmith committed Jul 4, 2023
1 parent 63617c2 commit 23e2f11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dataworkspace/dataworkspace/apps/applications/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ def visualisation_branch_html_GET(request, gitlab_project, branch_name):
current_branch = matching_branches[0]
latest_commit = current_branch["commit"]
latest_commit_link = f'{gitlab_project["web_url"]}/commit/{latest_commit["id"]}'
latest_jobs_link = f'{gitlab_project["web_url"]}/-/jobs'
latest_commit_preview_link = (
f'{request.scheme}://{application_template.host_basename}--{latest_commit["short_id"]}'
f".{settings.APPLICATION_ROOT_DOMAIN}/"
Expand Down Expand Up @@ -523,6 +524,7 @@ def visualisation_branch_html_GET(request, gitlab_project, branch_name):
"current_branch": current_branch,
"latest_commit": latest_commit,
"latest_commit_link": latest_commit_link,
"latest_jobs_link": latest_jobs_link,
"latest_commit_preview_link": latest_commit_preview_link,
"latest_commit_date": latest_commit_date,
"can_release_latest_commit": can_release_latest_commit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ <h2 class="commit-left govuk-heading-m">Latest commit: {{ latest_commit.short_id
</a>
</li>
{% endif %}
<li>
<a class="govuk-link govuk-link--no-visited-state" href="{{ latest_jobs_link }}">
View jobs logs in GitLab
</a>
</li>
</ul>
</section>
{% endblock %}

0 comments on commit 23e2f11

Please sign in to comment.