3d99940658
Sandbox Deployment Platform — Go control plane + agents, NextJS dashboard, nginx reverse proxy. Cross-compile via Docker; deploy via sshpass to 172.18.136.92 (micro) and 172.18.139.186 (gateway). - control-plane: HTTP API, WS hub, SQLite (modernc.org/sqlite) for progress, .log files for log persistence - agent-micro / agent-gateway: alpine:3.20 + bind-mounted repo, binary exec'd in container, no Dockerfile build step - dashboard: NextJS static export + shadcn/ui components, single WebSocket hook - docker-compose.yml: three services on alpine:latest with docker socket bind for agents - scripts/: build.sh (golang:1.23-alpine cross-compile), deploy.sh, patch-nginx.sh (idempotent nginx splice), ssh wrappers Runtime model: pass-through Bitbucket creds per deploy, never logged or persisted on the agent. Control plane never touches git or docker directly — agents do all the work locally.
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import * as React from 'react'
|
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const badgeVariants = cva(
|
|
'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors',
|
|
{
|
|
variants: {
|
|
variant: {
|
|
default: 'border-transparent bg-primary text-primary-foreground shadow',
|
|
secondary: 'border-transparent bg-secondary text-secondary-foreground',
|
|
destructive: 'border-transparent bg-destructive text-destructive-foreground shadow',
|
|
outline: 'text-foreground',
|
|
success: 'border-transparent bg-emerald-500 text-white shadow',
|
|
warning: 'border-transparent bg-amber-500 text-white shadow',
|
|
},
|
|
},
|
|
defaultVariants: { variant: 'default' },
|
|
}
|
|
)
|
|
|
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
|
|
|
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
return <div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
}
|
|
|
|
export { Badge, badgeVariants }
|