Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display create enclave error in scrollable box #1802

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions enclave-manager/web/src/components/KurtosisAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type KurtosisAlertProps = AlertProps & {

export const KurtosisAlert = ({ message, details, ...alertProps }: KurtosisAlertProps) => {
return (
<Alert status="error" {...alertProps}>
<Alert status="error" overflowY={"auto"} maxHeight={"300px"} alignItems={"flex-start"} {...alertProps}>
<AlertIcon />
<Flex flexDirection={"column"} width={"100%"} gap={"8px"}>
<Flex direction={"row"}>
Expand All @@ -40,7 +40,9 @@ export const KurtosisAlert = ({ message, details, ...alertProps }: KurtosisAlert
</AccordionButton>
</h2>
<AccordionPanel pb={4}>
<Box as={"pre"}>{details}</Box>
<Box as={"pre"} whiteSpace={"pre-wrap"} wordBreak={"break-word"}>
{details}
</Box>
</AccordionPanel>
</AccordionItem>
</Accordion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const ConfigureEnclaveModal = ({
const handleClose = () => {
if (!isLoading) {
navigator("#", { replace: true });
setError(undefined);
onClose();
}
};
Expand Down Expand Up @@ -252,7 +253,7 @@ export const ConfigureEnclaveModal = ({
<EnclaveSourceButton source={kurtosisPackage.name} size={"sm"} variant={"outline"} color={"gray.100"} />
</Flex>
{isDefined(error) && (
<KurtosisAlert flex={"0"} message={"Could not execute configuration"} details={error} />
<KurtosisAlert flex={"1 0 auto"} message={"Could not execute configuration"} details={error} />
)}
<Flex
flex={"0 1 auto"}
Expand Down