mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 05:43:58 +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>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { AlertCircle } from 'lucide-react'
|
|
|
|
import { ProjectUsageLoadingState } from 'components/layouts/ProjectLayout/LoadingState'
|
|
import InformationBox from 'components/ui/InformationBox'
|
|
import { useProjectLogRequestsCountQuery } from 'data/analytics/project-log-requests-count-query'
|
|
import { useProjectLogStatsQuery } from 'data/analytics/project-log-stats-query'
|
|
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
|
|
import ProjectUsage from './ProjectUsage'
|
|
|
|
export const ProjectUsageSection = () => {
|
|
const { data: project } = useSelectedProjectQuery()
|
|
const { error, isLoading } = useProjectLogRequestsCountQuery({ projectRef: project?.ref })
|
|
|
|
// wait for the stats to load before showing the usage section to eliminate multiple spinners
|
|
const { isLoading: isLogsStatsLoading } = useProjectLogStatsQuery({
|
|
projectRef: project?.ref,
|
|
interval: '1hr',
|
|
})
|
|
|
|
if (isLoading || isLogsStatsLoading) {
|
|
return <ProjectUsageLoadingState />
|
|
}
|
|
|
|
if (error) {
|
|
return (
|
|
<InformationBox
|
|
hideCollapse
|
|
defaultVisibility
|
|
icon={<AlertCircle size={18} strokeWidth={2} />}
|
|
title="There was an issue loading the usage details of your project"
|
|
/>
|
|
)
|
|
}
|
|
|
|
return <ProjectUsage />
|
|
}
|