p3p pairs
This commit is contained in:
@@ -117,7 +117,7 @@ export default function App() {
|
||||
detailsPosition="right"
|
||||
details={['COE', 'P2P', 'P3P'].map((type) => {
|
||||
const typeStats = d.byType?.[type] ?? { completed: 0, total: 0 }
|
||||
return `${type}: ${typeStats.completed}/${typeStats.total}`
|
||||
return `${type}: ${typeStats.completed}/${typeStats.total} tests`
|
||||
})}
|
||||
/>
|
||||
<CompletionBar value={d.completionRate} />
|
||||
|
||||
@@ -196,7 +196,11 @@ export default function TestTable({ tests = [], allTests = [], isLoading }) {
|
||||
const pairs = parsePairArray(test.coe_pair)
|
||||
return pairs.length > 0 ? String(pairs.length) : null
|
||||
})()} colorClass="bg-cyan-900/50 text-cyan-300" />
|
||||
<TagPill label="File ID" value={test.test_id} />
|
||||
<TagPill label="P3P Pairs" value={(() => {
|
||||
const pairs = parsePairArray(test.p3p_pair)
|
||||
return pairs.length > 0 ? String(pairs.length) : null
|
||||
})()} colorClass="bg-orange-900/50 text-orange-300" />
|
||||
<TagPill label="Test ID" value={test.test_id} />
|
||||
<TagPill label="Type" value={test.interference} colorClass={TYPE_COLORS[test.interference]} />
|
||||
<TagPill label="Device" value={test.device} />
|
||||
<TagPill label="Rotation" value={test.rotation} />
|
||||
@@ -258,6 +262,94 @@ export default function TestTable({ tests = [], allTests = [], isLoading }) {
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div key={itemKey} className="border border-slate-700/70 rounded-md overflow-hidden">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => togglePairedExpand(test.id, pairKey)}
|
||||
className="w-full px-2.5 py-2 bg-slate-900/70 hover:bg-slate-800 transition-colors flex items-center justify-between gap-2 text-left"
|
||||
>
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
<span className="text-xs text-slate-500 select-none">{open ? '▾' : '▸'}</span>
|
||||
<span className="text-xs text-slate-200 truncate">{pairTest.filename ?? pairKey}</span>
|
||||
</div>
|
||||
<StatusBadge completed={pairTest.completed} />
|
||||
</button>
|
||||
|
||||
{open && (
|
||||
<div className="px-3 py-3 border-t border-slate-700/60 bg-slate-900/40">
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<TagPill label="File ID" value={pairTest.test_id} />
|
||||
<TagPill label="Type" value={pairTest.interference} colorClass={TYPE_COLORS[pairTest.interference]} />
|
||||
<TagPill label="Device" value={pairTest.device} />
|
||||
<TagPill label="Rotation" value={pairTest.rotation} />
|
||||
<TagPill label="Test Point" value={pairTest.test_point} />
|
||||
<TagPill label="RSSI" value={pairTest.rssi} />
|
||||
<TagPill label="Station" value={pairTest.station} />
|
||||
<TagPill label="Band" value={pairTest.band} />
|
||||
<TagPill label="Channel" value={pairTest.channel} />
|
||||
<TagPill label="Bandwidth" value={pairTest.bandwidth} />
|
||||
<TagPill label="Throttle" value={pairTest.throttled} />
|
||||
<TagPill label="Direction" value={pairTest.direction} />
|
||||
<TagPill label="Elapsed Time" value={fmtDuration(pairTest.duration_seconds)} />
|
||||
</div>
|
||||
{(() => {
|
||||
const rows = parseTputRows(pairTest.tput_results)
|
||||
if (!pairTest.completed || rows.length === 0) return null
|
||||
return (
|
||||
<div className="mt-3 pt-3 border-t border-slate-700/50">
|
||||
<table className="text-xs w-auto border-collapse">
|
||||
<thead>
|
||||
<tr className="text-slate-500 uppercase tracking-wide">
|
||||
<th className="pr-6 pb-1 text-left font-medium">Station</th>
|
||||
<th className="pr-6 pb-1 text-right font-medium">Throughput</th>
|
||||
<th className="pr-6 pb-1 text-right font-medium">DL RSSI</th>
|
||||
<th className="pb-1 text-right font-medium">UL RSSI</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{rows.map(r => (
|
||||
<tr key={`${pairTest.id}-${r.station}`} className="text-slate-300">
|
||||
<td className="pr-6 py-0.5 text-cyan-400 font-medium">STA{r.station}</td>
|
||||
<td className="pr-6 py-0.5 text-right">{r.tput} Mbps</td>
|
||||
<td className="pr-6 py-0.5 text-right">{r.dlRssi} dBm</td>
|
||||
<td className="py-0.5 text-right">{r.ulRssi} dBm</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)
|
||||
})()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})()}
|
||||
{(() => {
|
||||
const pairs = parsePairArray(test.p3p_pair)
|
||||
if (pairs.length === 0) return null
|
||||
return (
|
||||
<div className="mt-3 pt-3 border-t border-slate-700/50">
|
||||
<p className="text-[10px] uppercase tracking-wide text-slate-500 mb-2">Paired P3P Tests</p>
|
||||
<div className="flex flex-col gap-2">
|
||||
{pairs.map(pairKey => {
|
||||
const pairTest = testsByLookupKey.get(pairKey)
|
||||
const itemKey = `${test.id}-${pairKey}`
|
||||
const open = pairedExpanded.has(`${test.id}::${pairKey}`)
|
||||
|
||||
if (!pairTest) {
|
||||
return (
|
||||
<div key={itemKey} className="text-xs font-medium px-2.5 py-2 rounded bg-slate-800 text-slate-400">
|
||||
{pairKey}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div key={itemKey} className="border border-slate-700/70 rounded-md overflow-hidden">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user