feat(route-optimizer): refactor bandwidth scoring and enhance speed display in UI for improved clarity
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m38s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m38s
This commit is contained in:
@@ -22,6 +22,13 @@ function fmtProb(v) {
|
||||
return typeof v === 'number' ? `${v}%` : '—';
|
||||
}
|
||||
|
||||
function fmtSpeed(dl, ul, fallback) {
|
||||
if (typeof dl === 'number' || typeof ul === 'number') {
|
||||
return `DL: ${dl ?? '—'} Mbps, UL: ${ul ?? '—'} Mbps`;
|
||||
}
|
||||
return `speed: ${fallback ?? '—'} Mbps`;
|
||||
}
|
||||
|
||||
const OPT_TABLE_STYLE = { tableLayout: 'fixed', width: '100%' };
|
||||
const OPT_COLS = ['24%', '20%', '22%', '18%', '16%'];
|
||||
|
||||
@@ -167,7 +174,7 @@ export default function RouteOptimizerPage() {
|
||||
<td className="fw-semibold text-break">{c.jumphost?.label || c.jumphost?.dns || c.jumphost?.ip || 'jumphost'}</td>
|
||||
<td className="small text-muted text-break">{c.interfaceName || '—'}</td>
|
||||
<td className="small text-muted text-break">
|
||||
ping: {c.pingMs ?? '—'} ms, speed: {c.speedMbps ?? '—'} Mbps
|
||||
ping: {c.pingMs ?? '—'} ms, {fmtSpeed(c.speedDownloadMbps, c.speedUploadMbps, c.speedMbps)}
|
||||
</td>
|
||||
<td className="small">
|
||||
{c.score} / {c.confidence}
|
||||
@@ -229,10 +236,18 @@ export default function RouteOptimizerPage() {
|
||||
<span className="fw-semibold">{r.exit?.label}</span>
|
||||
</td>
|
||||
<td className="small text-muted text-break">
|
||||
ping: {r.homeToJumphost?.pingMs ?? '—'} ms, speed: {r.homeToJumphost?.speedMbps ?? '—'} Mbps
|
||||
ping: {r.homeToJumphost?.pingMs ?? '—'} ms, {fmtSpeed(
|
||||
r.homeToJumphost?.speedDownloadMbps,
|
||||
r.homeToJumphost?.speedUploadMbps,
|
||||
r.homeToJumphost?.speedMbps
|
||||
)}
|
||||
</td>
|
||||
<td className="small text-muted text-break">
|
||||
ping: {r.jumphostToExit?.pingMs ?? '—'} ms, speed: {r.jumphostToExit?.speedMbps ?? '—'} Mbps
|
||||
ping: {r.jumphostToExit?.pingMs ?? '—'} ms, {fmtSpeed(
|
||||
r.jumphostToExit?.speedDownloadMbps,
|
||||
r.jumphostToExit?.speedUploadMbps,
|
||||
r.jumphostToExit?.speedMbps
|
||||
)}
|
||||
</td>
|
||||
<td className="small">{r.score} / {r.confidence ?? '—'}</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user