Skip to content

Commit

Permalink
feat(admin): create more links for malware reports (#16125)
Browse files Browse the repository at this point in the history
To make navigating between the reports and the project simpler

Signed-off-by: Mike Fiedler <[email protected]>
  • Loading branch information
miketheman authored Jun 17, 2024
1 parent 81d0ca1 commit eeb119f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion warehouse/admin/templates/admin/malware_reports/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
<div class="card">
<div class="card-header">
<h3 class="card-title">
Project: <code>{{ report.related.name }}</code>
Project:
<a href="{{ request.route_path('admin.project.detail', project_name=report.related.name) }}">
<code>{{ report.related.name }}</code>
</a>
</h3>
</div>
<div class="card-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

{% extends "admin/base.html" %}

{% block title %}Malware Reports for {{ project.name }}{% endblock %}
{% block title %}
Malware Reports for
<a href="{{ request.route_path('admin.project.detail', project_name=project.name) }}">{{ project.name }}</a>
{% endblock %}

{% block breadcrumb %}
<li class="breadcrumb-item">
Expand Down
6 changes: 6 additions & 0 deletions warehouse/admin/templates/admin/projects/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ <h3 class="card-title">Project Observations</h3>
<table class="table table-hover table-striped">
<thead>
<tr>
<th></th>
<th>Created</th>
<th>Kind</th>
<th>Reporter</th>
Expand All @@ -279,6 +280,11 @@ <h3 class="card-title">Project Observations</h3>
<tbody>
{% for observation in observations %}
<tr>
<td>
<a href="{{ request.route_path('admin.malware_reports.detail', observation_id=observation.id) }}">
<i class="fa-regular fa-eye"></i>
</a>
</td>
<td>{{ observation.created }}</td>
{# TODO: There's no exact relationship back to the ObservationKind to get the human-string. Not exactly sure how to get that yet. #}
<td>{{ observation.kind }}</td>
Expand Down

0 comments on commit eeb119f

Please sign in to comment.