From 8386a8f2f9cd3245a8e83674df88320f917a0ef1 Mon Sep 17 00:00:00 2001 From: "Laurie T. Malau" Date: Fri, 17 Jun 2022 10:02:29 +0000 Subject: [PATCH] put back workspacelogs --- components/dashboard/src/components/PrebuildLogs.tsx | 5 +---- components/dashboard/src/projects/Prebuilds.tsx | 1 + components/dashboard/src/start/CreateWorkspace.tsx | 8 ++++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/dashboard/src/components/PrebuildLogs.tsx b/components/dashboard/src/components/PrebuildLogs.tsx index 2ce59ba0924f86..7f25a9802944fe 100644 --- a/components/dashboard/src/components/PrebuildLogs.tsx +++ b/components/dashboard/src/components/PrebuildLogs.tsx @@ -27,7 +27,7 @@ export default function PrebuildLogs(props: PrebuildLogsProps) { const [workspace, setWorkspace] = useState(); const [workspaceInstance, setWorkspaceInstance] = useState(); const [error, setError] = useState(); - const [logsEmitter, setLogsEmitter] = useState(new EventEmitter()); + const [logsEmitter] = useState(new EventEmitter()); useEffect(() => { const disposables = new DisposableCollection(); @@ -36,9 +36,6 @@ export default function PrebuildLogs(props: PrebuildLogsProps) { if (!props.workspaceId) { return; } - if (props.logsEmitter) { - setLogsEmitter(props.logsEmitter); - } try { const info = await getGitpodService().server.getWorkspace(props.workspaceId); if (info.latestInstance) { diff --git a/components/dashboard/src/projects/Prebuilds.tsx b/components/dashboard/src/projects/Prebuilds.tsx index 441a654e806512..e69d48ba6b53df 100644 --- a/components/dashboard/src/projects/Prebuilds.tsx +++ b/components/dashboard/src/projects/Prebuilds.tsx @@ -365,6 +365,7 @@ function PrebuildStatusDescription(props: { prebuild: PrebuildWithStatus }) { } export function PrebuildStatus(props: { prebuild: PrebuildWithStatus }) { + console.log("prebuild status: ", props.prebuild.status); const prebuild = props.prebuild; return ( diff --git a/components/dashboard/src/start/CreateWorkspace.tsx b/components/dashboard/src/start/CreateWorkspace.tsx index c36d832af4d870..d77500780788f2 100644 --- a/components/dashboard/src/start/CreateWorkspace.tsx +++ b/components/dashboard/src/start/CreateWorkspace.tsx @@ -22,12 +22,14 @@ import StartWorkspace, { parseProps } from "./StartWorkspace"; import { openAuthorizeWindow } from "../provider-utils"; import { SelectAccountPayload } from "@gitpod/gitpod-protocol/lib/auth"; import { SelectAccountModal } from "../settings/SelectAccountModal"; -import PrebuildLogs, { watchHeadlessLogs } from "../components/PrebuildLogs"; +import { watchHeadlessLogs } from "../components/PrebuildLogs"; import CodeText from "../components/CodeText"; import FeedbackComponent from "../feedback-form/FeedbackComponent"; import { isGitpodIo } from "../utils"; import { PrebuildStatus } from "../projects/Prebuilds"; +const WorkspaceLogs = React.lazy(() => import("../components/WorkspaceLogs")); + export interface CreateWorkspaceProps { contextUrl: string; } @@ -246,6 +248,7 @@ export default class CreateWorkspace extends React.Component ); } else if (result?.runningWorkspacePrebuild) { + console.log("we have a running prebuild"); return ( }> - + {prebuild && }