database-sentinel-ai / access-anomalies.html
Kenzoo1's picture
AI Powered Database Anomaly Detection System (Cyber Security Enhanced)
37baacf verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Access Anomalies | AnomalyNinja</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-gray-900 text-white">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-12">
<div class="max-w-6xl mx-auto">
<div class="flex items-center gap-4 mb-8">
<i data-feather="lock" class="w-8 h-8 text-blue-500"></i>
<h1 class="text-4xl font-bold">Access Pattern Anomalies</h1>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<div class="lg:col-span-2 space-y-6">
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
<h2 class="text-2xl font-semibold mb-4">Access Activity</h2>
<canvas id="accessChart" height="300"></canvas>
</div>
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
<h2 class="text-2xl font-semibold mb-4">Suspicious Logins</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-700">
<thead>
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Time</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">User</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Location</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Device</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Anomaly</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-700">
<tr>
<td class="px-4 py-3 whitespace-nowrap">5 min ago</td>
<td class="px-4 py-3">admin@company.com</td>
<td class="px-4 py-3">Ukraine (New)</td>
<td class="px-4 py-3">Mobile Android</td>
<td class="px-4 py-3"><span class="px-2 py-1 bg-red-900 text-red-100 rounded-full text-xs">Geo Leap</span></td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap">27 min ago</td>
<td class="px-4 py-3">jdoe@company.com</td>
<td class="px-4 py-3">USA (Normal)</td>
<td class="px-4 py-3">MacOS (New)</td>
<td class="px-4 py-3"><span class="px-2 py-1 bg-yellow-900 text-yellow-100 rounded-full text-xs">Device Change</span></td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap">2 hours ago</td>
<td class="px-4 py-3">service-account</td>
<td class="px-4 py-3">Germany</td>
<td class="px-4 py-3">CLI</td>
<td class="px-4 py-3"><span class="px-2 py-1 bg-purple-900 text-purple-100 rounded-full text-xs">Time Anomaly</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="space-y-6">
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
<h2 class="text-2xl font-semibold mb-4">Risk Overview</h2>
<div class="flex justify-center">
<div class="relative w-48 h-48">
<canvas id="riskChart"></canvas>
<div class="absolute inset-0 flex items-center justify-center">
<div class="text-center">
<div class="text-3xl font-bold">78%</div>
<div class="text-gray-400">Confidence</div>
</div>
</div>
</div>
</div>
<div class="mt-4 space-y-2">
<div class="flex justify-between">
<span class="text-gray-300">Normal</span>
<span class="font-medium">92%</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-green-600 h-2 rounded-full" style="width: 92%"></div>
</div>
<div class="flex justify-between">
<span class="text-gray-300">Suspicious</span>
<span class="font-medium">5%</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-yellow-600 h-2 rounded-full" style="width: 5%"></div>
</div>
<div class="flex justify-between">
<span class="text-gray-300">Malicious</span>
<span class="font-medium">3%</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-red-600 h-2 rounded-full" style="width: 3%"></div>
</div>
</div>
</div>
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
<h2 class="text-2xl font-semibold mb-4">User Behavior</h2>
<div class="space-y-3">
<div>
<div class="flex justify-between mb-1">
<span class="text-gray-300">Failed Logins</span>
<span class="text-blue-400 font-medium">12</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 60%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-gray-300">Unusual Hours</span>
<span class="text-blue-400 font-medium">8</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 40%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-gray-300">New Devices</span>
<span class="text-blue-400 font-medium">5</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 25%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
// Access Chart
const accessCtx = document.getElementById('accessChart').getContext('2d');
const accessChart = new Chart(accessCtx, {
type: 'line',
data: {
labels: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '00:00'],
datasets: [
{
label: 'Normal Access',
data: [120, 90, 300, 450, 380, 280, 150],
borderColor: '#3b82f6',
backgroundColor: 'rgba(59, 130, 246, 0.1)',
borderWidth: 2,
fill: true
},
{
label: 'Anomalies',
data: [5, 3, 8, 15, 12, 7, 4],
borderColor: '#ef4444',
backgroundColor: 'rgba(239, 68, 68, 0.1)',
borderWidth: 2,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// Risk Chart
const riskCtx = document.getElementById('riskChart').getContext('2d');
const riskChart = new Chart(riskCtx, {
type: 'doughnut',
data: {
labels: ['Normal', 'Suspicious', 'Malicious'],
datasets: [{
data: [92, 5, 3],
backgroundColor: [
'#10b981',
'#f59e0b',
'#ef4444'
],
borderWidth: 0
}]
},
options: {
cutout: '70%',
plugins: {
legend: {
display: false
}
}
}
});
</script>
</body>
</html>