92 lines
2.5 KiB
Plaintext
92 lines
2.5 KiB
Plaintext
<%- include("partials/header") %>
|
|
|
|
<div class="row">
|
|
|
|
<!-- ======================= -->
|
|
<!-- QUEUED -->
|
|
<!-- ======================= -->
|
|
<div class="col-md-4">
|
|
<h3>Queued</h3>
|
|
<ul class="list-group">
|
|
|
|
<% queued.forEach(job => { %>
|
|
<li class="list-group-item">
|
|
<strong><%= job.filename %></strong><br>
|
|
<small><%= job.url %></small><br>
|
|
<small><%= new Date(job.created_at).toLocaleString() %></small>
|
|
</li>
|
|
<% }) %>
|
|
|
|
<% if (queued.length === 0) { %>
|
|
<li class="list-group-item">No pending downloads</li>
|
|
<% } %>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- ======================= -->
|
|
<!-- DONE -->
|
|
<!-- ======================= -->
|
|
<div class="col-md-4">
|
|
<h3 class="text-success">Done</h3>
|
|
<ul class="list-group">
|
|
|
|
<% finished.forEach(job => { %>
|
|
<li class="list-group-item">
|
|
<strong class="text-success"><%= job.filename %></strong><br>
|
|
<small><%= new Date(job.finished_at).toLocaleString() %></small><br>
|
|
|
|
<% if (job.output_log) { %>
|
|
<details class="mt-2">
|
|
<summary class="text-light">Show Log</summary>
|
|
<pre style="background:#222; color:#e0e0e0; padding:10px; border-radius:5px; white-space:pre-wrap;">
|
|
<%= job.output_log %>
|
|
</pre>
|
|
</details>
|
|
<% } %>
|
|
|
|
</li>
|
|
<% }) %>
|
|
|
|
<% if (finished.length === 0) { %>
|
|
<li class="list-group-item">No completed downloads</li>
|
|
<% } %>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- ======================= -->
|
|
<!-- FAILED -->
|
|
<!-- ======================= -->
|
|
<div class="col-md-4">
|
|
<h3 class="text-danger">Failed</h3>
|
|
<ul class="list-group">
|
|
|
|
<% failed && failed.forEach(job => { %>
|
|
<li class="list-group-item">
|
|
<strong class="text-danger"><%= job.filename %></strong><br>
|
|
<small><%= new Date(job.failed_at).toLocaleString() %></small><br>
|
|
|
|
<% if (job.output_log) { %>
|
|
<details class="mt-2">
|
|
<summary class="text-danger">Show Error Log</summary>
|
|
<pre style="background:#330000; color:#ffb3b3; padding:10px; border-radius:5px; white-space:pre-wrap;">
|
|
<%= job.output_log %>
|
|
</pre>
|
|
</details>
|
|
<% } %>
|
|
|
|
</li>
|
|
<% }) %>
|
|
|
|
<% if (!failed || failed.length === 0) { %>
|
|
<li class="list-group-item">No failed jobs</li>
|
|
<% } %>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<%- include("partials/footer") %>
|