Features: - Device management and monitoring dashboard - Remote command execution on devices via port 80 - Auto-update coordination for multiple devices - Database reset functionality with safety confirmations - Server logs filtering and dedicated logging interface - Device status monitoring and management - SQLite database for comprehensive logging - Web interface with Bootstrap styling - Comprehensive error handling and logging Key components: - server.py: Main Flask application with all routes - templates/: Complete web interface templates - data/database.db: SQLite database for device logs - UPDATE_SUMMARY.md: Development progress documentation
89 lines
3.0 KiB
HTML
89 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Logs for Hostname: {{ hostname }}</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
|
|
<style>
|
|
body {
|
|
background-color: #f8f9fa;
|
|
font-family: Arial, sans-serif;
|
|
}
|
|
h1 {
|
|
text-align: center;
|
|
color: #343a40;
|
|
}
|
|
.table-container {
|
|
background-color: #ffffff;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
padding: 20px;
|
|
}
|
|
.table {
|
|
margin-bottom: 0;
|
|
table-layout: fixed; /* Ensures consistent column widths */
|
|
width: 100%; /* Makes the table take up the full container width */
|
|
}
|
|
.table th, .table td {
|
|
text-align: center;
|
|
word-wrap: break-word; /* Ensures long text wraps within the cell */
|
|
}
|
|
.table th:nth-child(1), .table td:nth-child(1) {
|
|
width: 25%; /* Device ID column */
|
|
}
|
|
.table th:nth-child(2), .table td:nth-child(2) {
|
|
width: 25%; /* Nume Masa column */
|
|
}
|
|
.table th:nth-child(3), .table td:nth-child(3) {
|
|
width: 25%; /* Timestamp column */
|
|
}
|
|
.table th:nth-child(4), .table td:nth-child(4) {
|
|
width: 25%; /* Event Description column */
|
|
}
|
|
.back-button {
|
|
margin-bottom: 20px;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container mt-5">
|
|
<h1 class="mb-4">Logs for Hostname: {{ hostname }}</h1>
|
|
<div class="back-button">
|
|
<a href="/dashboard" class="btn btn-primary">Back to Dashboard</a>
|
|
</div>
|
|
<div class="table-container">
|
|
<table class="table table-striped table-bordered">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Device ID</th>
|
|
<th>Nume Masa</th>
|
|
<th>Timestamp</th>
|
|
<th>Event Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% if logs %}
|
|
{% for log in logs %}
|
|
<tr>
|
|
<td>{{ log[0] }}</td>
|
|
<td>{{ log[1] }}</td>
|
|
<td>{{ log[2] }}</td>
|
|
<td>{{ log[3] }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="4">No logs found for this hostname.</td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
<p class="text-center mt-4">© 2023 Device Logs Dashboard. All rights reserved.</p>
|
|
</footer>
|
|
</body>
|
|
</html> |