diff --git a/components/dashboard/src/components/PrebuildLogs.tsx b/components/dashboard/src/components/PrebuildLogs.tsx index 3cddd1778838e2..0ca48bbc8e3840 100644 --- a/components/dashboard/src/components/PrebuildLogs.tsx +++ b/components/dashboard/src/components/PrebuildLogs.tsx @@ -19,7 +19,6 @@ const WorkspaceLogs = React.lazy(() => import("./WorkspaceLogs")); export interface PrebuildLogsProps { workspaceId?: string; - onInstanceUpdate?: (instance: WorkspaceInstance) => void; } export default function PrebuildLogs(props: PrebuildLogsProps) { diff --git a/components/dashboard/src/projects/Prebuild.tsx b/components/dashboard/src/projects/Prebuild.tsx index fe7cd3113f6eb4..47fe8fa658ac2e 100644 --- a/components/dashboard/src/projects/Prebuild.tsx +++ b/components/dashboard/src/projects/Prebuild.tsx @@ -5,7 +5,7 @@ */ import moment from "moment"; -import { PrebuildWithStatus, WorkspaceInstance } from "@gitpod/gitpod-protocol"; +import { PrebuildWithStatus } from "@gitpod/gitpod-protocol"; import { useContext, useEffect, useState } from "react"; import { useHistory, useLocation, useRouteMatch } from "react-router"; import Header from "../components/Header"; @@ -30,7 +30,6 @@ export default function () { const prebuildId = match?.params?.prebuildId; const [prebuild, setPrebuild] = useState(); - const [prebuildInstance, setPrebuildInstance] = useState(); const [isRerunningPrebuild, setIsRerunningPrebuild] = useState(false); const [isCancellingPrebuild, setIsCancellingPrebuild] = useState(false); @@ -109,18 +108,6 @@ export default function () { ); }; - const onInstanceUpdate = async (instance: WorkspaceInstance) => { - setPrebuildInstance(instance); - if (!prebuild) { - return; - } - const prebuilds = await getGitpodService().server.findPrebuilds({ - projectId: prebuild.info.projectId, - prebuildId, - }); - setPrebuild(prebuilds[0]); - }; - const rerunPrebuild = async () => { if (!prebuild) { return; @@ -161,15 +148,12 @@ export default function () {
- +
{prebuild && }
- {prebuild?.status === "aborted" || prebuild?.status === "timeout" || !!prebuild?.error ? ( + {["aborted", "timeout", "failed"].includes(prebuild?.status || "") || !!prebuild?.error ? ( - ) : prebuild?.status === "building" ? ( + ) : ["building", "queued"].includes(prebuild?.status || "") ? (