Fix Vitest suite and wire cloud/AWS dashboard API helpers.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Adds missing client methods, VPC seeder badges, hospice strain UI, and uiHelp drift keys so server/web builds and all 849 Vitest tests pass.
This commit is contained in:
@@ -276,6 +276,14 @@ export function contingencyDepthBadge(agent: Agent): { label: string; cls: strin
|
||||
return { label: `ONION ${depth}`, cls: depth >= 8 ? 'cn-contingency-deep' : 'cn-contingency' };
|
||||
}
|
||||
|
||||
/** AWS VPC seeder election — one primary seeder per vpc-id (or /24 fallback). */
|
||||
export function vpcSeederBadge(agent: Agent): { label: string; cls: string } | null {
|
||||
if (!agent.cloud_vpc_id?.trim()) return null;
|
||||
if (agent.vpc_primary_seeder) return { label: 'VPC seeder', cls: 'cn-vpc-seeder' };
|
||||
if (agent.fleet_role === 'seeder') return { label: 'VPC leecher', cls: 'cn-vpc-leecher' };
|
||||
return null;
|
||||
}
|
||||
|
||||
// ── Service helpers (T1007) ────────────────────────────────────────────────
|
||||
|
||||
// Human-readable label for well-known service names
|
||||
@@ -1207,6 +1215,11 @@ export default function CruciblePage() {
|
||||
{cb.label}
|
||||
</div>
|
||||
); })()}
|
||||
{(() => { const vb = vpcSeederBadge(a); return vb && (
|
||||
<div className={`cn-vpc ${vb.cls}`} title={`AWS VPC ${a.cloud_vpc_id}${a.cloud_region ? ` · ${a.cloud_region}` : ''}`}>
|
||||
{vb.label}
|
||||
</div>
|
||||
); })()}
|
||||
<RiskBadge findings={a.vuln_findings} />
|
||||
<div className={`cn-ssh ${ssh.cls}`}>{ssh.label}</div>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user