-
Notifications
You must be signed in to change notification settings - Fork 170
/
update.html
128 lines (109 loc) · 5.31 KB
/
update.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{% extends "base_generic.html" %}
{% block pagetitle %}Domain Update Control Panel{% endblock %}
{% block breadcrumbs %}
<nav aria-label="breadcrumb" style="padding-left: 20px;">
<ul class="breadcrumb" style="margin: 0;">
<li class="breadcrumb-item"><a href="{% url 'home:dashboard' %}">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page">Control Panel</li>
</ul>
</nav>
{% endblock %}
{% block content %}
<style>
.badge {
font-size: 14px;
}
</style>
<h2>Domain Update Control Panel</h2>
<!-- Domain Library Update Section -->
<h6><i class="fas fa-cloud-download-alt"></i> Pull Domains from Namecheap</h6>
<hr>
<p>The domain library sync with Mamecheap was last requested on:</p>
<p style="font-size: 20px; padding: 10 10 10 10">
<strong>{{ namecheap_last_update_requested }}</strong>
</p>
{% if namecheap_last_update_completed %}
{% if namecheap_last_update_completed == 'Failed' %}
<p>Request Status: <span class="badge badge-pill badge-danger">{{ namecheap_last_update_completed }}</span></p>
{% if cat_last_result %}
<div style="border: 1px solid black;width: 50%; margin: 0 auto; border-radius: 5px; background-color: #f1f1f1">
<strong>Error: </strong>
<em style="color: red">
{{ namecheap_last_result }}
</em>
</div>
{% endif %}
{% else %}
{% if namecheap_last_update_completed %}
<p>Request Status: <span class="badge badge-pill badge-success">Completed on {{ namecheap_last_update_completed }} in {{ namecheap_last_update_time }} minutes</span></p>
{% endif %}
{% endif %}
{% endif %}
{% if enable_namecheap %}
<form action="{% url 'shepherd:update_namecheap' %}" method="POST">
{% csrf_token %}
<input type="hidden" id="user_id" name="user_id" value='{{ user.get_username }}'>
<button class="btn btn-primary">Pull from Namecheap</button>
</form>
{% endif %}
<!-- Domain Categories Section -->
<h6><i class="fas fa-heartbeat"></i> Domain Categories</h6>
<hr>
<p>An update for the domain health statuses and categories was last requested on:</p>
<p style="font-size: 20px; padding: 10 10 10 10">
<strong>{{ cat_last_update_requested }}</strong>
</p>
{% if cat_last_update_completed %}
{% if cat_last_update_completed == 'Failed' %}
<p>Request Status: <span class="badge badge-pill badge-danger">{{ cat_last_update_completed }}</span></p>
{% if cat_last_result %}
<div style="border: 1px solid black;width: 50%; margin: 0 auto; border-radius: 5px; background-color: #f1f1f1">
<strong>Error: </strong>
<em style="color: red">
{{ cat_last_result }}
</em>
</div>
{% endif %}
{% else %}
{% if cat_last_update_completed %}
<p>Request Status: <span class="badge badge-pill badge-success">Completed on {{ cat_last_update_completed }} in {{ cat_last_update_time }} minutes</span></p>
{% endif %}
{% endif %}
{% endif %}
<p>Note that updates will require <em>at least</em> <strong>{{ update_time }}</strong> minutes ({{ total_domains }} domains * {{ sleep_time }} second sleep configured in settings).</p>
<form action="{% url 'shepherd:update_cat' %}" method="POST">
{% csrf_token %}
<input type="hidden" id="user_id" name="user_id" value='{{ user.get_username }}'>
<button class="btn btn-primary">Start Update</button>
</form>
<!-- DNS Section -->
<h6><i class="fas fa-server"></i> DNS Records</h6>
<hr>
<p>A DNS record update for all domains was last requested on:</p>
<p style="font-size: 20px; padding: 10 10 10 10">
<strong>{{ dns_last_update_requested }}</strong>
</p>
{% if dns_last_update_completed %}
{% if dns_last_update_completed == 'Failed' %}
<p>Request Status: <span class="badge badge-pill badge-danger">{{ dns_last_update_completed }}</span></p>
{% if dns_last_result %}
<div style="border: 1px solid black; width: 50%; margin: 0 auto; border-radius: 5px; background-color: #f1f1f1">
<strong>Error: </strong>
<em style="color: red">
{{ dns_last_result }}
</em>
</div>
{% endif %}
{% else %}
{% if dns_last_update_completed %}
<p>Request Status: <span class="badge badge-pill badge-success"><span class="badge badge-pill badge-success">Completed on {{ dns_last_update_completed }} in {{ dns_last_update_time }} minutes</span></p>
{% endif %}
{% endif %}
{% endif %}
<p>An individual update may take up to 60 seconds, so expect this to take some time.</p>
<form action="{% url 'shepherd:update_dns' %}" method="POST">
{% csrf_token %}
<input type="hidden" id="user_id" name="user_id" value='{{ user.get_username }}'>
<button class="btn btn-primary">Start Update</button>
</form>
{% endblock %}