mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-31 01:11:16 -07:00
Data pipeline and client fixes
This commit is contained in:
parent
7722b830e2
commit
9e33932600
8 changed files with 45 additions and 30 deletions
|
@ -28,7 +28,6 @@ GATSBY_FILE_DL_PATH_1_0_SHAPE_FILE_ZIP=downloadable/1.0-shapefile-codebook.zip
|
|||
GATSBY_FILE_DL_PATH_1_0_DATA_DOC=downloadable/1.0-data-documentation.zip
|
||||
GATSBY_FILE_DL_PATH_BETA_TRAINING_SLIDES_PPT=downloadable/technical-training-slides.pptx
|
||||
|
||||
|
||||
GATSBY_FILE_DL_PATH_2_0_COMMUNITIES_LIST_XLS=downloadable/2.0-communities.xlsx
|
||||
GATSBY_FILE_DL_PATH_2_0_COMMUNITIES_LIST_CSV=downloadable/2.0-communities.csv
|
||||
GATSBY_FILE_DL_PATH_2_0_COMMUNITIES_LIST_PDF=downloadable/2.0-communities-list.pdf
|
||||
|
@ -44,9 +43,4 @@ GATSBY_FILE_DL_PATH_2_0_M_23_09_SIGNED_PDF=downloadable/M-23-09_Signed_CEQ_CPO_e
|
|||
GATSBY_FILE_DL_PATH_TSD_ES_PDF=downloadable/cejst-technical-support-document.pdf
|
||||
GATSBY_FILE_DL_PATH_HOW_TO_COMMUNITIES_PDF=downloadable/draft-communities-list.pdf
|
||||
|
||||
GATSBY_MAP_TILES_PATH=tiles
|
||||
|
||||
# If you want the map to render a MapBox base map (as opposed to the
|
||||
# open source one from CartoDB), please create your own API TOKEN from
|
||||
# your MapBox account and add the token here:
|
||||
MAPBOX_STYLES_READ_TOKEN=''
|
||||
GATSBY_MAP_TILES_PATH=tiles
|
|
@ -4,6 +4,7 @@ import React from 'react';
|
|||
import {defineMessages} from 'react-intl';
|
||||
import * as COMMON_COPY from './common';
|
||||
import {VERSION_NUMBER, VERSIONS} from './methodology';
|
||||
import {TILE_BASE_URL} from '../constants';
|
||||
|
||||
export const PAGE_INTRO = defineMessages({
|
||||
PAGE_TILE: {
|
||||
|
@ -29,19 +30,26 @@ export const PAGE_INTRO = defineMessages({
|
|||
});
|
||||
|
||||
export const getDownloadFileUrl = (filePath: string | undefined, version: VERSIONS = VERSIONS.V2_0) => {
|
||||
const scorePath = version === VERSIONS.BETA ?
|
||||
process.env.GATSBY_BETA_SCORE_PATH :
|
||||
version === VERSIONS.V1_0 ?
|
||||
process.env.GATSBY_1_0_SCORE_PATH :
|
||||
process.env.GATSBY_2_0_SCORE_PATH;
|
||||
let scorePath;
|
||||
|
||||
if (process.env.DATA_SOURCE === 'local') {
|
||||
scorePath = process.env.GATSBY_DATA_PIPELINE_SCORE_PATH_LOCAL;
|
||||
} else {
|
||||
scorePath = version === VERSIONS.BETA ?
|
||||
process.env.GATSBY_BETA_SCORE_PATH :
|
||||
version === VERSIONS.V1_0 ?
|
||||
process.env.GATSBY_1_0_SCORE_PATH :
|
||||
process.env.GATSBY_2_0_SCORE_PATH;
|
||||
}
|
||||
|
||||
return [
|
||||
process.env.GATSBY_CDN_TILES_BASE_URL,
|
||||
TILE_BASE_URL,
|
||||
scorePath,
|
||||
filePath,
|
||||
].join('/');
|
||||
};
|
||||
|
||||
// Define meta data on dowload files
|
||||
// Define meta data on download files
|
||||
export const DOWNLOAD_FILES = {
|
||||
NARWAL: {
|
||||
COMMUNITIES_LIST_XLS: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue