ff9cfaa9e1
- table schedules (migration 0007) + service scheduler (croner) : CRUD, runSchedule avec scope (all/liste), pool de concurrence et verrou par machine, mapping actions → refresh/metrics/docker_scan ; reloadSchedules au boot - worker = reloadSchedules (remplace le refresh 30 min en dur) - routes /api/schedules (CRUD + :id/run) ; cron invalide rejeté (validation croner) - UI Paramètres : onglet « Automatisations » (liste, activer/lancer/supprimer, création) tsc 0 · 113 tests · build OK · boot OK (migration 0007, CRUD vérifié). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
// server/routes/index.ts
|
|
import { Hono } from "hono";
|
|
import { machinesRoutes } from "./machines.js";
|
|
import { actionsRoutes } from "./actions.js";
|
|
import { actionRequestsRoutes } from "./actionRequests.js";
|
|
import { dockerRoutes } from "./docker.js";
|
|
import { dbRoutes } from "./db.js";
|
|
import { settingsRoutes } from "./settings.js";
|
|
import { postInstallRoutes } from "./postInstall.js";
|
|
import { schedulesRoutes } from "./schedules.js";
|
|
import { getServerCapabilities } from "../services/capabilities.js";
|
|
import { getSystemMetrics, getSystemStatus } from "../services/system.js";
|
|
|
|
export const api = new Hono();
|
|
api.get("/capabilities", (c) => c.json(getServerCapabilities()));
|
|
api.get("/system/status", (c) => c.json(getSystemStatus()));
|
|
api.get("/system/metrics", (c) => c.json(getSystemMetrics()));
|
|
api.route("/system/db", dbRoutes);
|
|
api.route("/settings", settingsRoutes);
|
|
api.route("/schedules", schedulesRoutes);
|
|
api.route("/machines", machinesRoutes);
|
|
api.route("/machines", actionsRoutes);
|
|
api.route("/machines", dockerRoutes);
|
|
api.route("/", actionRequestsRoutes);
|
|
api.route("/", postInstallRoutes);
|