From b73cab4a3781b1b25048441a4163df3e1a03e9f0 Mon Sep 17 00:00:00 2001 From: Marc Lichtman Date: Fri, 11 Apr 2025 12:38:15 -0400 Subject: [PATCH 1/4] HLS2 Description tweak (#501) --- src/config/datasetGroups.yml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/config/datasetGroups.yml b/src/config/datasetGroups.yml index 5f2a6a55..0818ea4d 100644 --- a/src/config/datasetGroups.yml +++ b/src/config/datasetGroups.yml @@ -647,24 +647,22 @@ esa-cci-lc: hls2: title: Harmonized Landsat and Sentinel-2 (HLS) v2.0 short_description: > - Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface - reflectance (SR) and top of atmosphere (TOA) brightness data from the Operational - Land Imager (OLI) aboard the joint NASA/USGS Landsat 8 satellite and the - Multi-Spectral Instrument (MSI) aboard the ESA (European Space Agency) - Sentinel-2A and Sentinel-2B satellites. + Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface reflectance (SR) + and top of atmosphere (TOA) brightness data from the Operational Land Imager (OLI) aboard the + joint NASA/USGS Landsat 8 and Landsat 9 satellites and the Multi-Spectral Instrument (MSI) + aboard the ESA (European Space Agency) Sentinel-2A, Sentinel-2B, and Sentinel-2C satellites. description: > - Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface - reflectance (SR) and top of atmosphere (TOA) brightness data from the Operational - Land Imager (OLI) aboard the joint NASA/USGS Landsat 8 satellite and the - Multi-Spectral Instrument (MSI) aboard the ESA (European Space Agency) - Sentinel-2A and Sentinel-2B satellites. The combined measurement enables global - observations of the land every 2-3 days at 30 meter (m) spatial resolution. - The HLSS30 and HLSL30 products are gridded to the same resolution and Military - Grid Reference System (MGRS) tiling and are “stackable” for time series analysis. - This dataset is in the form of [cloud-optimized GeoTIFFs](https://www.cogeo.org/). - The HLS v2.0 data is generated by NASA's IMPACT team at Marshall Space Flight Center. - The product latency is 1.7 days, from the satellite overpass to the HLS data - availability at LP DAAC. For more information see LP DAAC's + Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface reflectance (SR) + and top of atmosphere (TOA) brightness data from the Operational Land Imager (OLI) aboard the + joint NASA/USGS Landsat 8 and Landsat 9 satellites and the Multi-Spectral Instrument (MSI) + aboard the ESA (European Space Agency) Sentinel-2A, Sentinel-2B, and Sentinel-2C satellites. + The combined measurement enables global observations of the land every 2-3 days at 30 meter + (m) spatial resolution. The HLS-S30 and HLS-L30 products are gridded to the same resolution and + Military Grid Reference System (MGRS) tiling system and are "stackable" for time series analysis. + This dataset is in the form of cloud-optimized GeoTIFFs. The HLS v2.0 data is generated by NASA's + IMPACT team at Marshall Space Flight Center. The product latency is 1.7 days, from the satellite + overpass to the HLS data availability at NASA's Land Processes Distributed Active Archive Center + (LP DAAC). For more information see LP DAAC's [HLS Overview](https://lpdaac.usgs.gov/data/get-started-data/collection-overview/missions/harmonized-landsat-sentinel-2-hls-overview/). assets: headerImg: From 7af53b0485722d11bcea247da76e5610c70e733c Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Mon, 19 May 2025 12:22:20 -0400 Subject: [PATCH 2/4] Planetary Computer Pro announcement banner (#504) * Bump up version number * Bump up version number (#502) * Planetary computer pro announcement message bar * Also add message to home banner * format code * undo changes to home banner --- package.json | 2 +- src/components/Header/Header.index.tsx | 2 + .../PlanetaryComputerProAnnouncement.tsx | 37 +++++++++++++++++++ src/components/Header/styles.ts | 4 ++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/components/Header/components/PlanetaryComputerProAnnouncement.tsx diff --git a/package.json b/package.json index 07faa4e1..33b22931 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pc-datacatalog", - "version": "2025.4.2", + "version": "2025.4.3", "private": true, "proxy": "http://api:7071/", "dependencies": { diff --git a/src/components/Header/Header.index.tsx b/src/components/Header/Header.index.tsx index 501f4872..62d6dbc6 100644 --- a/src/components/Header/Header.index.tsx +++ b/src/components/Header/Header.index.tsx @@ -2,6 +2,7 @@ import { headerStyle } from "./styles"; import { gridContentStyle, offGridContentStyle } from "styles"; import { HeaderBar } from "./Header.Bar"; import { HeaderOverflow } from "./Header.Overflow"; +import { PlanetaryComputerProAnnouncement } from "./components/PlanetaryComputerProAnnouncement"; const Header = ({ onGrid = true }) => { const navClass = onGrid ? gridContentStyle : offGridContentStyle; @@ -12,6 +13,7 @@ const Header = ({ onGrid = true }) => { + ); }; diff --git a/src/components/Header/components/PlanetaryComputerProAnnouncement.tsx b/src/components/Header/components/PlanetaryComputerProAnnouncement.tsx new file mode 100644 index 00000000..8059f0e5 --- /dev/null +++ b/src/components/Header/components/PlanetaryComputerProAnnouncement.tsx @@ -0,0 +1,37 @@ +import { MessageBar, MessageBarType, Link } from "@fluentui/react"; +import { useState, useEffect } from "react"; +import { messageBarStyle } from "../styles"; + +const sessionStorageKey = "pcProMessageDismissed"; + +export function PlanetaryComputerProAnnouncement() { + const [isDismissed, setIsDismissed] = useState(false); + useEffect(() => { + const dismissed = sessionStorage.getItem(sessionStorageKey); + if (dismissed === "true") { + setIsDismissed(true); + } + }, []); + const onDismiss = () => { + sessionStorage.setItem(sessionStorageKey, "true"); + setIsDismissed(true); + }; + if (isDismissed) { + return null; + } + return ( + + Announcing Microsoft Planetary Computer Pro - Bring the power of the Planetary + Computer to your private geospatial data. + + Click here to learn more + + + ); +} diff --git a/src/components/Header/styles.ts b/src/components/Header/styles.ts index 9c9d4bf9..f94458f9 100644 --- a/src/components/Header/styles.ts +++ b/src/components/Header/styles.ts @@ -74,3 +74,7 @@ export const breakStyle = mergeStyles({ export const rightAligned = mergeStyles({ marginLeft: "auto !important", }); + +export const messageBarStyle = mergeStyles({ + margin: "10px 0", +}); From 1b87223a03141d4732d5b2fea61691c0a24a86a0 Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Thu, 31 Jul 2025 07:53:08 -0700 Subject: [PATCH 3/4] use sharedkey mechanism for authenticating to AzMaps (#507) * use sharedkey mechanism for authenticating to AzMaps * Add Azure Maps subscription key configuration to environment files * Add escape key functionality to close import dialog in explorer tests --- .env.sample | 3 +++ ...e-static-web-apps-icy-meadow-0fc35e30f.yml | 1 + ...tatic-web-apps-thankful-sand-0ed34c70f.yml | 1 + ...tic-web-apps-wonderful-stone-06c70c70f.yml | 1 + api/map-token/__init__.py | 25 +++++++++++-------- cypress/e2e/explorer/selector.cy.js | 2 ++ docker-compose.yml | 1 + src/pages/Explore/components/Map/index.tsx | 5 ++-- 8 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.env.sample b/.env.sample index 0af0f2a8..ef56841f 100644 --- a/.env.sample +++ b/.env.sample @@ -16,5 +16,8 @@ REACT_APP_IMAGE_API_ROOT=https://planetarycomputer-staging.microsoft.com/api/f # Client Id for Azure Maps REACT_APP_AZMAPS_CLIENT_ID=8f49b6d6-5845-4e20-9015-9630df1ca8d2 +# Subscription Key for Azure Maps +REACT_APP_AZMAPS_KEY= + # URL for JHub cloned repo launch (including 'git-pull') REACT_APP_HUB_URL= diff --git a/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml b/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml index 73e1e325..1312bec8 100644 --- a/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml +++ b/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml @@ -25,6 +25,7 @@ jobs: REACT_APP_AZMAPS_CLIENT_ID: ${{ secrets.AZMAPS_CLIENT_ID }} REACT_APP_ONEDS_TENANT_KEY: ${{ secrets.ONEDS_TENANT_KEY }} REACT_APP_HUB_URL: ${{ secrets.HUB_URL }} + REACT_APP_AZMAPS_KEY: ${{ secrets.AZMAPS_KEY }} steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml b/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml index 88b5273e..6f03c417 100644 --- a/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml +++ b/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml @@ -25,6 +25,7 @@ jobs: REACT_APP_AZMAPS_CLIENT_ID: ${{ secrets.AZMAPS_CLIENT_ID }} REACT_APP_ONEDS_TENANT_KEY: ${{ secrets.ONEDS_TENANT_KEY }} REACT_APP_HUB_URL: ${{ secrets.HUB_URL }} + REACT_APP_AZMAPS_KEY: ${{ secrets.AZMAPS_KEY }} steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml b/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml index 699c5537..545b9074 100644 --- a/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml +++ b/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml @@ -25,6 +25,7 @@ jobs: REACT_APP_AZMAPS_CLIENT_ID: ${{ secrets.AZMAPS_CLIENT_ID }} REACT_APP_ONEDS_TENANT_KEY: ${{ secrets.ONEDS_TENANT_KEY }} REACT_APP_HUB_URL: ${{ secrets.HUB_URL }} + REACT_APP_AZMAPS_KEY: ${{ secrets.AZMAPS_KEY }} steps: - uses: actions/checkout@v3 with: diff --git a/api/map-token/__init__.py b/api/map-token/__init__.py index 12021dc9..ca216d9e 100644 --- a/api/map-token/__init__.py +++ b/api/map-token/__init__.py @@ -25,14 +25,17 @@ class TokenResponse(TypedDict): def main(req: func.HttpRequest) -> func.HttpResponse: logger.debug("Python HTTP trigger function processed a request.") - try: - logger.debug("Getting azure maps token") - token = credential.get_token("https://atlas.microsoft.com/.default") - logger.debug("Token acquired") - - resp: TokenResponse = {"token": token.token, "expires_on": token.expires_on} - - return func.HttpResponse(status_code=200, body=json.dumps(resp)) - except ClientAuthenticationError: - logger.exception(f"Error getting azure maps token") - return func.HttpResponse("Error getting token", status_code=500) + # Comment out the implementation below and fail this call forcibly + return func.HttpResponse("This API is not implemented yet", status_code=501) + # Uncomment the implementation below to enable token retrieval + # try: + # logger.debug("Getting azure maps token") + # token = credential.get_token("https://atlas.microsoft.com/.default") + # logger.debug("Token acquired") + + # resp: TokenResponse = {"token": token.token, "expires_on": token.expires_on} + + # return func.HttpResponse(status_code=200, body=json.dumps(resp)) + # except ClientAuthenticationError: + # logger.exception(f"Error getting azure maps token") + # return func.HttpResponse("Error getting token", status_code=500) diff --git a/cypress/e2e/explorer/selector.cy.js b/cypress/e2e/explorer/selector.cy.js index 85398142..75ad94da 100644 --- a/cypress/e2e/explorer/selector.cy.js +++ b/cypress/e2e/explorer/selector.cy.js @@ -75,6 +75,8 @@ describe("Explorer selector tests", () => { cy.contains("import planetary_computer"); cy.contains("Copy"); + // Close the dialog with escape + cy.get("body").type("{esc}"); // Typing escape has closed the dialog cy.contains("import planetary_computer").should("not.exist"); diff --git a/docker-compose.yml b/docker-compose.yml index b4686b37..d1c448d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,7 @@ services: - REACT_APP_AZMAPS_CLIENT_ID - REACT_APP_ONEDS_TENANT_KEY - REACT_APP_HUB_URL + - REACT_APP_AZMAPS_KEY volumes: - .:/usr/src - ~/.npm:/root/.npm diff --git a/src/pages/Explore/components/Map/index.tsx b/src/pages/Explore/components/Map/index.tsx index ba9b0122..5b15d2a6 100644 --- a/src/pages/Explore/components/Map/index.tsx +++ b/src/pages/Explore/components/Map/index.tsx @@ -59,9 +59,8 @@ const ExploreMap = () => { style: DEFAULT_MAP_STYLE, renderWorldCopies: true, authOptions: { - authType: atlas.AuthenticationType.anonymous, - clientId: AZMAPS_CLIENT_ID, - getToken: fetchMapToken, + authType: atlas.AuthenticationType.subscriptionKey, + subscriptionKey: process.env.REACT_APP_AZMAPS_KEY, }, transformRequest: addEntityHeader, }); From 9f8b6fd8e4ad625589c52e8f8e0920cafdf43db8 Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Thu, 31 Jul 2025 08:48:22 -0700 Subject: [PATCH 4/4] 2025.7.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33b22931..a06749a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pc-datacatalog", - "version": "2025.4.3", + "version": "2025.7.1", "private": true, "proxy": "http://api:7071/", "dependencies": {