Files
TornActivityTracker/templates/download_results.html
2025-01-31 00:49:57 +01:00

85 lines
3.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Your page title</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="{{url_for('.static', filename='styles.css')}}">
</head>
<body>
<header>
<h1>Torn User Activity Scraper</h1>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="navbar-nav mr-auto">
{% from 'bootstrap4/nav.html' import render_nav_item %}
{{ render_nav_item('index', 'Home') }}
{{ render_nav_item('results', 'Results') }}
{{ render_nav_item('download_results', 'Download Results') }}
</div>
</nav>
</header>
<main>
<section id="scrapingFormContainer" class="container-fluid d-flex justify-content-center">
<div class="container-md my-5 mx-2 shadow-lg p-4 ">
<h2>Data</h2>
<table id="dataFilesTable" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th onclick="sortTable(0, 'dataFilesTable')">File Name</th>
<th onclick="sortTable(1, 'dataFilesTable')">Last Modified</th>
<th onclick="sortTable(2, 'dataFilesTable')">Created</th>
<th onclick="sortTable(3, 'dataFilesTable')">Size</th>
<th>Action</th>
</tr>
</thead>
{% for file in files.data %}
<tr>
<td><a href="{{ url_for('download_data_file', filename=file.name.split('/')[-1]) }}" target="_blank">{{ file.name }}</a></td>
<td>{{ file.last_modified | datetimeformat }}</td>
<td>{{ file.created | datetimeformat }}</td>
<td>{{ file.size }}</td>
<td>
<button onclick="deleteFile('{{ file.name }}')">Delete</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2>Log</h2>
<table id="logFilesTable" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th onclick="sortTable(0, 'logFilesTable')">File Name</th>
<th onclick="sortTable(1, 'logFilesTable')">Last Modified</th>
<th onclick="sortTable(2, 'logFilesTable')">Created</th>
<th onclick="sortTable(3, 'logFilesTable')">Size</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for file in files.log %}
<tr>
<td><a href="{{ url_for('download_log_file', filename=file.name.split('/')[-1]) }}" target="_blank">{{ file.name }}</a></td>
<td>{{ file.last_modified | datetimeformat }}</td>
<td>{{ file.created | datetimeformat }}</td>
<td>{{ file.size }}</td>
<td>
<button onclick="deleteFile('{{ file.name }}')">Delete</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
</main>
{% block scripts %}
{{ bootstrap.load_js() }}
<script src="{{url_for('.static', filename='app.js')}}"></script>
{% endblock %}
</body>
</html>