fix(ui): открывать GRE-туннель с контекстом сервера
This commit is contained in:
1 parent
6c8e66693b
commit
67a152b7c8
7 files changed
+188
-14
No files matched your search
@@ -208,10 +208,10 @@ function sumSeries(rows: TrafficServerRow[], key: "rxSeries" | "txSeries"): numb
|
||||
|
||||
function mockOverlayItems(): OverlayItem[] {
|
||||
const gre: OverlayItem[] = mockGreTunnels.map((t) => ({
|
||||
id: `gre-${t.id}`,
|
||||
id: JSON.stringify(["gre", t.serverId, t.id]),
|
||||
name: t.name,
|
||||
kind: "gre",
|
||||
href: "/gre",
|
||||
href: "/gre?server=" + encodeURIComponent(t.serverId) + "&tunnel=" + encodeURIComponent(t.id),
|
||||
status: t.status,
|
||||
}))
|
||||
const wg: OverlayItem[] = mockServers.flatMap((s) =>
|
||||
@@ -320,10 +320,10 @@ export function useDashboardLive() {
|
||||
const greItems: OverlayItem[] =
|
||||
greRes.status === "fulfilled"
|
||||
? (greRes.value.tunnels ?? []).map((t) => ({
|
||||
id: `gre-${t.id}`,
|
||||
id: JSON.stringify(["gre", t.serverId, t.id]),
|
||||
name: t.name,
|
||||
kind: "gre" as const,
|
||||
href: "/gre",
|
||||
href: "/gre?server=" + encodeURIComponent(t.serverId) + "&tunnel=" + encodeURIComponent(t.id),
|
||||
status: t.status,
|
||||
}))
|
||||
: []
|
||||
|
||||
Reference in new issue
Block a user