From 76d9214bafe8d081b47e8051ddd04cd1e43a95f5 Mon Sep 17 00:00:00 2001 From: Hanbyul Jo Date: Thu, 18 Jan 2024 14:41:08 -0500 Subject: [PATCH] Fix lint --- .../exploration/hooks/use-stac-metadata-datasets.ts | 5 +++-- parcel-resolver-veda/index.d.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/scripts/components/exploration/hooks/use-stac-metadata-datasets.ts b/app/scripts/components/exploration/hooks/use-stac-metadata-datasets.ts index f43993e7f..9e0751124 100644 --- a/app/scripts/components/exploration/hooks/use-stac-metadata-datasets.ts +++ b/app/scripts/components/exploration/hooks/use-stac-metadata-datasets.ts @@ -104,9 +104,10 @@ async function fetchStacDatasetById( // CMR STAC returns datetimes with `null` as the last value to indicate ongoing data. const lastDatetime = domain[domain.length - 1] || new Date().toISOString(); - + // CMR STAC misses the dashboard specific attributes, shim these values return { - ...commonTimeseriesParams, + isPeriodic: true, + timeDensity: time_density ?? TimeDensity.DAY, domain: [domainStart, lastDatetime] }; } else { diff --git a/parcel-resolver-veda/index.d.ts b/parcel-resolver-veda/index.d.ts index d63cdf6ec..2ac794f87 100644 --- a/parcel-resolver-veda/index.d.ts +++ b/parcel-resolver-veda/index.d.ts @@ -51,7 +51,11 @@ declare module 'veda' { layerId: string; } - + export enum TimeDensity { + YEAR = 'year', + MONTH = 'month', + DAY = 'day' + } export interface DatasetLayer extends DatasetLayerCommonProps { id: string; stacCol: string; @@ -74,7 +78,7 @@ declare module 'veda' { from: string; to: string; }, - time_density?: 'day' | 'month' | 'year'; + time_density?: TimeDensity; } // A normalized compare layer is the result after the compare definition is // resolved from DatasetLayerCompareSTAC or DatasetLayerCompareInternal. The