feat: vendor console — tenant list, create wizard, detail page
Implements Task 9: shared components (ServerStatusBadge, UsageIndicator, platform.module.css, tierColor utility) and full vendor console pages (VendorTenantsPage, CreateTenantPage, TenantDetailPage). Build passes cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17
ui/src/components/ServerStatusBadge.tsx
Normal file
17
ui/src/components/ServerStatusBadge.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Badge } from '@cameleer/design-system';
|
||||
|
||||
interface Props {
|
||||
state: string;
|
||||
}
|
||||
|
||||
const config: Record<string, { color: 'success' | 'error' | 'warning' | 'auto'; label: string }> = {
|
||||
RUNNING: { color: 'success', label: 'Running' },
|
||||
STOPPED: { color: 'error', label: 'Stopped' },
|
||||
NOT_FOUND: { color: 'auto', label: 'No Server' },
|
||||
ERROR: { color: 'error', label: 'Error' },
|
||||
};
|
||||
|
||||
export function ServerStatusBadge({ state }: Props) {
|
||||
const c = config[state] ?? { color: 'auto' as const, label: state };
|
||||
return <Badge color={c.color} label={c.label} />;
|
||||
}
|
||||
Reference in New Issue
Block a user