mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 22:15:18 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import Link from 'next/link'
|
|
|
|
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
|
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
|
|
import { Badge, NavMenu, NavMenuItem } from 'ui'
|
|
|
|
type Props = {
|
|
active: 'pitr' | 'scheduled' | 'rtnp'
|
|
}
|
|
|
|
function DatabaseBackupsNav({ active }: Props) {
|
|
const { ref, cloud_provider } = useSelectedProjectQuery()?.data || {}
|
|
const { databaseRestoreToNewProject } = useIsFeatureEnabled(['database:restore_to_new_project'])
|
|
|
|
const navMenuItems = [
|
|
{
|
|
enabled: true,
|
|
id: 'scheduled',
|
|
label: 'Scheduled backups',
|
|
href: `/project/${ref}/database/backups/scheduled`,
|
|
},
|
|
{
|
|
enabled: true,
|
|
id: 'pitr',
|
|
label: 'Point in time',
|
|
href: `/project/${ref}/database/backups/pitr`,
|
|
},
|
|
{
|
|
enabled: databaseRestoreToNewProject && cloud_provider !== 'FLY',
|
|
id: 'rtnp',
|
|
label: (
|
|
<div className="flex items-center gap-2">
|
|
Restore to new project <Badge variant="warning">Beta</Badge>
|
|
</div>
|
|
),
|
|
href: `/project/${ref}/database/backups/restore-to-new-project`,
|
|
},
|
|
] as const
|
|
|
|
return (
|
|
<NavMenu className="overflow-hidden overflow-x-auto">
|
|
{navMenuItems.map(
|
|
(item) =>
|
|
item.enabled && (
|
|
<NavMenuItem key={item.id} active={item.id === active}>
|
|
<Link href={item.href}>{item.label}</Link>
|
|
</NavMenuItem>
|
|
)
|
|
)}
|
|
</NavMenu>
|
|
)
|
|
}
|
|
|
|
export default DatabaseBackupsNav
|