Aberrant/templates/index.html

87 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Aberrant</title>
<link rel="stylesheet" type="text/css" href="/static/aberrant.css">
<script>
const ws_uri = "{{ request.app.router['ws'].url_for() }}";
</script>
<script type="text/javascript" src="/static/aberrant.js"></script>
<script>window.onload = load;</script>
</head>
<body>
<table id="torrents">
<thead>
<tr>
<th class="name">Name</th>
<th class="total_size_str">Size</th>
<th class="state">State</th>
<th class="downrate_str">DL</th>
<th class="down_percent"></th>
<th class="eta_str">ETA</th>
<th class="uprate_str">UL</th>
<th class="tracker">Tracker</th>
<th class="rtorrent_id">RT id</th>
</tr>
</thead>
<tbody>
{% for torrent in torrents %}
<tr>
<td class="name">{{ torrent.name }}</td>
<td class="total_size_str">{{ torrent.total_size_str }}</td>
<td class="state">{{ torrent.state }}</td>
<td class="downrate_str">{{ torrent.downrate_str }}</td>
<td class="down_percent">{{ torrent.down_percent }}</td>
<td class="eta_str">{{ torrent.eta_str }}</td>
<td class="uprate_str">{{ torrent.uprate_str }}</td>
<td class="tracker">{{ torrent.tracker }}</td>
<td class="rtorrent_id">{{ torrent.rtorrent_id }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<template id="torrent_template">
<tr>
<td class="name"></td>
<td class="total_size_str"></td>
<td class="state"></td>
<td class="downrate_str"></td>
<td class="down_percent"></td>
<td class="eta_str"></td>
<td class="uprate_str"></td>
<td class="tracker"></td>
<td class="rtorrent_id"></td>
</tr>
</template>
<br>
<table id="tracker_stats">
<thead>
<tr>
<th class="tracker_stat">Tracker</th>
<th class="hashing">Hashing</th>
<th class="error">Error</th>
<th class="total">Total</th>
</tr>
</thead>
<tbody>
{% for tracker, stats in tracker_stats.items() %}
<tr>
<td class="tracker_stat">{{ tracker }}</td>
<td class="hashing">{{ stats[0] }}</td>
<td class="error">{{ stats[1] }}</td>
<td class="total">{{ stats[2] }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<template id="tracker_template">
<tr>
<td class="tracker_stat"></td>
<td class="hashing"></td>
<td class="error"></td>
<td class="total"></td>
</tr>
</template>
</body>
</html>