feat: show agent/env counts in vendor tenant list
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
22
ui/src/pages/vendor/VendorTenantsPage.tsx
vendored
22
ui/src/pages/vendor/VendorTenantsPage.tsx
vendored
@@ -24,6 +24,10 @@ function statusColor(status: string): 'success' | 'error' | 'warning' | 'auto' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatUsage(used: number, limit: number): string {
|
||||||
|
return limit < 0 ? `${used} / ∞` : `${used} / ${limit}`;
|
||||||
|
}
|
||||||
|
|
||||||
const columns: Column<VendorTenantSummary>[] = [
|
const columns: Column<VendorTenantSummary>[] = [
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
@@ -52,6 +56,24 @@ const columns: Column<VendorTenantSummary>[] = [
|
|||||||
header: 'Server',
|
header: 'Server',
|
||||||
render: (_v, row) => <ServerStatusBadge state={row.serverState} />,
|
render: (_v, row) => <ServerStatusBadge state={row.serverState} />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'agentCount',
|
||||||
|
header: 'Agents',
|
||||||
|
render: (_v, row) => (
|
||||||
|
<span style={{ fontFamily: 'monospace', fontSize: '0.875rem' }}>
|
||||||
|
{formatUsage(row.agentCount, row.agentLimit)}
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'environmentCount',
|
||||||
|
header: 'Envs',
|
||||||
|
render: (_v, row) => (
|
||||||
|
<span style={{ fontFamily: 'monospace', fontSize: '0.875rem' }}>
|
||||||
|
{row.environmentCount}
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'licenseExpiry',
|
key: 'licenseExpiry',
|
||||||
header: 'License',
|
header: 'License',
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ export interface VendorTenantSummary {
|
|||||||
serverState: string;
|
serverState: string;
|
||||||
licenseExpiry: string | null;
|
licenseExpiry: string | null;
|
||||||
provisionError: string | null;
|
provisionError: string | null;
|
||||||
|
agentCount: number;
|
||||||
|
environmentCount: number;
|
||||||
|
agentLimit: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VendorTenantDetail {
|
export interface VendorTenantDetail {
|
||||||
|
|||||||
Reference in New Issue
Block a user