fix(api): сохранять достоверные параметры рекурсивных маршрутов

This commit is contained in:
Denozordec committed 2026-09-30 22:08:22 +07:00
1 parent 50fad3ac80
commit 54ef752a5b
17 files changed
+198 -45

No files matched your search

@@ -85,8 +85,8 @@ function RouteGroupExpandedDetail({ group }: { group: RecursiveRouteGroup }) {
<div key={ep.id} className="rounded-lg border border-border bg-background px-4 py-3">
<div className="flex items-center justify-between">
<div className="flex items-center gap-1.5">
{(ep.country || inferCountry(ep.gateway)) && (
<Flag code={ep.country || inferCountry(ep.gateway) || ""} size={16} />
{ep.country && (
<Flag code={ep.country} size={16} />
)}
<span className="text-[11px] font-semibold text-muted-foreground uppercase tracking-wide">
Endpoint {idx + 1}
@@ -99,6 +99,7 @@ function RouteGroupExpandedDetail({ group }: { group: RecursiveRouteGroup }) {
<span>scope: {ep.scope ?? "—"}</span>
<span>t.scope: {ep.targetScope ?? "—"}</span>
<span>check: {ep.checkGateway || "—"}</span>
{ep.disabled && <span>Отключён</span>}
</div>
</div>
))}
@@ -176,14 +177,14 @@ function RecursiveRoutesDataGrid({
const sorted = [...row.original.endpoints].sort((a, b) => a.distance - b.distance)
return (
<div className="flex flex-col gap-0.5">
{sorted.map((ep, idx) => {
const code = ep.country || inferCountry(ep.gateway)
{sorted.map(ep => {
const code = ep.country
return (
<div key={ep.id} className="flex items-center gap-1.5 text-[11px] font-mono">
<span
<span aria-hidden="true"
className={cn(
"size-1.5 rounded-full shrink-0",
idx === 0 ? "bg-emerald-500" : "bg-sky-500",
ep.disabled ? "bg-muted-foreground" : "bg-info",
)}
/>
{code ? (