From 9858cd0d30e7149727ab4c7232ee3cdc0319243e Mon Sep 17 00:00:00 2001 From: mfrances Date: Mon, 5 Apr 2021 15:55:12 -0400 Subject: [PATCH] fix url-related issues --- src/route-config.ts | 12 ++++++------ src/user-federation/ldap/mappers/LdapMapperList.tsx | 9 ++++++++- .../ldap/mappers/LdapMappingDetails.tsx | 6 +++++- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/route-config.ts b/src/route-config.ts index 883d2a700b..5c169490f9 100644 --- a/src/route-config.ts +++ b/src/route-config.ts @@ -201,12 +201,6 @@ export const routes: RoutesFn = (t: TFunction) => [ breadcrumb: null, access: "view-realm", }, - { - path: "/:realm/user-federation/ldap", - component: UserFederationSection, - breadcrumb: null, - access: "view-realm", - }, { path: "/:realm/user-federation/kerberos/:id", component: UserFederationKerberosSettings, @@ -219,6 +213,12 @@ export const routes: RoutesFn = (t: TFunction) => [ breadcrumb: t("common:settings"), access: "view-realm", }, + { + path: "/:realm/user-federation/ldap", + component: UserFederationSection, + breadcrumb: null, + access: "view-realm", + }, { path: "/:realm/user-federation/ldap/:id/:tab?", component: UserFederationLdapSettings, diff --git a/src/user-federation/ldap/mappers/LdapMapperList.tsx b/src/user-federation/ldap/mappers/LdapMapperList.tsx index 8c8a982107..c2b9a1a09d 100644 --- a/src/user-federation/ldap/mappers/LdapMapperList.tsx +++ b/src/user-federation/ldap/mappers/LdapMapperList.tsx @@ -70,9 +70,16 @@ export const LdapMapperList = () => { }) ); + const getUrl = (url: string) => { + if (url.indexOf("/mappers") === -1) { + return `${url}/mappers`; + } + return `${url}`; + }; + const MapperLink = (mapper: ComponentRepresentation) => ( <> - {mapper.name} + {mapper.name} ); diff --git a/src/user-federation/ldap/mappers/LdapMappingDetails.tsx b/src/user-federation/ldap/mappers/LdapMappingDetails.tsx index 2618906a43..8f6e6d1d72 100644 --- a/src/user-federation/ldap/mappers/LdapMappingDetails.tsx +++ b/src/user-federation/ldap/mappers/LdapMappingDetails.tsx @@ -147,7 +147,11 @@ export const LdapMappingDetails = () => {