-
Notifications
You must be signed in to change notification settings - Fork 112
/
index.html
66 lines (58 loc) · 2.03 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% load humanize %}
{% block titletag %}{% translate "CDN Manager" %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title="CDN Manager" icon="tag" %}
<div class="nice-padding">
<h2>Cache Invalidator</h2>
{% if user_can_purge %}
<div class="help-block help-info">
<p>
Enter a full URL (e.g., <code>https://www.consumerfinance.gov/about-us/</code>
or <code>https://files.consumerfinance.gov/f/documents/example.pdf</code>)
to invalidate its cache, or leave it blank to invalidate the cache for the entire site.
</p>
</div>
<form method="post" id="flush_site">
{% csrf_token %}
<ul class="fields">
<li>
<div class="field url_field url_input">
<div class="input">
{{ form.url }}
</div>
</div>
</li>
</ul>
<button type="submit" name="flush" class="button">Invalidate cache</button>
</form>
{% else %}
<div class="help-block help-info">
<p>
You do not have permission to submit purge requests,
but you are welcome to view the history.
</p>
</div>
{% endif %}
<h2>History</h2>
<table class="listing">
<thead>
<tr>
<th>When</th>
<th>Who</th>
<th>Result</th>
</tr>
</thead>
<tbody>
{% for history_item in history %}
<tr>
<td>{{ history_item.created | naturaltime }}</td>
<td>{{ history_item.user }}</td>
<td>{{ history_item.message }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}