mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
0bf22ee6fc
workers -> compute <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the Compute experience for deploying, viewing, managing, and monitoring compute instances. - Added Compute navigation, instance detail pages, secrets, logs, deployment dialogs, generated snippets, and CLI commands. - Added filtering, status, availability, and data-loading support for compute instances. - **Updates** - Updated labels, icons, links, feature controls, unified logs, and secret-deletion messaging to use Compute terminology. - Compute routes now replace the previous Workers routes and pages. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
import { cn } from 'ui'
|
|
|
|
import { getComputeInstanceStateMeta } from './Compute.constants'
|
|
import type { ComputeInstance } from './Compute.types'
|
|
|
|
interface ComputeInstanceStatePillProps {
|
|
instance: ComputeInstance
|
|
className?: string
|
|
}
|
|
|
|
export const ComputeInstanceStatePill = ({
|
|
instance,
|
|
className,
|
|
}: ComputeInstanceStatePillProps) => {
|
|
const meta = getComputeInstanceStateMeta(instance)
|
|
const isPulsing = instance.buildState === 'building' || instance.isDeleting
|
|
|
|
return (
|
|
<span className={cn('inline-flex items-center gap-2', className)}>
|
|
<span className="relative flex h-2 w-2">
|
|
{isPulsing && (
|
|
<span
|
|
className={cn(
|
|
'absolute inline-flex h-full w-full animate-ping rounded-full opacity-75',
|
|
meta.dotClassName
|
|
)}
|
|
/>
|
|
)}
|
|
<span className={cn('relative inline-flex h-2 w-2 rounded-full', meta.dotClassName)} />
|
|
</span>
|
|
<span className={cn('text-sm', meta.textClassName)}>{meta.label}</span>
|
|
</span>
|
|
)
|
|
}
|