mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 04:00:09 +00:00
update error popup
This commit is contained in:
parent
5f5387c6b7
commit
f05c0537d5
11 changed files with 142 additions and 40 deletions
|
|
@ -12,17 +12,45 @@ import React from "react";
|
|||
|
||||
interface InstallationErrorDialogProps {
|
||||
error: string;
|
||||
backendError?: string;
|
||||
installationState: string;
|
||||
latestLog: any;
|
||||
retryInstallation: () => void;
|
||||
retryBackend?: () => void;
|
||||
}
|
||||
|
||||
const InstallationErrorDialog = ({
|
||||
error,
|
||||
backendError,
|
||||
installationState,
|
||||
latestLog,
|
||||
retryInstallation,
|
||||
retryBackend,
|
||||
}:InstallationErrorDialogProps) => {
|
||||
// Show backend error dialog if backendError exists
|
||||
if (backendError) {
|
||||
return (
|
||||
<Dialog open={true}>
|
||||
<DialogContent className="bg-white-100%">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{t("layout.backend-startup-failed")}</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="text-text-label text-xs font-normal leading-tight mb-4">
|
||||
<div className="mb-1">
|
||||
<span className="text-text-label/60">
|
||||
{backendError}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button onClick={retryBackend}>{t("layout.retry")}</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
|
||||
// Show installation error dialog if installation state is error
|
||||
return (
|
||||
<Dialog open={installationState == "error"}>
|
||||
<DialogContent className="bg-white-100%">
|
||||
|
|
@ -30,14 +58,11 @@ const InstallationErrorDialog = ({
|
|||
<DialogTitle>{t("layout.installation-failed")}</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="text-text-label text-xs font-normal leading-tight mb-4">
|
||||
{
|
||||
<div className="mb-1">
|
||||
<span className="text-text-label/60">
|
||||
Error: {error} <br />
|
||||
Log: {latestLog?.data}
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
<div className="mb-1">
|
||||
<span className="text-text-label/60">
|
||||
{error}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button onClick={retryInstallation}>{t("layout.retry")}</Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue