import { initializeIcons, Link, Text } from "@fluentui/react"; import "bootstrap/dist/css/bootstrap.css"; import * as React from "react"; import * as ReactDOM from "react-dom"; import { initializeConfiguration } from "../ConfigContext"; import { GalleryHeaderComponent } from "../Explorer/Controls/Header/GalleryHeaderComponent"; import { GalleryAndNotebookViewerComponent, GalleryAndNotebookViewerComponentProps, } from "../Explorer/Controls/NotebookGallery/GalleryAndNotebookViewerComponent"; import { GalleryTab, SortBy } from "../Explorer/Controls/NotebookGallery/GalleryViewerComponent"; import { JunoClient } from "../Juno/JunoClient"; import * as GalleryUtils from "../Utils/GalleryUtils"; import "./GalleryViewer.less"; const enableNotebooksUrl = "https://aka.ms/cosmos-enable-notebooks"; const createAccountUrl = "https://aka.ms/cosmos-create-account-portal"; const onInit = async () => { const dataExplorerUrl = new URL("./", window.location.href).href; initializeIcons(); await initializeConfiguration(); const galleryViewerProps = GalleryUtils.getGalleryViewerProps(window.location.search); const props: GalleryAndNotebookViewerComponentProps = { junoClient: new JunoClient(), selectedTab: galleryViewerProps.selectedTab || GalleryTab.PublicGallery, sortBy: galleryViewerProps.sortBy || SortBy.MostRecent, searchText: galleryViewerProps.searchText, }; const element = (
Welcome to the Azure Cosmos DB notebooks gallery! View the sample notebooks to learn about use cases, best practices, and how to get started with Azure Cosmos DB. If {`you'd`} like to run or edit the notebook in your own Azure Cosmos DB account,{" "} sign in and select an account with{" "} notebooks enabled. From there, you can download the sample to your account. If you {`don't`} have an account yet, you can{" "} create one from the Azure portal.
); ReactDOM.render(element, document.getElementById("galleryContent")); }; // Entry point window.addEventListener("load", onInit);