Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjeangirard committed Sep 25, 2024
2 parents 60e06dc + bea2231 commit 970f530
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" />
<meta name="google-site-verification" content="_w-F9sijoMQg6zOyO8yiJOAm_ZYxQ720ysRRq9K2psM" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Works magnet</title>
</head>
Expand Down
5 changes: 3 additions & 2 deletions client/src/pages/datasetsYearlyDistribution.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export default function DatasetsYearlyDistribution({ allDatasets, field, subfiel
allFields[currentField][i] += 1;
});
});
const colors = ['#ea5545', '#f46a9b', '#ef9b20', '#edbf33', '#ede15b', '#bdcf32', '#87bc45', '#27aeef', '#544fc5', '#b33dc6', '#d3d3d3'];
const NB_TOP = 10;
// const colors = ['#ea5545', '#f46a9b', '#ef9b20', '#edbf33', '#ede15b', '#bdcf32', '#87bc45', '#27aeef', '#544fc5', '#b33dc6', '#d3d3d3']
const colors = ['#5DA5DA', '#FAA43A', '#60BD68', '#F17CB0', '#B2912F', '#B276B2', '#DECF3F', '#F15854', '#265DAB', '#DF5C24', '#059748', '#E5126F', '#9D722A', '#7B3A96', '#C7B42E', '#CB2027'];
const NB_TOP = 13;
const series = Object.keys(allFields)
.map((name) => ({
name,
Expand Down
4 changes: 2 additions & 2 deletions client/src/utils/templates.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const getIdsTemplate = (ids) => {
const idLink = getIdLink(id.id_type, id.id_value);
let idValueDisplay = id.id_value;
if (idValueDisplay.length > 18) {
idValueDisplay = idValueDisplay.slice(0, 18).concat('..');
idValueDisplay = id.id_value.slice(0, 18).concat('..');
}
html += idLink ? `<a target="_blank" href="${idLink}">${idValueDisplay}</a>` : `<span>${id.id_value}</span>`;
html += '</li>';
Expand All @@ -56,7 +56,7 @@ const allIdsTemplate = (rowData) => getIdsTemplate(rowData?.allIds ?? []);

const linkedDOITemplate = (rowData) => getIdsTemplate(rowData?.fr_publications_linked ?? []);

const worksExampleTemplate = (rowData) => getIdsTemplate(rowData?.worksExample?.filter((e) => ['crossref', 'datacite', 'doi', 'hal_id']?.includes(e.id_type))?.slice(0, 5) ?? []);
const worksExampleTemplate = (rowData) => getIdsTemplate(rowData?.worksExample?.filter((e) => ['crossref', 'datacite', 'doi', 'hal_id', 'openalex']?.includes(e.id_type))?.slice(0, 5) ?? []);

const linkedORCIDTemplate = (rowData) => {
let html = '<ul>';
Expand Down
6 changes: 3 additions & 3 deletions server/src/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import path from 'path';
import YAML from 'yamljs';
import cors from 'cors';
import express from 'express';
import 'express-async-errors';
import cors from 'cors';
import * as OAV from 'express-openapi-validator';
import path from 'path';
import YAML from 'yamljs';

import { handleErrors } from './commons/middlewares/handle-errors';
import router from './router';
Expand Down
1 change: 1 addition & 0 deletions server/src/utils/works.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const getFormat = (formats) => {
return uniqueFormats.toString() ?? '';
};

// TODO should be backend in the bso-datacite index generation
const getPublisher = (publisher) => {
const publishersMapping = {
'SAGE Journals': 'SAGE',
Expand Down

0 comments on commit 970f530

Please sign in to comment.