add mappers tab

This commit is contained in:
mfrances 2021-03-16 10:24:32 -04:00
parent a4242dd370
commit bb21001d74
5 changed files with 61 additions and 40 deletions

View file

@ -322,7 +322,7 @@ export const ClientScopeForm = () => {
<Tab <Tab
isHidden={!id} isHidden={!id}
eventKey="mappers" eventKey="mappers"
title={<TabTitleText>{t("mappers")}</TabTitleText>} title={<TabTitleText>{t("common:mappers")}</TabTitleText>}
> >
{clientScope && ( {clientScope && (
<MapperList clientScope={clientScope} refresh={refresh} /> <MapperList clientScope={clientScope} refresh={refresh} />

View file

@ -28,7 +28,6 @@
"createError": "Could not create client scope: '{{error}}'", "createError": "Could not create client scope: '{{error}}'",
"updateSuccess": "Client scope updated", "updateSuccess": "Client scope updated",
"updateError": "Could not update client scope: '{{error}}'", "updateError": "Could not update client scope: '{{error}}'",
"mappers": "Mappers",
"mappersSearchFor": "Search for mapper", "mappersSearchFor": "Search for mapper",
"addMapper": "Add mapper", "addMapper": "Add mapper",
"addMapperExplain": "If you want more fine-grain control, you can create protocol mapper on this client", "addMapperExplain": "If you want more fine-grain control, you can create protocol mapper on this client",

View file

@ -64,6 +64,7 @@
"groups": "Groups", "groups": "Groups",
"sessions": "Sessions", "sessions": "Sessions",
"events": "Events", "events": "Events",
"mappers": "Mappers",
"configure": "Configure", "configure": "Configure",
"realmSettings": "Realm settings", "realmSettings": "Realm settings",

View file

@ -219,7 +219,7 @@ export const routes: RoutesFn = (t: TFunction) => [
access: "view-realm", access: "view-realm",
}, },
{ {
path: "/:realm/user-federation/ldap/:id", path: "/:realm/user-federation/ldap/:id/:tab?",
component: UserFederationLdapSettings, component: UserFederationLdapSettings,
breadcrumb: t("common:settings"), breadcrumb: t("common:settings"),
access: "view-realm", access: "view-realm",

View file

@ -8,6 +8,9 @@ import {
DropdownSeparator, DropdownSeparator,
Form, Form,
PageSection, PageSection,
Tab,
TabTitleText,
Text,
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { LdapSettingsAdvanced } from "./ldap/LdapSettingsAdvanced"; import { LdapSettingsAdvanced } from "./ldap/LdapSettingsAdvanced";
@ -31,6 +34,8 @@ import { ViewHeader } from "../components/view-header/ViewHeader";
import { useHistory, useParams } from "react-router-dom"; import { useHistory, useParams } from "react-router-dom";
import { ScrollForm } from "../components/scroll-form/ScrollForm"; import { ScrollForm } from "../components/scroll-form/ScrollForm";
import { KeycloakTabs } from "../components/keycloak-tabs/KeycloakTabs";
type LdapSettingsHeaderProps = { type LdapSettingsHeaderProps = {
onChange: (value: string) => void; onChange: (value: string) => void;
value: string; value: string;
@ -276,6 +281,12 @@ export const UserFederationLdapSettings = () => {
)} )}
/> />
<PageSection variant="light" isFilled> <PageSection variant="light" isFilled>
<KeycloakTabs isBox>
<Tab
id="settings"
eventKey="settings"
title={<TabTitleText>{t("common:settings")}</TabTitleText>}
>
<ScrollForm <ScrollForm
sections={[ sections={[
t("generalOptions"), t("generalOptions"),
@ -314,6 +325,16 @@ export const UserFederationLdapSettings = () => {
</Button> </Button>
</ActionGroup> </ActionGroup>
</Form> </Form>
</Tab>
<Tab
id="mappers"
eventKey="mappers"
title={<TabTitleText>{t("common:mappers")}</TabTitleText>}
>
{/* <MapperList clientScope={clientScope} refresh={refresh} /> */}
<Text>Coming soon!</Text>
</Tab>
</KeycloakTabs>
</PageSection> </PageSection>
</> </>
); );