- Added schema definition and migration logic in app/db/schema.py. - Created tables for log sources, requests, IP stats, scans, blocklist, whitelist, and firewall rules. - Introduced functions to apply migrations and ensure database integrity. feat: Enhance scan functionality with database integration - Added _sync_blocklist_to_db function to synchronize blocklist with SQLite. - Updated run_scan function to handle database connections and scan records. - Implemented error handling for database operations during scans. feat: Introduce log analysis page and API endpoints - Created analysis.html template for displaying log analysis results. - Added routes for fetching top IPs, IP request timelines, and cross-source IPs. - Integrated analysis data into the dashboard and status endpoints. fix: Ensure whitelists are synchronized with the database - Implemented sync_whitelists_to_db function to persist in-memory whitelists. - Updated constants.py to define the path for the SQLite database. refactor: Modularize analysis helpers for better maintainability - Created _analysis_helpers function to encapsulate SQLite query logic. - Updated routes.py to utilize new analysis helper functions for API responses.
56 lines
1.7 KiB
HTML
56 lines
1.7 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{% block title %}Intrusion Detection{% endblock %}</title>
|
|
<link
|
|
rel="stylesheet"
|
|
href="{{ url_for('static', filename='style.css') }}"
|
|
/>
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<div class="brand">🛡 Intrusion Detection</div>
|
|
<nav>
|
|
<a href="/" class="{{ 'active' if request.path == '/' }}">Dashboard</a>
|
|
<a href="/scan" class="{{ 'active' if request.path == '/scan' }}"
|
|
>Scan</a
|
|
>
|
|
<a href="/reports" class="{{ 'active' if request.path == '/reports' }}"
|
|
>Reports</a
|
|
>
|
|
<a
|
|
href="/blocklist"
|
|
class="{{ 'active' if request.path == '/blocklist' }}"
|
|
>Blocklist</a
|
|
>
|
|
<a
|
|
href="/firewall"
|
|
class="{{ 'active' if request.path == '/firewall' }}"
|
|
>Firewall</a
|
|
>
|
|
<a
|
|
href="/whitelist"
|
|
class="{{ 'active' if request.path == '/whitelist' }}"
|
|
>Whitelist</a
|
|
>
|
|
<a
|
|
href="/graph"
|
|
class="{{ 'active' if request.path == '/graph' }}"
|
|
>Graph</a
|
|
>
|
|
<a
|
|
href="/analysis"
|
|
class="{{ 'active' if request.path == '/analysis' }}"
|
|
>Analysis</a
|
|
>
|
|
</nav>
|
|
</header>
|
|
<main class="container">{% block content %}{% endblock %}</main>
|
|
<div id="toasts"></div>
|
|
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|