feat: génération de rapport Markdown d'exécution
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// server/services/report.ts
|
||||
import type { ExecutionResult } from "@shared/types.js";
|
||||
|
||||
export function buildReportMarkdown(exec: ExecutionResult, machineName: string): string {
|
||||
const lines = exec.importantLogLines.map((l) => ` ${l}`).join("\n");
|
||||
return `# Rapport d'exécution — ${machineName}
|
||||
|
||||
- Exécution : ${exec.executionId}
|
||||
- Action : ${exec.action}
|
||||
- Statut : ${exec.status}
|
||||
- Début : ${exec.startedAt}
|
||||
- Fin : ${exec.finishedAt}
|
||||
- Redémarrage requis : ${exec.rebootRequiredAfterRun ? "oui" : "non"}
|
||||
|
||||
## Lignes importantes
|
||||
|
||||
\`\`\`
|
||||
${lines || " (aucune)"}
|
||||
\`\`\`
|
||||
|
||||
## Log brut
|
||||
|
||||
Référence : \`${exec.rawLogRef}\`
|
||||
`;
|
||||
}
|
||||
Reference in New Issue
Block a user