Skip to content

Commit

Permalink
chore: updated itemsfilter, fixed regressions from staging merge, upd…
Browse files Browse the repository at this point in the history
…ated markdown fetching for new catalog assets approach
  • Loading branch information
santilland committed Jul 25, 2023
1 parent 9bf0d04 commit 6bef60a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 23 deletions.
32 changes: 23 additions & 9 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@chenfengyuan/vue-countdown": "^1.1.5",
"@eox/itemfilter": "^0.2.2",
"@eox/itemfilter": "^0.5.4",
"@eox/layerswitcher": "^0.1.0",
"@geoblocks/ol-maplibre-layer": "git+https://git@github.com/EOX-A/ol-maplibre-layer.git#37c00560e4140a13d3083a148dca46d490aac4bd",
"@turf/difference": "^6.5.0",
Expand Down
10 changes: 3 additions & 7 deletions app/src/components/DataPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@
target="_blank"
v-if="dataObject
&& !showMap
&& !this.baseConfig.indicatorsDefinition[
indicatorObject.indicator
].disableCSV"
&& !dataObject.disableCSV"
>
<v-icon left>mdi-download</v-icon>
download csv
Expand Down Expand Up @@ -604,10 +602,8 @@ export default {
*/
},
externalData() {
const dataFromDefinition = this.baseConfig.indicatorsDefinition[
this.indicatorObject.indicator
].externalData;
const dataFromIndicator = this.indicatorObject.externalData;
const dataFromDefinition = this.indicatorObject.externalData;
const dataFromIndicator = this.dataObject.externalData;
if (dataFromDefinition) {
return dataFromDefinition;
}
Expand Down
7 changes: 6 additions & 1 deletion app/src/components/IndicatorFiltersPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export default {
const configs = {
esa: {
titleProperty: 'title',
filterProperties: ['themes', 'region', 'tags', 'satellite', 'sensor'],
filterProperties: [
// { key: 'themes', title: 'Theme' },
{ key: 'tags', title: 'Tag' },
{ key: 'satellite', title: 'Satellite' },
{ key: 'sensor', title: 'Sensor' },
],
aggregateResults: 'themes',
enableSearch: true,
enableHighlighting: true,
Expand Down
2 changes: 2 additions & 0 deletions app/src/config/esa.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,13 @@ export const indicatorsDefinition = Object.freeze({
themes: ['economy'],
story: '/eodash-data/stories/E4',
},
/*
E5: {
indicatorSummary: 'Inventory levels of intermediate goods',
themes: ['economy'],
story: '/eodash-data/stories/E5',
},
*/
E6: {
indicatorSummary: 'Inventory levels of factory inputs',
themes: ['economy'],
Expand Down
6 changes: 1 addition & 5 deletions app/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,8 @@ export async function loadIndicatorData(baseConfig, payload) {
// Check for stac story asset
if ('assets' in jsonData) {
if ('story' in jsonData.assets) {
const mdUrl = `${
baseConfig.STACEndpoint.replace('collection.json', '')
}/${jsonData.assets.story.href}`;
indicatorObject.story = mdUrl;
// Now we fetch the markdown info direcly
indicatorObject.markdown = await fetch(mdUrl).then((md) => md.text());
indicatorObject.markdown = await fetch(jsonData.assets.story.href).then((md) => md.text());
}
}

Expand Down

0 comments on commit 6bef60a

Please sign in to comment.