diff --git a/src/components/manage/Blocks/DiscodataComponents/Custom/View.jsx b/src/components/manage/Blocks/DiscodataComponents/Custom/View.jsx index b7f93410..b486d10c 100644 --- a/src/components/manage/Blocks/DiscodataComponents/Custom/View.jsx +++ b/src/components/manage/Blocks/DiscodataComponents/Custom/View.jsx @@ -300,7 +300,7 @@ const CountrySelector = (props) => { '@type': 'discodata_sql_builder', sql: { value: - '{"fieldsets":[{"id":"sql_metadata","title":"SQL","fields":["analysis_countries"]}],"properties":{"analysis_countries":{"title":"Analysis countries","isCollection":true,"hasPagination":true,"urlQuery":true,"sql":"SELECT DISTINCT PQPC.CountryCode as [key], LC.[CountryName] as [value], LC.[CountryName] as [text]\\nFROM [IED].[latest].[PollutantQuantityPerCapita] as PQPC\\nLEFT JOIN [IED].[latest].[LOV_Countries] as LC\\nON PQPC.[CountryCode] = LC.[CountryCode]\\nWHERE reportingYear IN (\'2018\')"}},"required":[]}', + '{"fieldsets":[{"id":"sql_metadata","title":"SQL","fields":["analysis_countries"]}],"properties":{"analysis_countries":{"title":"Analysis countries","isCollection":true,"hasPagination":true,"urlQuery":true,"sql":"SELECT distinct c.CountryCode as [key], c.countryName as [value], c.countryName as [text]\\nFROM [IED].[latest].[Tableau_Analysis1_2_table] AS a \\nINNER JOIN [IED].[latest].[Tableau_Analysis1_2_bigInstallations] AS b ON a.FacilityId = b.FacilityId\\nINNER JOIN [IED].[latest].[LOV_Countries] c on c.CountryCode = a.CountryCode\\nWHERE b.[Pollutant Name] in (\'Cadmium and compounds (as Cd)\', \'Carbon dioxide (CO2)\', \'Lead and compounds (as Pb)\', \'Mercury and compounds (as Hg)\', \'Nickel and compounds (as Ni)\', \'Nitrogen oxides (NOX)\', \'Particulate matter (PM10)\', \'Sulphur oxides (SOX)\', \'Total nitrogen\', \'Total organic carbon(as total C or COD/3) (TOC)\', \'Total phosphorus\')\\nAND a.euregReportingYear IN (\\n SELECT MAX(aa.euregReportingYear) AS maxyear FROM [IED].[latest].[Tableau_Analysis1_2_table] AS aa \\n INNER JOIN [IED].[latest].[Tableau_Analysis1_2_bigInstallations] AS bb \\n ON aa.FacilityId = bb.FacilityId\\n WHERE bb.[Pollutant Name] = b.[Pollutant Name]\\n)"}},"required":[]}', }, }} /> diff --git a/src/config.js b/src/config.js index 2d40a64c..b5412ad1 100644 --- a/src/config.js +++ b/src/config.js @@ -22,14 +22,14 @@ import { import { installDiscodataBlocks } from 'volto-datablocks'; import { applyConfig as eprtrConfig } from './localconfig'; -// const consoleError = console.error.bind(console); -// // eslint-disable-next-line -// console.error = (message, ...args) => { -// if (typeof message === 'string' && message.startsWith('[React Intl]')) { -// return; -// } -// consoleError(message, ...args); -// }; +const consoleError = console.error.bind(console); +// eslint-disable-next-line + console.error = (message, ...args) => { + if (typeof message === 'string' && message.startsWith('[React Intl]')) { + return; + } + consoleError(message, ...args); +}; const addonConfig = [ installTableau,