diff --git a/fe-app-podkop/src/podkop/methods/getDashboardSections.ts b/fe-app-podkop/src/podkop/methods/getDashboardSections.ts index 6507775..e9244e9 100644 --- a/fe-app-podkop/src/podkop/methods/getDashboardSections.ts +++ b/fe-app-podkop/src/podkop/methods/getDashboardSections.ts @@ -61,6 +61,11 @@ export async function getDashboardSections(): Promise proxy.code === `${section['.name']}-out`, ); + const parsedOutbound = JSON.parse(section.outbound_json); + const parsedTag = parsedOutbound?.tag ? decodeURIComponent(parsedOutbound?.tag) : undefined; + const proxyDisplayName = parsedTag || outbound?.value?.name || '' + + return { withTagSelect: false, code: outbound?.code || section['.name'], @@ -68,10 +73,7 @@ export async function getDashboardSections(): Promise proxy.code === `${section[".name"]}-out` ); + const parsedOutbound = JSON.parse(section.outbound_json); + const parsedTag = parsedOutbound?.tag ? decodeURIComponent(parsedOutbound?.tag) : void 0; + const proxyDisplayName = parsedTag || outbound?.value?.name || ""; return { withTagSelect: false, code: outbound?.code || section[".name"], @@ -932,7 +935,7 @@ async function getDashboardSections() { outbounds: [ { code: outbound?.code || section[".name"], - displayName: decodeURIComponent(JSON.parse(section.outbound_json)?.tag) || outbound?.value?.name || "", + displayName: proxyDisplayName, latency: outbound?.value?.history?.[0]?.delay || 0, type: outbound?.value?.type || "", selected: true