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