-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #484 from FiretableProject/develop
Develop
- Loading branch information
Showing
12 changed files
with
1,069 additions
and
703 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,4 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
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,69 @@ | ||
import useDoc from "hooks/useDoc"; | ||
import Modal from "components/Modal"; | ||
import { Box, Button, CircularProgress, Typography } from "@material-ui/core"; | ||
import { IFormDialogProps } from "./Table/ColumnMenu/NewColumn"; | ||
import OpenInNewIcon from "@material-ui/icons/OpenInNew"; | ||
import CheckCircleIcon from "@material-ui/icons/CheckCircle"; | ||
|
||
export interface IProjectSettings | ||
extends Pick<IFormDialogProps, "handleClose"> {} | ||
|
||
export default function BuilderInstaller({ handleClose }: IProjectSettings) { | ||
const [settingsState] = useDoc({ | ||
path: "_FIRETABLE_/settings", | ||
}); | ||
|
||
if (settingsState.loading) return null; | ||
|
||
const complete = | ||
settingsState.doc.ftBuildStatus === "COMPLETE" || | ||
!!settingsState.doc.ftBuildUrl; | ||
const building = settingsState.doc.ftBuildStatus === "BUILDING"; | ||
const waiting = | ||
!settingsState.doc.ftBuildStatus && !settingsState.doc.ftBuildUrl; | ||
|
||
return ( | ||
<Modal | ||
onClose={handleClose} | ||
title="One Click Builder Installer" | ||
maxWidth="sm" | ||
children={ | ||
<Box display="flex" flexDirection="column"> | ||
<Typography variant="body2"> | ||
You will be redirected to Google Cloud Shell to deploy Firetable | ||
Function Builder to Cloud Run. | ||
</Typography> | ||
<br /> | ||
|
||
<Box | ||
display="flex" | ||
justifyContent="center" | ||
alignItems="center" | ||
flexDirection="column" | ||
> | ||
{complete && ( | ||
<> | ||
<CheckCircleIcon /> | ||
<Typography variant="overline">Deploy Complete</Typography> | ||
</> | ||
)} | ||
{building && ( | ||
<> | ||
<CircularProgress size={25} /> | ||
<Typography variant="overline">Deploying...</Typography> | ||
</> | ||
)} | ||
{waiting && ( | ||
<> | ||
<CircularProgress size={25} /> | ||
<Typography variant="overline"> | ||
Waiting for deploy... | ||
</Typography> | ||
</> | ||
)} | ||
</Box> | ||
</Box> | ||
} | ||
/> | ||
); | ||
} |
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
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
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
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
Oops, something went wrong.