import { AlertTitle } from '@ui/components/shadcn/ui/alert'
import { AlertCircle } from 'lucide-react'
import Link from 'next/link'
import { Alert, AlertDescription, Button } from 'ui'
import { DOCS_URL } from '@/lib/constants'
interface CPUWarningsProps {
hasAccessToComputeSizes: boolean
upgradeUrl: string
severity?: 'warning' | 'critical' | null
}
export const CPUWarnings = ({
hasAccessToComputeSizes,
upgradeUrl,
severity,
}: CPUWarningsProps) => {
if (severity === 'warning') {
return (
Your max CPU usage has exceeded 80%
High CPU usage could result in slower queries, disruption of daily back up routines, and
in rare cases, your instance may become unresponsive. If you need more resources, consider
upgrading to a larger compute add-on.
)
}
if (severity === 'critical') {
return (
Your max CPU usage has reached 100%
High CPU usage could result in slower queries, disruption of daily back up routines, and
in rare cases, your instance may become unresponsive. If you need more resources, consider
upgrading to a larger compute add-on.