From eb2a9ff02645931c714b34773a6e05ba16a609eb Mon Sep 17 00:00:00 2001 From: Morgan Martinet Date: Tue, 28 Dec 2021 10:27:21 -0500 Subject: [PATCH] remove unnecessary code after code review Signed-off-by: Morgan Martinet --- .../kubernetes/src/utils/clusterLinks/formatters/gke.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/plugins/kubernetes/src/utils/clusterLinks/formatters/gke.ts b/plugins/kubernetes/src/utils/clusterLinks/formatters/gke.ts index 1dbeb2872e..957032e6e2 100644 --- a/plugins/kubernetes/src/utils/clusterLinks/formatters/gke.ts +++ b/plugins/kubernetes/src/utils/clusterLinks/formatters/gke.ts @@ -51,13 +51,6 @@ export function gkeFormatter(options: ClusterLinksFormatterOptions): URL { options.object.metadata?.namespace ?? '', ); const validKind = kindMappings[options.kind.toLocaleLowerCase('en-US')]; - if (!basePath.pathname.endsWith('/')) { - // a dashboard url with a path should end with a slash otherwise - // the new combined URL will replace the last segment with the appended path! - // https://foobar.com/abc/def + k8s/cluster/projects/test --> https://foobar.com/abc/k8s/cluster/projects/test - // https://foobar.com/abc/def/ + k8s/cluster/projects/test --> https://foobar.com/abc/def/k8s/cluster/projects/test - basePath.pathname += '/'; - } let path = ''; if (namespace && name && validKind) { const kindsWithDetails = ['ingress', 'pod'];