+ {group.data.slice(0, 10).map((h: any, i: number) => {
+ const val = Number(h[group.key] || 0);
+ const barPct = Math.min(val, 100);
+ const barColor = val > 85 ? 'bg-red-500' : val > 60 ? 'bg-amber-500' : 'bg-emerald-500';
+ const dotColor = i < 3 ? (i === 0 ? 'text-red-400' : i === 1 ? 'text-amber-400' : 'text-orange-400') : 'text-slate-500';
+ return (
+
+
+ {i === 0 ? '🥇' : i === 1 ? '🥈' : i === 2 ? '🥉' : `${i + 1}`}
+
+
+ {h.hostname}
+
+
+
{val.toFixed(1)}{group.unit}
+
+ );
+ })}
+