mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
- Fix OAuth login to use per-brand IAM endpoints (lux.id, hanzo.id, zoo.id, iam.bootno.de) - Correct Casdoor client IDs to match init_data.json - Add NEXT_PUBLIC_IAM_* env var overrides for K8s chart values - Centralize getApiUrl() and getAuthHeaders() in lib/api.ts - Replace emoji chain icons with real PNG logos from Lux exchange - Add developer workbench component to dashboard layout - Add network monitoring, billing, and infrastructure pages
187 lines
5.2 KiB
TypeScript
187 lines
5.2 KiB
TypeScript
import type { LucideIcon } from "lucide-react"
|
|
import {
|
|
Activity,
|
|
BarChart3,
|
|
Building,
|
|
Coins,
|
|
CreditCard,
|
|
Database,
|
|
FolderKanban,
|
|
Globe,
|
|
HeartPulse,
|
|
Home,
|
|
Key,
|
|
Layers,
|
|
Network,
|
|
Settings,
|
|
Shield,
|
|
Wallet,
|
|
Webhook,
|
|
} from "lucide-react"
|
|
|
|
export interface DashboardNavigationItem {
|
|
name: string
|
|
href: string
|
|
icon: LucideIcon
|
|
description?: string
|
|
children?: DashboardNavigationItem[]
|
|
}
|
|
|
|
export const DASHBOARD_NAVIGATION: DashboardNavigationItem[] = [
|
|
{
|
|
name: "Overview",
|
|
href: "/dashboard",
|
|
icon: Home,
|
|
description: "Command center and quick actions",
|
|
},
|
|
{
|
|
name: "Infrastructure",
|
|
href: "/dashboard/infrastructure",
|
|
icon: Database,
|
|
description: "Deploy and monitor node infrastructure",
|
|
children: [
|
|
{ name: "Nodes", href: "/dashboard/infrastructure/nodes", icon: Globe },
|
|
{ name: "Networks", href: "/dashboard/infrastructure/networks", icon: Network },
|
|
{ name: "Clusters", href: "/dashboard/infrastructure/clusters", icon: Layers },
|
|
{ name: "Storage", href: "/dashboard/infrastructure/storage", icon: Database },
|
|
{ name: "Volumes", href: "/dashboard/infrastructure/volumes", icon: FolderKanban },
|
|
],
|
|
},
|
|
{
|
|
name: "Monitoring",
|
|
href: "/dashboard/monitoring",
|
|
icon: HeartPulse,
|
|
description: "Health checks, alerts, and service monitoring",
|
|
},
|
|
{
|
|
name: "Analytics",
|
|
href: "/dashboard/analytics",
|
|
icon: BarChart3,
|
|
description: "Usage, performance, and chain-level telemetry",
|
|
children: [
|
|
{ name: "Analytics", href: "/dashboard/analytics", icon: Activity },
|
|
{ name: "Usage", href: "/dashboard/usage", icon: Activity },
|
|
{ name: "Markets", href: "/dashboard/markets", icon: Coins },
|
|
{ name: "Gas", href: "/dashboard/gas", icon: Activity },
|
|
],
|
|
},
|
|
{
|
|
name: "Developer",
|
|
href: "/dashboard/api-keys",
|
|
icon: Key,
|
|
description: "Access credentials and event integrations",
|
|
children: [
|
|
{ name: "API Keys", href: "/dashboard/api-keys", icon: Key },
|
|
{ name: "Webhooks", href: "/dashboard/webhooks", icon: Webhook },
|
|
],
|
|
},
|
|
{
|
|
name: "Assets",
|
|
href: "/dashboard/assets",
|
|
icon: Wallet,
|
|
description: "Wallets, staking, and digital asset controls",
|
|
children: [
|
|
{ name: "Assets", href: "/dashboard/assets", icon: Coins },
|
|
{ name: "Wallets", href: "/dashboard/wallets", icon: Wallet },
|
|
{ name: "Staking", href: "/dashboard/staking", icon: Coins },
|
|
],
|
|
},
|
|
{
|
|
name: "Organization",
|
|
href: "/dashboard/organization",
|
|
icon: Building,
|
|
description: "Team, settings, and enterprise controls",
|
|
children: [
|
|
{ name: "Overview", href: "/dashboard/organization", icon: Building },
|
|
{ name: "Team", href: "/dashboard/organization/team", icon: Building },
|
|
{ name: "Settings", href: "/dashboard/organization/settings", icon: Settings },
|
|
{ name: "Billing", href: "/dashboard/organization/billing", icon: CreditCard },
|
|
],
|
|
},
|
|
]
|
|
|
|
export const DASHBOARD_ADMIN_NAVIGATION: DashboardNavigationItem[] = [
|
|
{
|
|
name: "Admin",
|
|
href: "/admin",
|
|
icon: Shield,
|
|
description: "Platform administration",
|
|
},
|
|
]
|
|
|
|
export interface DashboardCommandItem {
|
|
id: string
|
|
title: string
|
|
description: string
|
|
href: string
|
|
section: "Navigation" | "Actions"
|
|
keywords: string[]
|
|
}
|
|
|
|
export function buildCommandItems(): DashboardCommandItem[] {
|
|
const navigationItems: DashboardCommandItem[] = []
|
|
|
|
DASHBOARD_NAVIGATION.forEach((item) => {
|
|
navigationItems.push({
|
|
id: item.href,
|
|
title: item.name,
|
|
description: item.description || "",
|
|
href: item.href,
|
|
section: "Navigation",
|
|
keywords: [item.name.toLowerCase(), item.href],
|
|
})
|
|
|
|
item.children?.forEach((child) => {
|
|
navigationItems.push({
|
|
id: child.href,
|
|
title: `${item.name} ยท ${child.name}`,
|
|
description: child.description || item.description || "",
|
|
href: child.href,
|
|
section: "Navigation",
|
|
keywords: [
|
|
item.name.toLowerCase(),
|
|
child.name.toLowerCase(),
|
|
child.href,
|
|
],
|
|
})
|
|
})
|
|
})
|
|
|
|
navigationItems.push(
|
|
{
|
|
id: "deploy-node",
|
|
title: "Deploy New Node",
|
|
description: "Open node deploy experience with chain onboarding",
|
|
href: "/dashboard/infrastructure/nodes?deploy=1",
|
|
section: "Actions",
|
|
keywords: ["deploy", "node", "chain", "infrastructure"],
|
|
},
|
|
{
|
|
id: "open-billing",
|
|
title: "Open Billing Workspace",
|
|
description: "Business info, payment methods, invoices, tax and compliance",
|
|
href: "/dashboard/organization/billing",
|
|
section: "Actions",
|
|
keywords: ["billing", "invoice", "tax", "compliance", "payment"],
|
|
},
|
|
{
|
|
id: "new-api-key",
|
|
title: "Create API Key",
|
|
description: "Manage and rotate API credentials",
|
|
href: "/dashboard/api-keys?new=1",
|
|
section: "Actions",
|
|
keywords: ["api", "key", "credential"],
|
|
},
|
|
{
|
|
id: "new-webhook",
|
|
title: "Create Webhook",
|
|
description: "Add webhook destination for chain events",
|
|
href: "/dashboard/webhooks?new=1",
|
|
section: "Actions",
|
|
keywords: ["webhook", "event", "integration"],
|
|
}
|
|
)
|
|
|
|
return navigationItems
|
|
}
|