-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
93 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
components/dashboard/src/start/IntermediatePrebuildStatus.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Copyright (c) 2022 Gitpod GmbH. All rights reserved. | ||
* Licensed under the GNU Affero General Public License (AGPL). | ||
* See License-AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
import StatusRunning from "../icons/StatusRunning.svg"; | ||
|
||
function IntermediatePrebuildStatus() { | ||
return ( | ||
<div className="flex flex-col space-y-1 justify-center text-sm font-semibold"> | ||
<div> | ||
<div className="flex space-x-1 items-center"> | ||
<img alt="" className="h-4 w-4" src={StatusRunning} /> | ||
<span className="font-medium text-blue-500 uppercase">running</span> | ||
</div> | ||
</div> | ||
<div className="flex space-x-1 items-center text-gray-400"> | ||
<span>Prebuild is currently in progress.</span> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default IntermediatePrebuildStatus; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright (c) 2022 Gitpod GmbH. All rights reserved. | ||
* Licensed under the GNU Affero General Public License (AGPL). | ||
* See License-AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
import { Suspense } from "react"; | ||
import EventEmitter from "events"; | ||
import PrebuildLogs from "../components/PrebuildLogs"; | ||
import { StartPage } from "./StartPage"; | ||
import WorkspaceLogs from "../components/WorkspaceLogs"; | ||
import { PrebuildWithStatus } from "@gitpod/gitpod-protocol"; | ||
import { PrebuildStatus } from "../projects/Prebuilds"; | ||
import IntermediatePrebuildStatus from "./IntermediatePrebuildStatus"; | ||
|
||
function LogsView(props: { | ||
logsEmitter: EventEmitter; | ||
workspaceId?: string; | ||
shouldRunPrebuild?: boolean; | ||
prebuild?: PrebuildWithStatus | undefined; | ||
onIgnorePrebuild?: () => void; | ||
isIntermediate?: boolean; | ||
}) { | ||
return ( | ||
<StartPage title="Prebuild in Progress"> | ||
<Suspense fallback={<div />}> | ||
{props.shouldRunPrebuild ? ( | ||
<PrebuildLogs workspaceId={props.workspaceId} /> | ||
) : ( | ||
<WorkspaceLogs logsEmitter={props.logsEmitter} /> | ||
)} | ||
</Suspense> | ||
{props.shouldRunPrebuild && ( | ||
<div className="flex gap-x-8 mt-4 mb-8"> | ||
{props.prebuild && <PrebuildStatus prebuild={props.prebuild} />} | ||
{!props.prebuild && props.isIntermediate && <IntermediatePrebuildStatus />} | ||
<button className="secondary" onClick={() => props.onIgnorePrebuild && props.onIgnorePrebuild()}> | ||
Skip Prebuild | ||
</button> | ||
</div> | ||
)} | ||
</StartPage> | ||
); | ||
} | ||
|
||
export default LogsView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters