mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-31 12:48:10 +00:00
fix(network-topology): harden with edge-case fixes, logging, and test coverage (#583)
* fix(network-topology): harden with edge-case fixes, logging, and test coverage Fixes stale data on node switch (topology now refreshes when active node changes), adds manual refresh button to toolbar, and guards against containers with empty Names arrays by falling back to a 12-char short ID. Adds operational and diagnostic logging around topology fetches, and introduces 25 unit tests covering happy paths, system network filtering, stack resolution, container deduplication, edge cases, and error handling. * docs: refresh screenshots
This commit is contained in:
@@ -5730,6 +5730,7 @@ app.get('/api/system/networks/topology', async (req: Request, res: Response) =>
|
||||
const knownStacks = await FileSystemService.getInstance(req.nodeId).getStacks();
|
||||
const dockerController = DockerController.getInstance(req.nodeId);
|
||||
const topology = await dockerController.getTopologyData(knownStacks, includeSystem);
|
||||
console.log(`[Resources] Topology fetched: ${topology.length} networks, includeSystem=${includeSystem}`);
|
||||
if (isDebugEnabled()) console.debug('[Resources:debug] Topology fetched', { networkCount: topology.length, includeSystem });
|
||||
res.json(topology);
|
||||
} catch (error: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user