fix url-related issues
This commit is contained in:
parent
4054bd8b65
commit
9858cd0d30
3 changed files with 19 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -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) => (
|
||||
<>
|
||||
<Link to={`${url}/mappers/${mapper.id}`}>{mapper.name}</Link>
|
||||
<Link to={`${getUrl(url)}/${mapper.id}`}>{mapper.name}</Link>
|
||||
</>
|
||||
);
|
||||
|
||||
|
|
|
@ -147,7 +147,11 @@ export const LdapMappingDetails = () => {
|
|||
</Button>
|
||||
<Button
|
||||
variant="link"
|
||||
onClick={() => history.push(`/${realm}/user-federation`)}
|
||||
onClick={() =>
|
||||
history.push(
|
||||
`/${realm}/user-federation/ldap/${mapper!.parentId}/mappers`
|
||||
)
|
||||
}
|
||||
data-testid="ldap-cancel"
|
||||
>
|
||||
{t("common:cancel")}
|
||||
|
|
Loading…
Reference in a new issue