From b2ce0ab6985bc707229da883fec956768bca1baa Mon Sep 17 00:00:00 2001 From: pnoker Date: Tue, 6 Oct 2026 13:47:10 +0800 Subject: [PATCH] fix(cli): point dashboard topology at the manager route the topology endpoint lives in the manager dashboard controller (GET /manager/dashboard/topology), not the data center the cli was calling, so every invocation returned 404. Co-Authored-By: Claude Code --- dc3-cli/src/commands/dashboard.ts | 2 +- dc3-cli/test/dashboard.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dc3-cli/src/commands/dashboard.ts b/dc3-cli/src/commands/dashboard.ts index f0e440782..384165c71 100644 --- a/dc3-cli/src/commands/dashboard.ts +++ b/dc3-cli/src/commands/dashboard.ts @@ -113,7 +113,7 @@ export function registerDashboardCommand(program: Command): void { .action(async (opts: { mode: string; format?: string }) => { const format = detectFormat(opts.format); const result = await dc3Client.get( - withQuery('/api/v3/data/dashboard/topology', { mode: opts.mode }), + withQuery('/api/v3/manager/dashboard/topology', { mode: opts.mode }), ); printAndExit(result, format); }); diff --git a/dc3-cli/test/dashboard.test.ts b/dc3-cli/test/dashboard.test.ts index 2439cff3b..c1415c626 100644 --- a/dc3-cli/test/dashboard.test.ts +++ b/dc3-cli/test/dashboard.test.ts @@ -148,12 +148,12 @@ describe('dashboard command group', () => { it('topology applies the default cardinality mode', async () => { await run(['dashboard', 'topology']); - expect(fetchCalls[0].url).toBe('http://gw.test/api/v3/data/dashboard/topology?mode=cardinality'); + expect(fetchCalls[0].url).toBe('http://gw.test/api/v3/manager/dashboard/topology?mode=cardinality'); }); it('topology accepts the volume mode and rejects unknown modes (F017)', async () => { await run(['dashboard', 'topology', '--mode', 'volume']); - expect(fetchCalls[0].url).toBe('http://gw.test/api/v3/data/dashboard/topology?mode=volume'); + expect(fetchCalls[0].url).toBe('http://gw.test/api/v3/manager/dashboard/topology?mode=volume'); const { err } = await runCapture(['dashboard', 'topology', '--mode', 'volume&evil=1']); expect(err).toBeInstanceOf(Error);