|
|
@ -23,11 +23,17 @@ export const getAnvilSummary: RequestHandler<unknown, AnvilSummary> = async ( |
|
|
|
const { anvil_uuid: alist } = anvils; |
|
|
|
const { anvil_uuid: alist } = anvils; |
|
|
|
const result: AnvilSummary = { anvils: [] }; |
|
|
|
const result: AnvilSummary = { anvils: [] }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
for (const auuid of Object.keys(alist)) { |
|
|
|
for (const auuid of Object.keys(alist)) { |
|
|
|
result.anvils.push( |
|
|
|
result.anvils.push( |
|
|
|
await buildAnvilSummary({ anvils, anvilUuid: auuid, hosts }), |
|
|
|
await buildAnvilSummary({ anvils, anvilUuid: auuid, hosts }), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
stderr(`Failed to get summary of anvil nodes; CAUSE: ${error}`); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return response.status(500).send(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
response.json(result); |
|
|
|
response.json(result); |
|
|
|
}; |
|
|
|
}; |
|
|
|