From dd41d93f38308631622291be0a403596d433d0e2 Mon Sep 17 00:00:00 2001 From: jenny-s51 Date: Tue, 18 May 2021 11:17:52 -0400 Subject: [PATCH] show public key and certificate correctly --- src/realm-settings/KeysListTab.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/realm-settings/KeysListTab.tsx b/src/realm-settings/KeysListTab.tsx index 0c4d9dea55..1cc8e2f3a8 100644 --- a/src/realm-settings/KeysListTab.tsx +++ b/src/realm-settings/KeysListTab.tsx @@ -14,6 +14,7 @@ import { cellWidth } from "@patternfly/react-table"; type KeyData = KeyMetadataRepresentation & { provider?: string; + type?: string; }; type KeysTabInnerProps = { @@ -34,6 +35,8 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => { return keys; }; + console.log("Keys", keys) + React.useEffect(() => { refresh(); }, [keys]); @@ -62,8 +65,8 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => { return <>{provider}; }; - const ButtonRenderer = ({ provider, publicKey, certificate }: KeyData) => { - if (provider === "ecdsa-generated") { + const ButtonRenderer = ({ type, publicKey, certificate }: KeyData) => { + if (type === "EC") { return ( <> ); - } else if (provider === "rsa-generated" || provider === "fallback-RS256") { + } else if (type === "RSA") { return ( <>