- The Planetary Computer API and Planetary Computer Hub are currently in - preview, and we're excited to expand our partner and developer network. -
-- We are reviewing your request and will let you know once your account has - been approved. In the meantime, you can explore our data catalog by going to{" "} - Data Catalog page. Please contact{" "} - - planetarycomputer@microsoft.com - {" "} - if you have questions or if you would like to unsubscribe. -
-Learn more about Microsoft's{" "} { const { storageCollectionConfig } = useDataConfig(); @@ -91,3 +91,10 @@ const tokens: IStackTokens = { }; export const highContrastLinkColor = { color: "#006cbe" }; + +const messageBarStyles: IMessageBarStyles = { + root: { + padding: "4px 2px", + borderRadius: 4, + }, +}; diff --git a/src/utils/constants.js b/src/utils/constants.js index 37be4cb3..4b04a61b 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -18,7 +18,6 @@ export const DATA_URL = apiRoot.endsWith("stac") : `${tilerRoot}/api/data/v1`; export const IMAGE_URL = process.env.REACT_APP_IMAGE_API_ROOT || ""; -export const HUB_URL = process.env.REACT_APP_HUB_URL || ""; export const AUTH_URL = process.env.REACT_APP_AUTH_URL || apiRoot; export const AZMAPS_CLIENT_ID = process.env.REACT_APP_AZMAPS_CLIENT_ID; diff --git a/src/utils/index.ts b/src/utils/index.ts index 72ee4f1c..7e53fe50 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -2,7 +2,7 @@ import dayjs, { Dayjs } from "dayjs"; import utc from "dayjs/plugin/utc"; import { IStacCollection, IStacItem } from "types/stac"; -import { DATA_URL, HUB_URL, QS_REQUEST_ENTITY, REQUEST_ENTITY } from "./constants"; +import { DATA_URL, QS_REQUEST_ENTITY, REQUEST_ENTITY } from "./constants"; import * as qs from "query-string"; import { IMosaic, IMosaicRenderOption } from "pages/Explore/types"; import { DEFAULT_MIN_ZOOM } from "pages/Explore/utils/constants"; @@ -103,30 +103,6 @@ const configFromLauncher = (launcher: ILauncherConfig | string): ILauncherConfig return config; }; -export function buildHubLaunchUrl(filePath: string): string; -export function buildHubLaunchUrl(launchConfig: ILauncherConfig): string; -export function buildHubLaunchUrl(launcher: ILauncherConfig | string): string { - const { repo, branch, filePath } = configFromLauncher(launcher); - const urlRepo = encodeURIComponent(repo); - const urlBranch = encodeURIComponent(branch); - const repoName = repo.split("/").pop(); - - // Get a unique but arbitrary string for the workspace path. This works - // around in issue where nbgitpuller workspace may conflict with JupyterHub. - // The workspace can't contain / so substitute a - for any. - const fileWorkspace = filePath - .substring(filePath.indexOf("/") + 1, filePath.lastIndexOf(".")) - .replace(/\//g, "-"); - - const pathPrefix = filePath.endsWith(".ipynb") - ? `lab/workspaces/${fileWorkspace}/tree` - : "rstudio"; - - const urlPath = encodeURIComponent(`${pathPrefix}/${repoName}/${filePath}`); - - return `${HUB_URL}/user-redirect/git-pull?repo=${urlRepo}&urlpath=${urlPath}&branch=${urlBranch}`; -} - export function buildGitHubUrl(launcher: ILauncherConfig): string; export function buildGitHubUrl(launcher: string): string; export function buildGitHubUrl(launcher: ILauncherConfig | string): string {