feat(probe): sonde enrichie CPU/RAM/disques + recommandations de profils (tâche 4)

- template machine-probe : lscpu Model name + nproc, MemTotal, lsblk disques
- parseProbe étendu (cpuModel/cpuCores/memoryBytes/disks) + buildRecommendations
  (KVM/QEMU → vm_guest_tools) ; tests TDD
- runProbe persiste cpu/mem/disks dans machine_hardware ; /probe renvoie recommendations
- popup Sonde affiche cpu/ram/disks + profils conseillés

tsc 0 · 110 tests · build OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 18:36:49 +02:00
parent c390addadb
commit e3e824185f
6 changed files with 123 additions and 14 deletions
@@ -296,10 +296,24 @@ function MachineConfigPopup({
{probe.probe.isProxmox ? " · proxmox" : ""}
{probe.probe.isRpi ? " · rpi" : ""}
</div>
{(probe.probe.cpuModel || probe.probe.memoryBytes) && (
<div className="mono cfg-facts">
cpu={probe.probe.cpuModel ?? "?"} ({probe.probe.cpuCores ?? "?"}c) · ram=
{probe.probe.memoryBytes ? `${(probe.probe.memoryBytes / 1e9).toFixed(1)} Go` : "?"} · disks=
{probe.probe.disks.length}
</div>
)}
<div className="cfg-proposal mono">
proposition : os_family={probe.proposal.osFamily} · machine_kind={probe.proposal.machineKind} · virt=
{probe.proposal.virtualization}
</div>
{probe.recommendations.length > 0 && (
<ul className="cfg-changes">
{probe.recommendations.map((r, i) => (
<li key={i} className="mono"> profil conseillé : {r.profileId} {r.reason}</li>
))}
</ul>
)}
{probe.changes.length ? (
<>
<ul className="cfg-changes">
+5
View File
@@ -208,8 +208,13 @@ export interface ProbeResultView {
isRpi: boolean;
gpus: string[];
net: { iface: string; addr: string }[];
cpuModel: string | null;
cpuCores: number | null;
memoryBytes: number | null;
disks: { name: string; sizeBytes: number }[];
};
proposal: { osFamily: OsFamily; machineKind: MachineKind; virtualization: string };
recommendations: { profileId: string; reason: string }[];
changes: string[];
}