banatie-service/apps/admin/src/app/page.tsx

156 lines
6.8 KiB
TypeScript

export default function AdminDashboard() {
return (
<div className="min-h-screen bg-gray-100">
{/* Header */}
<header className="bg-white shadow">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between h-16">
<div className="flex items-center">
<h1 className="text-2xl font-bold text-gray-900">Banatie Admin</h1>
</div>
<div className="flex items-center space-x-4">
<span className="text-sm text-gray-500">System Status: Online</span>
</div>
</div>
</div>
</header>
{/* Main Content */}
<main className="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
<div className="px-4 py-6 sm:px-0">
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
{/* Stats Cards */}
<div className="bg-white overflow-hidden shadow rounded-lg">
<div className="p-5">
<div className="flex items-center">
<div className="flex-shrink-0">
<div className="w-8 h-8 bg-blue-500 rounded-md flex items-center justify-center">
<span className="text-white text-sm font-medium">API</span>
</div>
</div>
<div className="ml-5 w-0 flex-1">
<dl>
<dt className="text-sm font-medium text-gray-500 truncate">API Requests</dt>
<dd className="text-lg font-medium text-gray-900">1,234</dd>
</dl>
</div>
</div>
</div>
</div>
<div className="bg-white overflow-hidden shadow rounded-lg">
<div className="p-5">
<div className="flex items-center">
<div className="flex-shrink-0">
<div className="w-8 h-8 bg-green-500 rounded-md flex items-center justify-center">
<span className="text-white text-sm font-medium">IMG</span>
</div>
</div>
<div className="ml-5 w-0 flex-1">
<dl>
<dt className="text-sm font-medium text-gray-500 truncate">
Images Generated
</dt>
<dd className="text-lg font-medium text-gray-900">567</dd>
</dl>
</div>
</div>
</div>
</div>
<div className="bg-white overflow-hidden shadow rounded-lg">
<div className="p-5">
<div className="flex items-center">
<div className="flex-shrink-0">
<div className="w-8 h-8 bg-yellow-500 rounded-md flex items-center justify-center">
<span className="text-white text-sm font-medium">USR</span>
</div>
</div>
<div className="ml-5 w-0 flex-1">
<dl>
<dt className="text-sm font-medium text-gray-500 truncate">Active Users</dt>
<dd className="text-lg font-medium text-gray-900">89</dd>
</dl>
</div>
</div>
</div>
</div>
<div className="bg-white overflow-hidden shadow rounded-lg">
<div className="p-5">
<div className="flex items-center">
<div className="flex-shrink-0">
<div className="w-8 h-8 bg-red-500 rounded-md flex items-center justify-center">
<span className="text-white text-sm font-medium">ERR</span>
</div>
</div>
<div className="ml-5 w-0 flex-1">
<dl>
<dt className="text-sm font-medium text-gray-500 truncate">Errors (24h)</dt>
<dd className="text-lg font-medium text-gray-900">3</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
{/* Services Status */}
<div className="mt-8">
<div className="bg-white shadow rounded-lg">
<div className="px-4 py-5 sm:p-6">
<h3 className="text-lg leading-6 font-medium text-gray-900 mb-4">Service Status</h3>
<div className="space-y-3">
<div className="flex items-center justify-between">
<span className="text-sm font-medium text-gray-900">API Service</span>
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
Healthy
</span>
</div>
<div className="flex items-center justify-between">
<span className="text-sm font-medium text-gray-900">PostgreSQL Database</span>
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
Connected
</span>
</div>
<div className="flex items-center justify-between">
<span className="text-sm font-medium text-gray-900">MinIO Storage</span>
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
Available
</span>
</div>
<div className="flex items-center justify-between">
<span className="text-sm font-medium text-gray-900">Gemini AI</span>
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">
Rate Limited
</span>
</div>
</div>
</div>
</div>
</div>
{/* Coming Soon Notice */}
<div className="mt-8">
<div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
<div className="flex">
<div className="ml-3">
<h3 className="text-sm font-medium text-blue-800">
Admin Dashboard Under Development
</h3>
<div className="mt-2 text-sm text-blue-700">
<p>
This admin dashboard is being developed to provide comprehensive monitoring
and management capabilities for the Banatie service.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
);
}