requested changes

This commit is contained in:
Daniel Hougaard
2024-11-04 19:00:24 +04:00
parent d0b3c6b66a
commit 8d4115925c
15 changed files with 47 additions and 59 deletions

View File

@@ -64,6 +64,6 @@ export type TGetServerRootKmsEncryptionDetails = {
};
export enum RootKeyEncryptionStrategy {
Basic = "BASIC",
Hsm = "HSM"
Software = "SOFTWARE",
HSM = "HSM"
}

View File

@@ -1,13 +0,0 @@
import { useCallback } from "react";
export const useFileDownload = () => {
return useCallback((content: string, filename: string) => {
const downloadUrl = `data:text/plain;charset=utf-8,${encodeURIComponent(content)}`;
const link = document.createElement("a");
link.href = downloadUrl;
link.setAttribute("download", filename);
document.body.appendChild(link);
link.click();
link.remove();
}, []);
};

View File

@@ -38,7 +38,7 @@ export const EncryptionPanel = ({ rootKmsDetails }: Props) => {
values: {
encryptionStrategy:
rootKmsDetails?.strategies?.find((s) => s.enabled)?.strategy ??
RootKeyEncryptionStrategy.Basic
RootKeyEncryptionStrategy.Software
}
});