From 6758544081f9041d1968dc0f07b179d82b0d8525 Mon Sep 17 00:00:00 2001 From: esikkala <esko.ikkala@aalto.fi> Date: Sun, 5 Dec 2021 15:44:50 +0200 Subject: [PATCH] Unify YASGUI config --- src/client/components/facet_results/Export.js | 4 +--- src/client/components/perspectives/sampo/Perspective1.js | 2 ++ src/client/components/perspectives/sampo/Perspective2.js | 2 ++ src/client/components/perspectives/sampo/Perspective3.js | 2 ++ src/client/containers/SemanticPortal.js | 6 +++++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/client/components/facet_results/Export.js b/src/client/components/facet_results/Export.js index d493e3b0..14fc6ce4 100644 --- a/src/client/components/facet_results/Export.js +++ b/src/client/components/facet_results/Export.js @@ -1,9 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import { withStyles } from '@material-ui/core/styles' -// import CloudDownloadIcon from '@material-ui/icons/CloudDownload'; import Button from '@material-ui/core/Button' -import { yasguiBaseUrl, yasguiParams } from '../../configs/sampo/GeneralConfig' import querystring from 'querystring' import intl from 'react-intl-universal' @@ -43,7 +41,7 @@ class Export extends React.Component { } render = () => { - const { classes, data, pageType } = this.props + const { classes, data, pageType, yasguiBaseUrl, yasguiParams } = this.props let yasguiUrl = '' const sparqlQuery = pageType === 'facetResults' ? data.paginatedResultsSparqlQuery : this.props.sparqlQuery if (sparqlQuery !== null) { diff --git a/src/client/components/perspectives/sampo/Perspective1.js b/src/client/components/perspectives/sampo/Perspective1.js index 6b9c6c95..0735397f 100644 --- a/src/client/components/perspectives/sampo/Perspective1.js +++ b/src/client/components/perspectives/sampo/Perspective1.js @@ -329,6 +329,8 @@ const Perspective1 = props => { fetchPaginatedResults={props.fetchPaginatedResults} updatePage={props.updatePage} layoutConfig={props.layoutConfig} + yasguiBaseUrl={props.yasguiBaseUrl} + yasguiParams={props.yasguiParams} />} /> </> diff --git a/src/client/components/perspectives/sampo/Perspective2.js b/src/client/components/perspectives/sampo/Perspective2.js index b1565e21..e611098a 100644 --- a/src/client/components/perspectives/sampo/Perspective2.js +++ b/src/client/components/perspectives/sampo/Perspective2.js @@ -47,6 +47,8 @@ const Perspective2 = props => { fetchPaginatedResults={props.fetchPaginatedResults} updatePage={props.updatePage} layoutConfig={props.layoutConfig} + yasguiBaseUrl={props.yasguiBaseUrl} + yasguiParams={props.yasguiParams} />} /> </> diff --git a/src/client/components/perspectives/sampo/Perspective3.js b/src/client/components/perspectives/sampo/Perspective3.js index 4d3cd215..04b40b62 100644 --- a/src/client/components/perspectives/sampo/Perspective3.js +++ b/src/client/components/perspectives/sampo/Perspective3.js @@ -88,6 +88,8 @@ const Perspective3 = props => { fetchPaginatedResults={props.fetchPaginatedResults} updatePage={props.updatePage} layoutConfig={props.layoutConfig} + yasguiBaseUrl={props.yasguiBaseUrl} + yasguiParams={props.yasguiParams} />} /> </> diff --git a/src/client/containers/SemanticPortal.js b/src/client/containers/SemanticPortal.js index 8110c899..4f0ba9b6 100644 --- a/src/client/containers/SemanticPortal.js +++ b/src/client/containers/SemanticPortal.js @@ -58,7 +58,9 @@ const { rootUrl, layoutConfig, MAPBOX_ACCESS_TOKEN, - MAPBOX_STYLE + MAPBOX_STYLE, + yasguiBaseUrl, + yasguiParams } = await import(`../configs/${portalID}/GeneralConfig`) // ** Portal configuration end ** @@ -416,6 +418,8 @@ const SemanticPortal = props => { pieChartConfig={pieChartConfig} leafletConfig={leafletConfig} networkConfig={networkConfig} + yasguiBaseUrl={yasguiBaseUrl} + yasguiParams={yasguiParams} /> </Grid> </Grid> -- GitLab