Initial commit: Rampart v0.2.0
Multi-layer DDoS protection for Minecraft servers. - rampart-core: Edge node with XDP/eBPF + Rust L7 filtering - rampart-manager: REST API with JWT auth, Redis sync - rampart-cli: CLI tool for operators - velocity-plugin: Domain check, HMAC verify, server registry, load balancer - paper-plugin: Auto-registration, heartbeat, HMAC verify - dashboard: React + Vite web UI for management
This commit is contained in:
commit
cf9608ce5d
159 changed files with 15341 additions and 0 deletions
53
dashboard/src/components/Layout.tsx
Normal file
53
dashboard/src/components/Layout.tsx
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import { useState } from 'react'
|
||||
import { logout } from '../api'
|
||||
import Servers from './Servers'
|
||||
import Blacklist from './Blacklist'
|
||||
import Nodes from './Nodes'
|
||||
|
||||
type Page = 'servers' | 'blacklist' | 'nodes'
|
||||
|
||||
const navItems: { key: Page; label: string }[] = [
|
||||
{ key: 'servers', label: 'Servers' },
|
||||
{ key: 'blacklist', label: 'Blacklist' },
|
||||
{ key: 'nodes', label: 'Nodes' },
|
||||
]
|
||||
|
||||
function Layout() {
|
||||
const [page, setPage] = useState<Page>('servers')
|
||||
|
||||
function renderPage() {
|
||||
switch (page) {
|
||||
case 'servers':
|
||||
return <Servers />
|
||||
case 'blacklist':
|
||||
return <Blacklist />
|
||||
case 'nodes':
|
||||
return <Nodes />
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="layout">
|
||||
<aside className="sidebar">
|
||||
<h2>Rampart Manager</h2>
|
||||
<nav>
|
||||
{navItems.map((item) => (
|
||||
<button
|
||||
key={item.key}
|
||||
className={page === item.key ? 'active' : ''}
|
||||
onClick={() => setPage(item.key)}
|
||||
>
|
||||
{item.label}
|
||||
</button>
|
||||
))}
|
||||
</nav>
|
||||
<button className="logout-btn" onClick={logout}>
|
||||
Logout
|
||||
</button>
|
||||
</aside>
|
||||
<main className="main-content">{renderPage()}</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Layout
|
||||
Loading…
Add table
Add a link
Reference in a new issue