mirror of https://github.com/aliasrobotics/cai.git
113 lines
3.1 KiB
HTML
113 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>Log Analysis Dashboard</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 20px;
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
h1 {
|
|
color: #333;
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.plot-container {
|
|
background: white;
|
|
padding: 20px;
|
|
margin-bottom: 30px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
h2 {
|
|
color: #444;
|
|
margin-top: 0;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.map-container {
|
|
height: 600px;
|
|
width: 100%;
|
|
}
|
|
|
|
.nav-links {
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.nav-links a {
|
|
display: inline-block;
|
|
margin: 0 10px;
|
|
padding: 10px 15px;
|
|
background-color: #4CAF50;
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 4px;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
.nav-links a:hover {
|
|
background-color: #3e8e41;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<h1>Log Analysis Dashboard</h1>
|
|
|
|
{% if config.enable_map and map_html %}
|
|
<div class="plot-container">
|
|
<h2>Geographic Distribution</h2>
|
|
<div class="map-container">
|
|
{{ map_html | safe }}
|
|
</div>
|
|
</div>
|
|
{% endif %} {% if config.enable_daily_logs and logs_by_day %}
|
|
<div class="plot-container">
|
|
<h2>Logs by Day</h2>
|
|
<img src="data:image/png;base64,{{ logs_by_day }}" alt="Logs by Day">
|
|
</div>
|
|
{% endif %} {% if config.enable_system_dist and logs_by_system %}
|
|
<div class="plot-container">
|
|
<h2>Logs by System</h2>
|
|
<img src="data:image/png;base64,{{ logs_by_system }}" alt="Logs by System">
|
|
</div>
|
|
{% endif %} {% if config.enable_user_activity and active_users %}
|
|
<div class="plot-container">
|
|
<h2>Most Active Users</h2>
|
|
<img src="data:image/png;base64,{{ active_users }}" alt="Most Active Users">
|
|
</div>
|
|
{% endif %} {% if ip_date_heatmap %}
|
|
<div class="plot-container">
|
|
<h2>Log Heatmap: Number of Logs per IP Address and Date</h2>
|
|
<img src="data:image/png;base64,{{ ip_date_heatmap }}" alt="Log Heatmap: Number of Logs per IP Address and Date">
|
|
</div>
|
|
{% endif %} {% if pypi_plot %}
|
|
<div class="plot-container">
|
|
<h2>PyPI Download Statistics</h2>
|
|
<img src="{{ pypi_plot }}" alt="PyPI Download Statistics">
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</body>
|
|
|
|
</html> |