feat(admin): add ops quick links
This commit is contained in:
parent
534395bb5e
commit
89f2f1288b
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Activity, CheckCircle, RefreshCw, ShieldAlert } from 'lucide-react';
|
import { Activity, CheckCircle, ExternalLink, RefreshCw, ShieldAlert } from 'lucide-react';
|
||||||
|
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
@ -35,6 +35,15 @@ interface OpsStatus {
|
|||||||
services: ServiceCheck[];
|
services: ServiceCheck[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const OPS_LINKS = [
|
||||||
|
{ label: 'Grafana', href: 'http://127.0.0.1:3000' },
|
||||||
|
{ label: 'Prometheus', href: 'http://127.0.0.1:9090' },
|
||||||
|
{ label: 'Loki Ready', href: 'http://127.0.0.1:3100/ready' },
|
||||||
|
{ label: 'Admin Health', href: 'http://127.0.0.1:3001/api/health' },
|
||||||
|
{ label: 'Tracker Health', href: 'http://127.0.0.1:3003/api/health' },
|
||||||
|
{ label: 'API Gateway Health', href: 'https://api.bytelyst.com/platform/health' },
|
||||||
|
];
|
||||||
|
|
||||||
export default function OpsPage() {
|
export default function OpsPage() {
|
||||||
const [data, setData] = useState<OpsStatus | null>(null);
|
const [data, setData] = useState<OpsStatus | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
@ -127,6 +136,27 @@ export default function OpsPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Ops Links</CardTitle>
|
||||||
|
<CardDescription>Direct entry points for internal monitoring and health review.</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="grid gap-3 md:grid-cols-2 xl:grid-cols-3">
|
||||||
|
{OPS_LINKS.map(link => (
|
||||||
|
<a
|
||||||
|
key={link.label}
|
||||||
|
href={link.href}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
className="flex items-center justify-between rounded-lg border px-4 py-3 text-sm hover:bg-accent"
|
||||||
|
>
|
||||||
|
<span className="font-medium">{link.label}</span>
|
||||||
|
<ExternalLink className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</a>
|
||||||
|
))}
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
|
||||||
{/* Service Grid */}
|
{/* Service Grid */}
|
||||||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
||||||
{data?.services.map(svc => (
|
{data?.services.map(svc => (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user