Fix additional UX issues with User Federation (#681)
* change title and breadcrumb * only show tabs on edit not create
This commit is contained in:
parent
5a9b01c15f
commit
5d71a4f049
3 changed files with 60 additions and 49 deletions
|
@ -243,7 +243,7 @@ export const routes: RoutesFn = (t: TFunction) => [
|
||||||
{
|
{
|
||||||
path: "/:realm/user-federation/ldap/new",
|
path: "/:realm/user-federation/ldap/new",
|
||||||
component: UserFederationLdapSettings,
|
component: UserFederationLdapSettings,
|
||||||
breadcrumb: t("common:settings"),
|
breadcrumb: t("user-federation:addOneLdap"),
|
||||||
access: "view-realm",
|
access: "view-realm",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,7 +131,7 @@ const LdapSettingsHeader = ({
|
||||||
<>
|
<>
|
||||||
<DisableConfirm />
|
<DisableConfirm />
|
||||||
{!id ? (
|
{!id ? (
|
||||||
<ViewHeader titleKey="LDAP" />
|
<ViewHeader titleKey={t("addOneLdap")} />
|
||||||
) : (
|
) : (
|
||||||
<ViewHeader
|
<ViewHeader
|
||||||
titleKey="LDAP"
|
titleKey="LDAP"
|
||||||
|
@ -286,6 +286,51 @@ export const UserFederationLdapSettings = () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const addLdapFormContent = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ScrollForm
|
||||||
|
sections={[
|
||||||
|
t("generalOptions"),
|
||||||
|
t("connectionAndAuthenticationSettings"),
|
||||||
|
t("ldapSearchingAndUpdatingSettings"),
|
||||||
|
t("synchronizationSettings"),
|
||||||
|
t("kerberosIntegration"),
|
||||||
|
t("cacheSettings"),
|
||||||
|
t("advancedSettings"),
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<LdapSettingsGeneral form={form} />
|
||||||
|
<LdapSettingsConnection form={form} />
|
||||||
|
<LdapSettingsSearching form={form} />
|
||||||
|
<LdapSettingsSynchronization form={form} />
|
||||||
|
<LdapSettingsKerberosIntegration form={form} />
|
||||||
|
<SettingsCache form={form} />
|
||||||
|
<LdapSettingsAdvanced form={form} />
|
||||||
|
</ScrollForm>
|
||||||
|
<Form onSubmit={form.handleSubmit(save)}>
|
||||||
|
<ActionGroup className="keycloak__form_actions">
|
||||||
|
<Button
|
||||||
|
isDisabled={!form.formState.isDirty}
|
||||||
|
variant="primary"
|
||||||
|
type="submit"
|
||||||
|
data-testid="ldap-save"
|
||||||
|
>
|
||||||
|
{t("common:save")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
variant="link"
|
||||||
|
onClick={() => history.push(`/${realm}/user-federation`)}
|
||||||
|
data-testid="ldap-cancel"
|
||||||
|
>
|
||||||
|
{t("common:cancel")}
|
||||||
|
</Button>
|
||||||
|
</ActionGroup>
|
||||||
|
</Form>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DeleteConfirm />
|
<DeleteConfirm />
|
||||||
|
@ -305,52 +350,15 @@ export const UserFederationLdapSettings = () => {
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<PageSection variant="light" isFilled>
|
<PageSection variant="light" isFilled>
|
||||||
<KeycloakTabs isBox>
|
{id ? (
|
||||||
<Tab
|
<KeycloakTabs isBox>
|
||||||
id="settings"
|
<Tab
|
||||||
eventKey="settings"
|
id="settings"
|
||||||
title={<TabTitleText>{t("common:settings")}</TabTitleText>}
|
eventKey="settings"
|
||||||
>
|
title={<TabTitleText>{t("common:settings")}</TabTitleText>}
|
||||||
<ScrollForm
|
|
||||||
sections={[
|
|
||||||
t("generalOptions"),
|
|
||||||
t("connectionAndAuthenticationSettings"),
|
|
||||||
t("ldapSearchingAndUpdatingSettings"),
|
|
||||||
t("synchronizationSettings"),
|
|
||||||
t("kerberosIntegration"),
|
|
||||||
t("cacheSettings"),
|
|
||||||
t("advancedSettings"),
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<LdapSettingsGeneral form={form} />
|
{addLdapFormContent()}
|
||||||
<LdapSettingsConnection form={form} />
|
</Tab>
|
||||||
<LdapSettingsSearching form={form} />
|
|
||||||
<LdapSettingsSynchronization form={form} />
|
|
||||||
<LdapSettingsKerberosIntegration form={form} />
|
|
||||||
<SettingsCache form={form} />
|
|
||||||
<LdapSettingsAdvanced form={form} />
|
|
||||||
</ScrollForm>
|
|
||||||
<Form onSubmit={form.handleSubmit(save)}>
|
|
||||||
<ActionGroup className="keycloak__form_actions">
|
|
||||||
<Button
|
|
||||||
isDisabled={!form.formState.isDirty}
|
|
||||||
variant="primary"
|
|
||||||
type="submit"
|
|
||||||
data-testid="ldap-save"
|
|
||||||
>
|
|
||||||
{t("common:save")}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="link"
|
|
||||||
onClick={() => history.push(`/${realm}/user-federation`)}
|
|
||||||
data-testid="ldap-cancel"
|
|
||||||
>
|
|
||||||
{t("common:cancel")}
|
|
||||||
</Button>
|
|
||||||
</ActionGroup>
|
|
||||||
</Form>
|
|
||||||
</Tab>
|
|
||||||
{id && (
|
|
||||||
<Tab
|
<Tab
|
||||||
id="mappers"
|
id="mappers"
|
||||||
eventKey="mappers"
|
eventKey="mappers"
|
||||||
|
@ -359,8 +367,10 @@ export const UserFederationLdapSettings = () => {
|
||||||
>
|
>
|
||||||
<LdapMapperList />
|
<LdapMapperList />
|
||||||
</Tab>
|
</Tab>
|
||||||
)}
|
</KeycloakTabs>
|
||||||
</KeycloakTabs>
|
) : (
|
||||||
|
addLdapFormContent()
|
||||||
|
)}
|
||||||
</PageSection>
|
</PageSection>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
"providers": "Add providers",
|
"providers": "Add providers",
|
||||||
"addKerberos": "Add Kerberos providers",
|
"addKerberos": "Add Kerberos providers",
|
||||||
"addLdap": "Add LDAP providers",
|
"addLdap": "Add LDAP providers",
|
||||||
|
"addOneLdap": "Add LDAP provider",
|
||||||
"addKerberosWizardTitle": "Add Kerberos user federation provider",
|
"addKerberosWizardTitle": "Add Kerberos user federation provider",
|
||||||
"addLdapWizardTitle": "Add LDAP user federation provider",
|
"addLdapWizardTitle": "Add LDAP user federation provider",
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue