Files
musicdl-catalog-sync-suite/catalog-sync/musicdl/catalogsync/templates/ops/songs.html
T

98 lines
2.3 KiB
HTML

{% extends "ops/base.html" %}
{% block content %}
<h1>Songs</h1>
<div class="grid">
<div class="card">
<h2>Download Stats</h2>
<table>
<tr><th>Total Songs</th><td>{{ download_stats.total_songs }}</td></tr>
<tr><th>Downloaded Songs</th><td>{{ download_stats.downloaded_songs }}</td></tr>
<tr><th>Local Files</th><td>{{ download_stats.local_file_locations }}</td></tr>
</table>
</div>
<div class="card">
<h2>Active Workers</h2>
<table>
<thead>
<tr>
<th>Worker</th>
<th>Status</th>
<th>Stage</th>
<th>Current Song / Playlist</th>
</tr>
</thead>
<tbody>
{% for worker in workers %}
<tr>
<td>{{ worker.worker_name }}</td>
<td>{{ worker.status }}</td>
<td>{{ worker.stage_type or "-" }}</td>
<td>{{ worker.display_text or "-" }}</td>
</tr>
{% else %}
<tr><td colspan="4">No active workers.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="card">
<h2>Running Items</h2>
<table>
<thead>
<tr>
<th>Job</th>
<th>Worker</th>
<th>Stage</th>
<th>Item</th>
</tr>
</thead>
<tbody>
{% for item in running_items %}
<tr>
<td><a href="/jobs/{{ item.job_run_id }}">{{ item.job_run_id }}</a></td>
<td>{{ item.worker_name or "-" }}</td>
<td>{{ item.stage_type }}</td>
<td>{{ item.display_name }}</td>
</tr>
{% else %}
<tr><td colspan="4">No running items.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="card">
<h2>Song Catalog</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Platform</th>
<th>Remote ID</th>
<th>Name</th>
<th>Singers</th>
<th>Updated</th>
</tr>
</thead>
<tbody>
{% for song in songs %}
<tr>
<td>{{ song.id }}</td>
<td>{{ song.platform }}</td>
<td>{{ song.remote_song_id }}</td>
<td>{{ song.name }}</td>
<td>{{ song.singers or "-" }}</td>
<td>{{ song.updated_at }}</td>
</tr>
{% else %}
<tr><td colspan="6">No songs.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}