Spaces:
Running

ninateam / admin.html
ArapMarru's picture
Build or review the app or tool **NinaAnalysis Pro v2.1**, with the following :
dded74d verified
Raw History Blame Contribute Delete
10.1 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard - NinaAnalysis Pro</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.admin-card {
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}
</style>
</head>
<body class="gradient-bg min-h-screen text-gray-100">
<!-- Navigation -->
<nav class="bg-gray-900 bg-opacity-80 backdrop-blur-md fixed w-full z-10">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="activity" class="h-8 w-8 text-primary-400"></i>
<span class="ml-2 text-xl font-bold">NinaAnalysis<span class="text-primary-400">Pro</span></span>
</div>
</div>
<div class="hidden md:block">
<div class="ml-10 flex items-baseline space-x-4">
<a href="/index.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Signal Dashboard</a>
<a href="/admin.html" class="bg-gray-800 text-white px-3 py-2 rounded-md text-sm font-medium">Admin</a>
</div>
</div>
<div class="flex items-center">
<button id="logout-btn" class="hidden md:flex items-center text-sm rounded-full focus:outline-none">
<i data-feather="log-out" class="h-6 w-6 text-red-400"></i>
</button>
</div>
</div>
</div>
</nav>
<main class="pt-20 pb-12 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Admin Overview -->
<div class="lg:col-span-3">
<div class="bg-gray-800 rounded-xl p-6 admin-card mb-6">
<h2 class="text-2xl font-bold mb-4">Admin Dashboard</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-gray-900 rounded-lg p-4">
<div class="flex items-center">
<div class="p-2 rounded-full bg-blue-900 bg-opacity-30 mr-3">
<i data-feather="users" class="w-5 h-5 text-blue-400"></i>
</div>
<div>
<p class="text-gray-400 text-sm">Active Users</p>
<p class="text-xl font-bold">42</p>
</div>
</div>
</div>
<div class="bg-gray-900 rounded-lg p-4">
<div class="flex items-center">
<div class="p-2 rounded-full bg-yellow-900 bg-opacity-30 mr-3">
<i data-feather="dollar-sign" class="w-5 h-5 text-yellow-400"></i>
</div>
<div>
<p class="text-gray-400 text-sm">Pending Payments</p>
<p class="text-xl font-bold">3</p>
</div>
</div>
</div>
<div class="bg-gray-900 rounded-lg p-4">
<div class="flex items-center">
<div class="p-2 rounded-full bg-green-900 bg-opacity-30 mr-3">
<i data-feather="activity" class="w-5 h-5 text-green-400"></i>
</div>
<div>
<p class="text-gray-400 text-sm">System Health</p>
<p class="text-xl font-bold text-green-400">OK</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Pending Payments -->
<div class="lg:col-span-2">
<div class="bg-gray-800 rounded-xl p-6 admin-card">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold">Pending Payments</h3>
</div>
<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-400 uppercase">ID</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase">Email</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase">Phone</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase">Amount</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-700">
<tr>
<td class="px-4 py-3 text-sm">1</td>
<td class="px-4 py-3 text-sm">user1@domain.com</td>
<td class="px-4 py-3 text-sm">254712345678</td>
<td class="px-4 py-3 text-sm">KES 50</td>
<td class="px-4 py-3 text-sm">
<button class="text-green-500 hover:text-green-400 mr-2">
<i data-feather="check" class="w-4 h-4"></i>
</button>
<button class="text-red-500 hover:text-red-400">
<i data-feather="x" class="w-4 h-4"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- System Health -->
<div class="space-y-6">
<div class="bg-gray-800 rounded-xl p-6 admin-card">
<h3 class="text-lg font-semibold mb-4">System Health</h3>
<div class="space-y-3 text-sm">
<div class="flex justify-between items-center">
<span class="text-gray-400">Database</span>
<span class="text-green-400">Connected</span>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">WebSocket</span>
<span class="text-green-400">Active</span>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">DeepSite Agent</span>
<span class="text-green-400">Monitoring</span>
</div>
</div>
<button class="w-full mt-4 bg-primary-600 hover:bg-primary-700 text-white py-2 px-4 rounded-lg text-sm">
Run Diagnostics
</button>
</div>
<div class="bg-gray-800 rounded-xl p-6 admin-card">
<h3 class="text-lg font-semibold mb-4">Recent Alerts</h3>
<div class="space-y-3">
<div class="flex items-start text-sm">
<div class="flex-shrink-0 mt-1 mr-3 text-yellow-400">
<i data-feather="alert-triangle" class="w-4 h-4"></i>
</div>
<div>
<p>Tab unresponsive - user@domain.com</p>
<p class="text-xs text-gray-400">2 minutes ago</p>
</div>
</div>
<div class="flex items-start text-sm">
<div class="flex-shrink-0 mt-1 mr-3 text-green-400">
<i data-feather="check" class="w-4 h-4"></i>
</div>
<div>
<p>Payment verified - user2@domain.com</p>
<p class="text-xs text-gray-400">15 minutes ago</p>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<script>
feather.replace();
document.getElementById('logout-btn').addEventListener('click', () => {
window.location.href = '/login.html';
});
// Here you would fetch pending payments and system health from API
// async function fetchData() {
// const response = await fetch('/api/admin/payments');
// // Process response
// }
// fetchData();
</script>
</body>
</html>