mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-04-15 06:08:37 +01:00
Fix format
This commit is contained in:
parent
435903e789
commit
0bfc3166ef
@ -160,25 +160,26 @@ export const FabricHomeScreen: React.FC<SplashScreenProps> = (props: SplashScree
|
||||
};
|
||||
|
||||
const title = "Build your database";
|
||||
return (<>
|
||||
<CosmosFluentProvider className={styles.homeContainer}>
|
||||
<SampleDataImportDialog
|
||||
open={openSampleDataImportDialog}
|
||||
setOpen={setOpenSampleDataImportDialog}
|
||||
explorer={props.explorer}
|
||||
databaseName={userContext.fabricContext?.databaseName}
|
||||
/>
|
||||
<div className={styles.title} role="heading" aria-label={title}>
|
||||
{title}
|
||||
</div>
|
||||
{getSplashScreenButtons()}
|
||||
<div className={styles.footer}>
|
||||
Need help?{" "}
|
||||
<Link href="https://cosmos.azure.com/docs" target="_blank">
|
||||
Learn more <img src={LinkIcon} alt="Learn more" />
|
||||
</Link>
|
||||
</div>
|
||||
</CosmosFluentProvider >
|
||||
</>
|
||||
return (
|
||||
<>
|
||||
<CosmosFluentProvider className={styles.homeContainer}>
|
||||
<SampleDataImportDialog
|
||||
open={openSampleDataImportDialog}
|
||||
setOpen={setOpenSampleDataImportDialog}
|
||||
explorer={props.explorer}
|
||||
databaseName={userContext.fabricContext?.databaseName}
|
||||
/>
|
||||
<div className={styles.title} role="heading" aria-label={title}>
|
||||
{title}
|
||||
</div>
|
||||
{getSplashScreenButtons()}
|
||||
<div className={styles.footer}>
|
||||
Need help?{" "}
|
||||
<Link href="https://cosmos.azure.com/docs" target="_blank">
|
||||
Learn more <img src={LinkIcon} alt="Learn more" />
|
||||
</Link>
|
||||
</div>
|
||||
</CosmosFluentProvider>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
@ -1,4 +1,13 @@
|
||||
import { Button, Dialog, DialogActions, DialogBody, DialogContent, DialogSurface, DialogTitle, Spinner } from "@fluentui/react-components";
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogBody,
|
||||
DialogContent,
|
||||
DialogSurface,
|
||||
DialogTitle,
|
||||
Spinner,
|
||||
} from "@fluentui/react-components";
|
||||
import { CheckmarkCircleRegular } from "@fluentui/react-icons";
|
||||
import Explorer from "Explorer/Explorer";
|
||||
import { checkContainerExists, createContainer, importData } from "Explorer/SplashScreen/SampleUtil";
|
||||
@ -13,10 +22,10 @@ import * as ViewModels from "../../Contracts/ViewModels";
|
||||
* @returns
|
||||
*/
|
||||
export const SampleDataImportDialog: React.FC<{
|
||||
open: boolean,
|
||||
setOpen: (open: boolean) => void,
|
||||
explorer: Explorer,
|
||||
databaseName: string,
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
explorer: Explorer;
|
||||
databaseName: string;
|
||||
}> = (props) => {
|
||||
const [status, setStatus] = useState<"idle" | "creating" | "importing" | "completed" | "error">("idle");
|
||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||
@ -32,8 +41,6 @@ export const SampleDataImportDialog: React.FC<{
|
||||
}, [props.open]);
|
||||
|
||||
const handleStartImport = async (): Promise<void> => {
|
||||
|
||||
|
||||
setStatus("creating");
|
||||
const containerName = "sampledata";
|
||||
const databaseName = props.databaseName;
|
||||
@ -137,10 +144,12 @@ export const SampleDataImportDialog: React.FC<{
|
||||
<DialogTitle>Importing Sample Data</DialogTitle>
|
||||
<DialogContent>{renderContent()}</DialogContent>
|
||||
<DialogActions>
|
||||
<Button appearance="primary" onClick={handleActionOnClick}>{getButtonLabel()}</Button>
|
||||
<Button appearance="primary" onClick={handleActionOnClick}>
|
||||
{getButtonLabel()}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</DialogBody>
|
||||
</DialogSurface>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user