Skip to content

Commit

Permalink
GAT-1887: Resolver Merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
reubensamuel committed Mar 10, 2023
2 parents 56db316 + 8202ee0 commit d5ba5d4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
25 changes: 25 additions & 0 deletions old.cloudbuild_prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker pull gcr.io/$PROJECT_ID/${_APP_NAME}:latest || exit 0']
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'-t',
'gcr.io/$PROJECT_ID/${_APP_NAME}:latest',
'--cache-from', 'gcr.io/$PROJECT_ID/${_APP_NAME}:latest',
'--build-arg', 'SKIP_PREFLIGHT_CHECK=${_SKIP_PREFLIGHT_CHECK}',
'--build-arg', 'NODE_ENV=${_NODE_ENV}',
'--build-arg', 'REACT_APP_HOTJAR_CODE=${_REACT_APP_HOTJAR_CODE}',
'--build-arg', 'REACT_APP_HOTJAR_CODE_VERSION=${_REACT_APP_HOTJAR_CODE_VERSION}',
'--build-arg', 'REACT_APP_METADATA_CATALOG_URL=${_REACT_APP_METADATA_CATALOG_URL}',
'--build-arg', 'REACT_APP_NEWSLETTER_EXAMPLE_URL=${_REACT_APP_NEWSLETTER_EXAMPLE_URL}',
'--build-arg', 'REACT_APP_TERMS_AND_CONDITIONS_URL=${_REACT_APP_TERMS_AND_CONDITIONS_URL}',
'--build-arg', 'REACT_APP_GATEWAY_PRIVACY_POLICY_URL=${_REACT_APP_GATEWAY_PRIVACY_POLICY_URL}',
'--build-arg', 'REACT_APP_FIVE_SAFES_URL=${_REACT_APP_FIVE_SAFES_URL}',
'.']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/${_APP_NAME}:latest']
timeout: 2400s
options:
machineType: 'E2_HIGHCPU_8'
23 changes: 14 additions & 9 deletions src/pages/search/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1535,24 +1535,29 @@ class SearchPage extends Component {
googleAnalytics.recordEvent('Data Use', `Download Results`, `Search values: ${url}`);

axios.get(`${baseURL}/api/v2/data-use-registers/search?${url}`).then(response => {
this.formatDataUseRegisterForDownload(response.data.result);
this.formatDataUseRegisterForDownload(response.data.newPayload);
});
};

formatDataUseRegisterForDownload(dataUses) {
let formattedDataUses = [];

dataUses.forEach(dataUse => {
const gatewayApplicants = dataUse.gatewayApplicantsDetails.map(applicant => {
return `${applicant.firstname} ${applicant.lastname} `;
});

const gatewayOutputsTools = dataUse.gatewayOutputsToolsInfo.map(tool => {
return `${tool.name} `;
});
// Removed because we've removed it from the payload due to excessive
// data size from unoptimised query
//
//
// const gatewayOutputsTools = dataUse.gatewayOutputsToolsInfo.map(tool => {
// return `${tool.name} `;
// });

const gatewayOutputsPapers = dataUse.gatewayOutputsPapersInfo.map(paper => {
return `${paper.name} `;
});
// const gatewayOutputsPapers = dataUse.gatewayOutputsPapersInfo.map(paper => {
// return `${paper.name} `;
// });

formattedDataUses.push({
'Project ID': dataUse.projectIdText,
Expand Down Expand Up @@ -1588,8 +1593,8 @@ class SearchPage extends Component {
'Access Date': moment(dataUse.accessDate).format('DD/MM/YY'),
'Access Type': dataUse.accessType,
'Privacy Enhancements': dataUse.privacyEnhancements ? dataUse.privacyEnhancements.replace(/"/g, '""') : '',
'Gateway Research Outputs Tools': gatewayOutputsTools,
'Gateway Research Outputs Papers': gatewayOutputsPapers,
// 'Gateway Research Outputs Tools': gatewayOutputsTools,
// 'Gateway Research Outputs Papers': gatewayOutputsPapers,
'Research Outputs': dataUse.nonGatewayOutputs,
Keywords: dataUse.keywords,
});
Expand Down

0 comments on commit d5ba5d4

Please sign in to comment.