adds keys table to realm settings
This commit is contained in:
parent
d5c5e3c01b
commit
12fe660816
4 changed files with 36 additions and 13 deletions
|
@ -21,7 +21,6 @@ import { useAdminClient } from "../context/auth/AdminClient";
|
|||
import type { RoleFormType } from "./RealmRoleTabs";
|
||||
import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
|
||||
import _ from "lodash";
|
||||
import { filter } from "cypress/types/bluebird";
|
||||
|
||||
type AssociatedRolesTabProps = {
|
||||
additionalRoles: Role[];
|
||||
|
@ -127,15 +126,6 @@ export const AssociatedRolesTab = ({
|
|||
)!.clientId!)
|
||||
);
|
||||
|
||||
console.log(filterDupes
|
||||
.filter((role) => role.clientRole)
|
||||
.map(
|
||||
(role) =>
|
||||
(role.clientId = clients.find(
|
||||
(client) => client.id === role.containerId
|
||||
)!.clientId!)
|
||||
))
|
||||
|
||||
return alphabetize(additionalRoles);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -49,7 +49,6 @@ export const RealmSettingsGeneralTab = ({
|
|||
return asyncStateFetch(
|
||||
() => adminClient.realms.findOne({ realm: realmName }),
|
||||
(realm) => {
|
||||
console.log(realm)
|
||||
setRealm(realm);
|
||||
setupForm(realm);
|
||||
},
|
||||
|
|
|
@ -31,6 +31,7 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
|
|||
const [certificate, setCertificate] = useState("");
|
||||
|
||||
const loader = async () => {
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
return keys;
|
||||
};
|
||||
|
@ -87,6 +88,32 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
|
|||
|
||||
const toggleModal = () => setOpen(!open);
|
||||
>>>>>>> keys
|
||||
=======
|
||||
return keys;
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
refresh();
|
||||
}, [keys]);
|
||||
|
||||
const [togglePublicKeyDialog, PublicKeyDialog] = useConfirmDialog({
|
||||
titleKey: t("realm-settings:publicKeys").slice(0, -1),
|
||||
messageKey: publicKey,
|
||||
continueButtonLabel: "common:close",
|
||||
continueButtonVariant: ButtonVariant.primary,
|
||||
noCancelButton: true,
|
||||
onConfirm: async () => {},
|
||||
});
|
||||
|
||||
const [toggleCertificateDialog, CertificateDialog] = useConfirmDialog({
|
||||
titleKey: t("realm-settings:certificate"),
|
||||
messageKey: certificate,
|
||||
continueButtonLabel: "common:close",
|
||||
continueButtonVariant: ButtonVariant.primary,
|
||||
noCancelButton: true,
|
||||
onConfirm: async () => {},
|
||||
});
|
||||
>>>>>>> adds keys table to realm settings
|
||||
|
||||
const goToCreate = () => history.push(`${url}/add-role`);
|
||||
|
||||
|
@ -94,6 +121,7 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
|
|||
return <>{provider}</>;
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
const ButtonRenderer = ({ provider, publicKey, certificate }: KeyData) => {
|
||||
if (provider === "ecdsa-generated") {
|
||||
|
@ -103,6 +131,10 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
|
|||
const ButtonRenderer = ({ name }: ComponentRepresentation) => {
|
||||
if (name === "ecdsa-generated") {
|
||||
>>>>>>> keys
|
||||
=======
|
||||
const ButtonRenderer = ({ provider, publicKey, certificate }: KeyData) => {
|
||||
if (provider === "ecdsa-generated") {
|
||||
>>>>>>> adds keys table to realm settings
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
|
@ -117,8 +149,12 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
|
|||
</Button>
|
||||
</>
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
if (provider === "rsa-generated" || provider === "fallback-RS256") {
|
||||
=======
|
||||
} else if (provider === "rsa-generated" || provider === "fallback-RS256") {
|
||||
>>>>>>> adds keys table to realm settings
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
|
|
|
@ -21,8 +21,6 @@ export const RealmSettingsLoginTab = () => {
|
|||
const { addAlert } = useAlerts();
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
console.log("kjsdlja")
|
||||
return asyncStateFetch(
|
||||
() => adminClient.realms.findOne({ realm: realmName }),
|
||||
(realm) => {
|
||||
|
|
Loading…
Reference in a new issue