File size: 10,071 Bytes
dded74d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | <!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> |