show public key and certificate correctly
This commit is contained in:
parent
e82be4ccf8
commit
dd41d93f38
1 changed files with 6 additions and 3 deletions
|
@ -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 (
|
||||
<>
|
||||
<Button
|
||||
|
@ -78,7 +81,7 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
|
|||
</Button>
|
||||
</>
|
||||
);
|
||||
} else if (provider === "rsa-generated" || provider === "fallback-RS256") {
|
||||
} else if (type === "RSA") {
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue