|
| 1 | +import Link from 'next/link'; |
| 2 | +import { |
| 3 | + Card, |
| 4 | + CardContent, |
| 5 | + CardDescription, |
| 6 | + CardHeader, |
| 7 | + CardTitle, |
| 8 | +} from '@/components/ui/card'; |
| 9 | +import { Button } from '@/components/ui/button'; |
| 10 | +import { Route, Shield, Settings, BarChart3 } from 'lucide-react'; |
| 11 | + |
1 | 12 | export default function RouterDashboard() { |
2 | | - return <></>; |
| 13 | + return ( |
| 14 | + <div className="space-y-6"> |
| 15 | + <div> |
| 16 | + <h2 className="text-2xl font-bold tracking-tight">Router Dashboard</h2> |
| 17 | + <p className="text-muted-foreground"> |
| 18 | + Manage your router configuration, security, and monitor routes |
| 19 | + </p> |
| 20 | + </div> |
| 21 | + |
| 22 | + <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3"> |
| 23 | + <Card> |
| 24 | + <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"> |
| 25 | + <CardTitle className="text-sm font-medium"> |
| 26 | + Route Visualization |
| 27 | + </CardTitle> |
| 28 | + <BarChart3 className="h-4 w-4 text-muted-foreground" /> |
| 29 | + </CardHeader> |
| 30 | + <CardContent> |
| 31 | + <div className="text-2xl font-bold">Visualize</div> |
| 32 | + <p className="text-xs text-muted-foreground"> |
| 33 | + Interactive graph view of your routes and middlewares |
| 34 | + </p> |
| 35 | + <Button asChild className="mt-4 w-full"> |
| 36 | + <Link href="/router/vizualize"> |
| 37 | + <Route className="h-4 w-4 mr-2" /> |
| 38 | + View Routes |
| 39 | + </Link> |
| 40 | + </Button> |
| 41 | + </CardContent> |
| 42 | + </Card> |
| 43 | + |
| 44 | + <Card> |
| 45 | + <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"> |
| 46 | + <CardTitle className="text-sm font-medium"> |
| 47 | + Security Clients |
| 48 | + </CardTitle> |
| 49 | + <Shield className="h-4 w-4 text-muted-foreground" /> |
| 50 | + </CardHeader> |
| 51 | + <CardContent> |
| 52 | + <div className="text-2xl font-bold">Manage</div> |
| 53 | + <p className="text-xs text-muted-foreground"> |
| 54 | + Create and manage security clients for your applications |
| 55 | + </p> |
| 56 | + <Button asChild className="mt-4 w-full"> |
| 57 | + <Link href="/router/security"> |
| 58 | + <Shield className="h-4 w-4 mr-2" /> |
| 59 | + Security Clients |
| 60 | + </Link> |
| 61 | + </Button> |
| 62 | + </CardContent> |
| 63 | + </Card> |
| 64 | + |
| 65 | + <Card> |
| 66 | + <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"> |
| 67 | + <CardTitle className="text-sm font-medium"> |
| 68 | + Router Settings |
| 69 | + </CardTitle> |
| 70 | + <Settings className="h-4 w-4 text-muted-foreground" /> |
| 71 | + </CardHeader> |
| 72 | + <CardContent> |
| 73 | + <div className="text-2xl font-bold">Configure</div> |
| 74 | + <p className="text-xs text-muted-foreground"> |
| 75 | + Configure CORS, rate limiting, and transport settings |
| 76 | + </p> |
| 77 | + <Button asChild className="mt-4 w-full"> |
| 78 | + <Link href="/router/settings"> |
| 79 | + <Settings className="h-4 w-4 mr-2" /> |
| 80 | + Settings |
| 81 | + </Link> |
| 82 | + </Button> |
| 83 | + </CardContent> |
| 84 | + </Card> |
| 85 | + </div> |
| 86 | + |
| 87 | + <div className="grid gap-4 md:grid-cols-2"> |
| 88 | + <Card> |
| 89 | + <CardHeader> |
| 90 | + <CardTitle>Quick Actions</CardTitle> |
| 91 | + <CardDescription>Common router management tasks</CardDescription> |
| 92 | + </CardHeader> |
| 93 | + <CardContent className="space-y-2"> |
| 94 | + <Button asChild variant="outline" className="w-full justify-start"> |
| 95 | + <Link href="/router/vizualize"> |
| 96 | + <BarChart3 className="h-4 w-4 mr-2" /> |
| 97 | + View Route Graph |
| 98 | + </Link> |
| 99 | + </Button> |
| 100 | + <Button asChild variant="outline" className="w-full justify-start"> |
| 101 | + <Link href="/router/security"> |
| 102 | + <Shield className="h-4 w-4 mr-2" /> |
| 103 | + Manage Security Clients |
| 104 | + </Link> |
| 105 | + </Button> |
| 106 | + <Button asChild variant="outline" className="w-full justify-start"> |
| 107 | + <Link href="/router/settings"> |
| 108 | + <Settings className="h-4 w-4 mr-2" /> |
| 109 | + Configure Router |
| 110 | + </Link> |
| 111 | + </Button> |
| 112 | + </CardContent> |
| 113 | + </Card> |
| 114 | + |
| 115 | + <Card> |
| 116 | + <CardHeader> |
| 117 | + <CardTitle>Router Overview</CardTitle> |
| 118 | + <CardDescription> |
| 119 | + Key information about your router configuration |
| 120 | + </CardDescription> |
| 121 | + </CardHeader> |
| 122 | + <CardContent className="space-y-4"> |
| 123 | + <div className="flex items-center justify-between"> |
| 124 | + <span className="text-sm font-medium">Status</span> |
| 125 | + <span className="text-sm text-green-600">Active</span> |
| 126 | + </div> |
| 127 | + <div className="flex items-center justify-between"> |
| 128 | + <span className="text-sm font-medium">Transport Protocols</span> |
| 129 | + <span className="text-sm text-muted-foreground"> |
| 130 | + REST, GraphQL, WebSocket |
| 131 | + </span> |
| 132 | + </div> |
| 133 | + <div className="flex items-center justify-between"> |
| 134 | + <span className="text-sm font-medium">Security</span> |
| 135 | + <span className="text-sm text-muted-foreground"> |
| 136 | + Client validation enabled |
| 137 | + </span> |
| 138 | + </div> |
| 139 | + </CardContent> |
| 140 | + </Card> |
| 141 | + </div> |
| 142 | + </div> |
| 143 | + ); |
3 | 144 | } |
0 commit comments