Skip to content

feat(site): Display workspace build error + option to retry in debug mode #6903

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

Merged
merged 10 commits into from
Mar 31, 2023
Prev Previous commit
Next Next commit
Add translation
  • Loading branch information
BrunoQuaresma committed Mar 31, 2023
commit 768b4cb08288330159af64750ec66f6e0858a12f
4 changes: 3 additions & 1 deletion site/src/components/Workspace/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "components/WorkspaceBuildProgress/WorkspaceBuildProgress"
import { WorkspaceStatusBadge } from "components/WorkspaceStatusBadge/WorkspaceStatusBadge"
import { FC } from "react"
import { useTranslation } from "react-i18next"
import { useNavigate } from "react-router-dom"
import * as TypesGen from "../../api/typesGenerated"
import { AlertBanner } from "../AlertBanner/AlertBanner"
Expand Down Expand Up @@ -93,6 +94,7 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
const styles = useStyles()
const navigate = useNavigate()
const serverVersion = buildInfo?.version || ""
const { t } = useTranslation("workspacePage")

const buildError = Boolean(workspaceErrors[WorkspaceErrors.BUILD_ERROR]) && (
<AlertBanner
Expand Down Expand Up @@ -210,7 +212,7 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
size="small"
variant="outlined"
>
Try again in debug mode
{t("actionButton.retryDebugMode")}
</Button>
</div>
)}
Expand Down
3 changes: 2 additions & 1 deletion site/src/i18n/en/workspacePage.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"starting": "Starting...",
"stopping": "Stopping...",
"deleting": "Deleting...",
"settings": "Settings"
"settings": "Settings",
"retryDebugMode": "Try again in debug mode"
},
"disabledButton": {
"canceling": "Canceling",
Expand Down