merge: maestro/tsk_lDx6zd-EbA00 [指标统计:执行时长 / 成功率 / 额度消耗估算]
# Conflicts: # web/style.css
This commit is contained in:
@@ -155,6 +155,13 @@ export function buildServer(opts: ApiOptions): FastifyInstance {
|
||||
return store.nextExecutable(id) ?? { next: null };
|
||||
});
|
||||
|
||||
// ---------- Metrics(健康度 + 成本聚合)----------
|
||||
// GET /api/metrics?project=<id>;不带 project = 全部项目聚合。
|
||||
app.get('/api/metrics', (req) => {
|
||||
const q = req.query as { project?: string };
|
||||
return store.metrics(q.project && q.project.trim() ? q.project.trim() : undefined);
|
||||
});
|
||||
|
||||
// ---------- Tasks ----------
|
||||
app.post('/api/projects/:id/tasks', (req) => {
|
||||
const { id } = req.params as { id: string };
|
||||
|
||||
Reference in New Issue
Block a user