feat(route-optimizer): add country and interface name display in route optimization UI
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m33s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m33s
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
} from '@tabler/icons-react';
|
||||
import api from './lib/api.js';
|
||||
import PageHeader from './components/PageHeader.jsx';
|
||||
import { countryToFlag } from './utils/serverUtils.js';
|
||||
|
||||
function MetricBadge({ label, value, tone = 'secondary' }) {
|
||||
return (
|
||||
@@ -237,6 +238,12 @@ export default function RouteOptimizerPage() {
|
||||
{r.current.distance != null ? ` (dist ${r.current.distance})` : ''}
|
||||
</div>
|
||||
)}
|
||||
{(r.current?.interfaceName || r.current?.exit?.country) && (
|
||||
<div className="text-muted">
|
||||
{r.current?.exit?.country ? `${countryToFlag(r.current.exit.country)} ` : ''}
|
||||
{r.current?.interfaceName ? `iface: ${r.current.interfaceName}` : ''}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
<td className="small">
|
||||
<div>{r.recommended?.gateway || '—'}</div>
|
||||
@@ -246,6 +253,12 @@ export default function RouteOptimizerPage() {
|
||||
{r.recommended.distance != null ? ` (dist ${r.recommended.distance})` : ''}
|
||||
</div>
|
||||
)}
|
||||
{(r.recommended?.interfaceName || r.recommended?.exit?.country) && (
|
||||
<div className="text-muted">
|
||||
{r.recommended?.exit?.country ? `${countryToFlag(r.recommended.exit.country)} ` : ''}
|
||||
{r.recommended?.interfaceName ? `iface: ${r.recommended.interfaceName}` : ''}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
<td className="small">
|
||||
{fmtProb(r.current?.probabilityOptimal)} / {fmtProb(r.recommended?.probabilityOptimal)}
|
||||
|
||||
Reference in New Issue
Block a user