Skip to content
Snippets Groups Projects
Commit 34d07d29 authored by esikkala's avatar esikkala
Browse files

ApexChart: support also instance home pages

parent 19b8782d
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,8 @@ class ApexChart extends React.Component {
this.props.fetchData({
resultClass: this.props.resultClass,
facetClass: this.props.facetClass,
facetID: this.props.facetID
facetID: this.props.facetID,
uri: this.props.uri
})
}
......@@ -70,7 +71,7 @@ class ApexChart extends React.Component {
width: '100%',
height: '100%'
}
if (pageType === 'facetResults') {
if (pageType === 'facetResults' || pageType === 'instancePage') {
rootStyle = {
height: 'calc(100% - 136px)',
width: 'calc(100% - 64px)',
......@@ -112,7 +113,8 @@ ApexChart.propTypes = {
fetching: PropTypes.bool.isRequired,
resultClass: PropTypes.string,
facetClass: PropTypes.string,
facetID: PropTypes.string
facetID: PropTypes.string,
uri: PropTypes.string
}
export default ApexChart
......@@ -75,6 +75,9 @@ export const getAllResults = ({
facetID: null
}))
}
if (uri !== null) {
q = q.replace('<ID>', `<${uri}>`)
}
if (has(config, 'useNetworkAPI') && config.useNetworkAPI) {
return runNetworkQuery({
endpoint: endpoint.url,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment