parent
acbc6df9f9
commit
fef1609601
9 changed files with 21 additions and 8 deletions
|
@ -8,6 +8,7 @@ import { useAdminClient, useFetch } from "../context/auth/AdminClient";
|
||||||
import { DraggableTable } from "./components/DraggableTable";
|
import { DraggableTable } from "./components/DraggableTable";
|
||||||
import { useAlerts } from "../components/alert/Alerts";
|
import { useAlerts } from "../components/alert/Alerts";
|
||||||
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
||||||
|
import { toKey } from "../util";
|
||||||
|
|
||||||
type DataType = RequiredActionProviderRepresentation &
|
type DataType = RequiredActionProviderRepresentation &
|
||||||
RequiredActionProviderSimpleRepresentation;
|
RequiredActionProviderSimpleRepresentation;
|
||||||
|
@ -137,7 +138,7 @@ export const RequiredActions = () => {
|
||||||
displayKey: "common:enabled",
|
displayKey: "common:enabled",
|
||||||
cellRenderer: (row) => (
|
cellRenderer: (row) => (
|
||||||
<Switch
|
<Switch
|
||||||
id={`enable-${row.name}`}
|
id={`enable-${toKey(row.name)}`}
|
||||||
label={t("common:on")}
|
label={t("common:on")}
|
||||||
labelOff={t("common:off")}
|
labelOff={t("common:off")}
|
||||||
isChecked={row.enabled}
|
isChecked={row.enabled}
|
||||||
|
@ -152,7 +153,7 @@ export const RequiredActions = () => {
|
||||||
displayKey: "authentication:setAsDefaultAction",
|
displayKey: "authentication:setAsDefaultAction",
|
||||||
cellRenderer: (row) => (
|
cellRenderer: (row) => (
|
||||||
<Switch
|
<Switch
|
||||||
id={`default-${row.name}`}
|
id={`default-${toKey(row.name)}`}
|
||||||
label={t("common:on")}
|
label={t("common:on")}
|
||||||
isDisabled={!row.enabled}
|
isDisabled={!row.enabled}
|
||||||
labelOff={!row.enabled ? t("disabledOff") : t("common:off")}
|
labelOff={!row.enabled ? t("disabledOff") : t("common:off")}
|
||||||
|
|
|
@ -53,7 +53,7 @@ export const AddFlowDropdown = ({
|
||||||
data-testid={`${execution.displayName}-edit-dropdown`}
|
data-testid={`${execution.displayName}-edit-dropdown`}
|
||||||
isOpen={open}
|
isOpen={open}
|
||||||
toggle={
|
toggle={
|
||||||
<DropdownToggle onToggle={setOpen}>
|
<DropdownToggle onToggle={setOpen} aria-label={t("common:add")}>
|
||||||
<PlusIcon />
|
<PlusIcon />
|
||||||
</DropdownToggle>
|
</DropdownToggle>
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,10 @@ export const FlowHeader = () => {
|
||||||
return (
|
return (
|
||||||
<DataListItem aria-labelledby="headerName" id="header">
|
<DataListItem aria-labelledby="headerName" id="header">
|
||||||
<DataListItemRow>
|
<DataListItemRow>
|
||||||
<DataListDragButton className="keycloak__authentication__header-drag-button" />
|
<DataListDragButton
|
||||||
|
className="keycloak__authentication__header-drag-button"
|
||||||
|
aria-label={t("common:disabled")}
|
||||||
|
/>
|
||||||
<DataListItemCells
|
<DataListItemCells
|
||||||
className="keycloak__authentication__header"
|
className="keycloak__authentication__header"
|
||||||
dataListCells={[
|
dataListCells={[
|
||||||
|
|
|
@ -60,11 +60,13 @@ export const FlowRow = ({
|
||||||
>
|
>
|
||||||
<DataListItemRow
|
<DataListItemRow
|
||||||
className="keycloak__authentication__flow-row"
|
className="keycloak__authentication__flow-row"
|
||||||
aria-level={execution.level}
|
aria-level={execution.level! + 1}
|
||||||
|
role="heading"
|
||||||
|
aria-labelledby={execution.id}
|
||||||
>
|
>
|
||||||
<DataListControl>
|
<DataListControl>
|
||||||
<DataListDragButton
|
<DataListDragButton
|
||||||
aria-labelledby={execution.displayName}
|
aria-labelledby={execution.id}
|
||||||
aria-describedby={t("common-help:dragHelp")}
|
aria-describedby={t("common-help:dragHelp")}
|
||||||
/>
|
/>
|
||||||
</DataListControl>
|
</DataListControl>
|
||||||
|
@ -81,6 +83,7 @@ export const FlowRow = ({
|
||||||
<DataListCell key={`${execution.id}-name`}>
|
<DataListCell key={`${execution.id}-name`}>
|
||||||
{!execution.authenticationFlow && (
|
{!execution.authenticationFlow && (
|
||||||
<FlowTitle
|
<FlowTitle
|
||||||
|
id={execution.id}
|
||||||
key={execution.id}
|
key={execution.id}
|
||||||
title={execution.displayName!}
|
title={execution.displayName!}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -4,17 +4,18 @@ import { Card, CardBody } from "@patternfly/react-core";
|
||||||
import "./flow-title.css";
|
import "./flow-title.css";
|
||||||
|
|
||||||
type FlowTitleProps = {
|
type FlowTitleProps = {
|
||||||
|
id?: string;
|
||||||
title: string;
|
title: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FlowTitle = ({ title }: FlowTitleProps) => {
|
export const FlowTitle = ({ id, title }: FlowTitleProps) => {
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
data-testid={title}
|
data-testid={title}
|
||||||
className="keycloak__authentication__title"
|
className="keycloak__authentication__title"
|
||||||
isFlat
|
isFlat
|
||||||
>
|
>
|
||||||
<CardBody>{title}</CardBody>
|
<CardBody id={id}>{title}</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,6 +40,7 @@ export const Policies = () => {
|
||||||
activeKey={subTab}
|
activeKey={subTab}
|
||||||
onSelect={(_, key) => setSubTab(key as number)}
|
onSelect={(_, key) => setSubTab(key as number)}
|
||||||
mountOnEnter
|
mountOnEnter
|
||||||
|
unmountOnExit
|
||||||
>
|
>
|
||||||
<Tab
|
<Tab
|
||||||
id="passwordPolicy"
|
id="passwordPolicy"
|
||||||
|
|
|
@ -106,6 +106,7 @@ export const PolicyRow = ({
|
||||||
variant="link"
|
variant="link"
|
||||||
className="keycloak__policies_authentication__minus-icon"
|
className="keycloak__policies_authentication__minus-icon"
|
||||||
onClick={() => onRemove(id)}
|
onClick={() => onRemove(id)}
|
||||||
|
aria-label={t("common:remove")}
|
||||||
>
|
>
|
||||||
<MinusCircleIcon />
|
<MinusCircleIcon />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -126,6 +126,7 @@ const WebauthnSelect = ({
|
||||||
: SelectVariant.single
|
: SelectVariant.single
|
||||||
}
|
}
|
||||||
aria-label={t(name)}
|
aria-label={t(name)}
|
||||||
|
typeAheadAriaLabel={t(name)}
|
||||||
isOpen={open}
|
isOpen={open}
|
||||||
>
|
>
|
||||||
{options.map((option) => (
|
{options.map((option) => (
|
||||||
|
|
|
@ -40,6 +40,8 @@ const sortProvider = (
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const toKey = (value: string) => value.replace(/\s/g, "-");
|
||||||
|
|
||||||
export const exportClient = (client: ClientRepresentation): void => {
|
export const exportClient = (client: ClientRepresentation): void => {
|
||||||
const clientCopy = cloneDeep(client);
|
const clientCopy = cloneDeep(client);
|
||||||
delete clientCopy.id;
|
delete clientCopy.id;
|
||||||
|
|
Loading…
Reference in a new issue