* feat: investigate docs asynchronously * refactor: move script to its own js file * fix: adjust polling interval/duration * test: test new task * fix: extra tag/fix whitespace * style: restore whitespace (I hope) * style: black/standard styling * test: fix test of investigate view * test: improve/delint tests
127 lines
5.6 KiB
HTML
127 lines
5.6 KiB
HTML
{% 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>
|
|
<div class="mb-3">
|
|
<form id="investigate" method="post">
|
|
{% csrf_token %}
|
|
{% bootstrap_form form %}
|
|
<button class="btn btn-primary" type="submit" id="investigate-button">
|
|
<span id="spinner"
|
|
class="spinner-border spinner-border-sm d-none"
|
|
role="status"
|
|
aria-hidden="true">
|
|
</span>
|
|
Investigate
|
|
</button>
|
|
</form>
|
|
</div>
|
|
{% 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>
|
|
<th scope="col" data-sort="source">Source</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for path in results.can_verify %}
|
|
{% with url=path|url_for_path %}
|
|
<tr>
|
|
<td>{{ path.name }}</td>
|
|
<td>
|
|
{% if path|mtime_is_epoch %}
|
|
Timestamp has been lost (is Unix Epoch)
|
|
{% else %}
|
|
{{ path|mtime|date:"DATETIME_FORMAT" }}
|
|
{% endif %}
|
|
</td>
|
|
<td><a href="{{ url }}">{{ url }}</a></td>
|
|
<td>{{ path }}</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>
|
|
{% if path|mtime_is_epoch %}
|
|
Timestamp has been lost (is Unix Epoch)
|
|
{% else %}
|
|
{{ path|mtime|date:"DATETIME_FORMAT" }}
|
|
{% endif %}
|
|
</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>
|
|
{% if path|mtime_is_epoch %}
|
|
Timestamp has been lost (is Unix Epoch)
|
|
{% else %}
|
|
{{ path|mtime|date:"DATETIME_FORMAT" }}
|
|
{% endif %}
|
|
</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>
|
|
<script src="{% static "ietf/js/investigate.js" %}"></script>
|
|
{% endblock %} |