Files
supabase/apps/studio/components/interfaces/DiskManagement/DiskManagementPlanUpgradeRequired.tsx
Joshen LimandKevin Grüneberg bcb847bbbb Chore/update rr pricing for new disk mgt (#29278)
* Update pricing details in DeployNewReplicaPanel

* Update disk mgt review modal to consider RR pricing

* Update tests

* Hide utilization bar for read replicas in new disk mgt ui

* Add guard

* Update link to docs for deploy replica panel

* Address feedback

* Ensure IOPS and throughput prices are considered for replicas

* Prettier

* Attempt to fix tests

* Attempt to fix tests

* Fix calculateDiskSizePrice for replicas

* Fixes

* Prettier

* Add ternary

* Feeeex

* Various small updates from Kevin's feedback

* smol stuff

* fixes

* Update DiskManagementPanelSchema.ts

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-09-18 18:38:58 +08:00

45 lines
1.4 KiB
TypeScript

import { AnimatePresence, motion } from 'framer-motion'
import Link from 'next/link'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
import {
Alert_Shadcn_ as Alert,
AlertDescription_Shadcn_ as AlertDescription,
AlertTitle_Shadcn_ as AlertTitle,
buttonVariants,
cn,
InfoIcon,
} from 'ui'
export function DiskManagementPlanUpgradeRequired() {
const org = useSelectedOrganization()
return (
<AnimatePresence>
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
transition={{ duration: 0.2 }}
>
<Alert variant="default" className="px-6 py-4 rounded-none [&_svg]:left-8 pl-10">
<InfoIcon className="w-4 h-4" />
<AlertTitle>Disable spend cap to manage your disk</AlertTitle>
<AlertDescription>
To access advanced disk management features, you need to disable your spend cap. These
features offer more flexibility and control over your database disk size.
</AlertDescription>
<div className="mt-3">
<Link
href={`/org/${org?.slug}/billing?panel=costControl`}
className={cn(buttonVariants({ type: 'default', size: 'tiny' }))}
>
Disable spend cap
</Link>
</div>
</Alert>
</motion.div>
</AnimatePresence>
)
}