forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: investigate file authenticity (ietf-tools#7331)
* feat: investigate file authenticity * fix: use django-provided validation
- Loading branch information
Showing
7 changed files
with
325 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{% extends "base.html" %} | ||
{# Copyright The IETF Trust 2024, All Rights Reserved #} | ||
{% load django_bootstrap5 ietf_filters origin static %} | ||
{% block title %}Investigate{% endblock %} | ||
{% block pagehead %} | ||
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}"> | ||
{% endblock %} | ||
{% block content %} | ||
{% origin %} | ||
<h1>Investigate</h1> | ||
<form id="investigate" method="post"> | ||
{% csrf_token %} | ||
{% bootstrap_form form %} | ||
<button class="btn btn-primary" type="submit">Investigate</button> | ||
</form> | ||
{% if results %} | ||
<div id="results"> | ||
{% if results.can_verify %} | ||
<h2>These can be authenticated</h2> | ||
<table id="authenticated" class="table table-sm table-striped tablesorter"> | ||
<thead> | ||
<tr> | ||
<th scope="col" data-sort="name">Name</th> | ||
<th scope="col" data-sort="modified">Last Modified On</th> | ||
<th scope="col" data-sort="link">Link</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for path in results.can_verify %} | ||
{% with url=path|url_for_path %} | ||
<tr><td>{{path.name}}</td><td>{{path|mtime|date:"DATETIME_FORMAT"}}</td><td><a href="{{url}}">{{url}}</a></td></tr> | ||
{% endwith %} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% else %} | ||
<h2>Nothing with this name fragment can be authenticated</h2> | ||
{% endif %} | ||
<hr> | ||
{% if results.unverifiable_collections %} | ||
<h2>These are in the archive, but cannot be authenticated</h2> | ||
<table id="unverifiable" class="table table-sm table-striped tablesorter"> | ||
<thead> | ||
<tr> | ||
<th scope="col" data-sort="name">Name</th> | ||
<th scope="col" data-sort="modified">Last Modified On</th> | ||
<th scope="col" data-sort="link">Link</th> | ||
<th scope="col" data-sort="source">Source</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for path in results.unverifiable_collections %} | ||
{% with url=path|url_for_path %} | ||
<tr> | ||
<td>{{path.name}}</td> | ||
<td>{{path|mtime|date:"DATETIME_FORMAT"}}</td> | ||
<td><a href="{{url}}">{{url}}</a></td> | ||
<td>{{path}}</td> | ||
</tr> | ||
{% endwith %} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} | ||
{% if results.unexpected %} | ||
<h2>These are unexpected and we do not know what their origin is. These cannot be authenticated</h2> | ||
<table id="unexpected" class="table table-sm table-striped tablesorter"> | ||
<thead> | ||
<tr> | ||
<th scope="col" data-sort="name">Name</th> | ||
<th scope="col" data-sort="modified">Last Modified On</th> | ||
<th scope="col" data-sort="link">Link</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for path in results.unexpected %} | ||
{% with url=path|url_for_path %} | ||
<tr> | ||
<td>{{path.name}}</td> | ||
<td>{{path|mtime|date:"DATETIME_FORMAT"}}</td> | ||
<td><a href="{{url}}">{{url}}</a></td> | ||
</tr> | ||
{% endwith %} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% endblock %} | ||
{% block js %} | ||
<script src="{% static "ietf/js/list.js" %}"></script> | ||
{% endblock %} |