add go bench client

This commit is contained in:
Gilles Soulier
2026-01-11 23:41:30 +01:00
parent c67befc549
commit 6abc70cdfe
80 changed files with 13311 additions and 61 deletions

View File

@@ -91,36 +91,8 @@ function renderDeviceHeader() {
function renderMotherboardDetails() {
const snapshot = currentDevice.last_hardware_snapshot;
const container = document.getElementById('motherboardDetails');
if (!snapshot) {
container.innerHTML = '<p style="color: var(--text-muted);">Aucune information disponible</p>';
return;
}
// Helper to clean empty/whitespace-only strings
const cleanValue = (val) => {
if (!val || (typeof val === 'string' && val.trim() === '')) return 'N/A';
return val;
};
const items = [
{ label: 'Fabricant', value: cleanValue(snapshot.motherboard_vendor) },
{ label: 'Modèle', value: cleanValue(snapshot.motherboard_model) },
{ label: 'Version BIOS', value: cleanValue(snapshot.bios_version) },
{ label: 'Date BIOS', value: cleanValue(snapshot.bios_date) },
{ label: 'Slots RAM', value: `${snapshot.ram_slots_used || '?'} utilisés / ${snapshot.ram_slots_total || '?'} total` }
];
container.innerHTML = `
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;">
${items.map(item => `
<div class="hardware-item">
<div class="hardware-item-label">${item.label}</div>
<div class="hardware-item-value">${escapeHtml(String(item.value))}</div>
</div>
`).join('')}
</div>
`;
if (!container) return;
container.innerHTML = HardwareRenderer.renderMotherboardDetails(snapshot);
}
// Render CPU Details
@@ -279,7 +251,10 @@ function renderStorageDetails() {
html += '<div style="display: grid; gap: 1rem;">';
devices.forEach(disk => {
const typeIcon = disk.type === 'SSD' ? '💾' : '💿';
const diskType = (disk.type || '').toString().toLowerCase();
const diskInterface = (disk.interface || '').toString().toLowerCase();
const isSsd = diskType === 'ssd' || diskType === 'nvme' || diskInterface === 'nvme';
const typeIcon = isSsd ? '💾' : '💿';
const healthColor = disk.smart_health === 'PASSED' ? 'var(--color-success)' :
disk.smart_health === 'FAILED' ? 'var(--color-danger)' :
'var(--text-secondary)';
@@ -318,7 +293,7 @@ function renderStorageDetails() {
<strong>Interface:</strong> ${escapeHtml(disk.interface)}
</div>
` : ''}
${disk.temperature_c ? `
${(disk.temperature_c !== null && disk.temperature_c !== undefined) ? `
<div>
<strong>Température:</strong> ${disk.temperature_c}°C
</div>