Skip to content

Commit 51bb268

Browse files
meyer9tobidae-cb
authored andcommitted
feat: hide machine info if unavailable (#120)
1 parent 00c2f6f commit 51bb268

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

report/src/components/MachineInfo.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,7 @@ const MachineInfo = ({ machineInfo }: MachineInfoProps) => {
2727
!machineInfo.region &&
2828
!machineInfo.fileSystem)
2929
) {
30-
return (
31-
<div className="bg-slate-50 rounded-lg p-4 border border-slate-200">
32-
<h3 className="text-sm font-semibold text-slate-700 mb-2">
33-
Machine Information
34-
</h3>
35-
<p className="text-sm text-slate-500">
36-
Machine information not available for this benchmark run.
37-
</p>
38-
</div>
39-
);
30+
return null;
4031
}
4132

4233
const providerUrl =

report/src/components/RunList.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -340,21 +340,9 @@ const RunList = ({
340340
{isExpanded && (
341341
<div className="mt-4">
342342
{/* Machine Information Section */}
343-
{section.runs.length > 0 && (
343+
{section.runs[0]?.machineInfo && (
344344
<div className="mb-6">
345-
{section.runs[0].machineInfo ? (
346-
<MachineInfo machineInfo={section.runs[0].machineInfo} />
347-
) : (
348-
<div className="bg-slate-50 rounded-lg p-4 border border-slate-200">
349-
<h3 className="text-sm font-semibold text-slate-700 mb-2">
350-
Machine Information
351-
</h3>
352-
<p className="text-sm text-slate-500">
353-
Machine information not available for this benchmark
354-
run.
355-
</p>
356-
</div>
357-
)}
345+
<MachineInfo machineInfo={section.runs[0]?.machineInfo} />
358346
</div>
359347
)}
360348
<table className="min-w-full">

0 commit comments

Comments
 (0)