Skip to content

Commit

Permalink
[DUOS-1740][risk=no] Pin versions exactly; address eslint warnings (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong authored Nov 9, 2023
1 parent 842faa5 commit 930923e
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 190 deletions.
82 changes: 5 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@databiosphere/bard-client": "^0.1.0",
"@emotion/react": "^11.11.1",
"@databiosphere/bard-client": "0.1.0",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@mui/icons-material": "5.14.15",
"@mui/material": "5.14.15",
"@mui/utils": "5.14.15",
"ajv": "8.12.0",
"ajv-formats": "2.1.1",
"axios": "^1.6.0",
"axios": "1.6.0",
"bootstrap": "3.4.1",
"dompurify": "3.0.6",
"http-proxy-middleware": "^2.0.6",
"http-proxy-middleware": "2.0.6",
"jquery": "3.7.1",
"js-file-download": "0.4.12",
"lodash": "4.17.21",
"mixin-deep": "2.0.1",
"moment": "2.29.4",
"noty": "3.2.0-beta",
"query-string": "^7.1.3",
"query-string": "7.1.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-dropzone": "14.2.3",
Expand Down Expand Up @@ -61,7 +61,6 @@
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/preset-react": "7.22.15",
"@types/react": "18.2.33",
"ajv-cli": "5.0.0",
"cypress": "13.3.3",
"eslint": "7.32.0",
"eslint-plugin-flowtype": "7.0.0",
Expand All @@ -80,10 +79,5 @@
"not dead",
"not ie <= 11",
"not op_mini all"
],
"overrides": {
"ajv-cli": {
"fast-json-patch": "^3.1.1"
}
}
]
}
51 changes: 0 additions & 51 deletions src/libs/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,50 +47,6 @@ export const getOntologyUrl = async(baseUrl = '') => {
return env === 'local' ? baseUrl : await Config.getOntologyApiUrl();
};

const dataTemplate = {
accessTotal: [
['Results', 'Votes'],
['Reviewed cases', 0],
['Pending cases', 0]
],
accessReviewed: [
['Results', 'Votes'],
['Yes', 0],
['No', 0]
],
dulTotal: [
['Results', 'Votes'],
['Reviewed cases', 0],
['Pending cases', 0]
],
dulReviewed: [
['Results', 'Votes'],
['Yes', 0],
['No', 0]
],
RPTotal: [
['Results', 'Votes'],
['Reviewed cases', 0],
['Pending cases', 0]
],
RPReviewed: [
['Results', 'Votes'],
['Yes', 0],
['No', 0]
],
VaultReviewed: [
['Results', 'Votes'],
['Yes', 0],
['No', 0]
],
Agreement: [
['Results', 'Votes'],
['Agreement', 0],
['Disagreement', 0]
]
};


export const DAC = {

list: async (withUsers) => {
Expand Down Expand Up @@ -814,13 +770,6 @@ const fetchAny = async (...args) => {
return res;
};

const getFile = async (URI, fileName) => {
const res = await fetchOk(URI, Config.fileBody());
fileName = fileName === null ? getFileNameFromHttpResponse(res) : fileName;
let blob = await res.blob();
fileDownload(blob, fileName);
};

const getFileNameFromHttpResponse = (response) => {
const respHeaders = response.headers;
return respHeaders.get('Content-Disposition').split(';')[1].trim().split('=')[1];
Expand Down
6 changes: 3 additions & 3 deletions src/libs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ export const Notifications = {
*/
export const PromiseSerial = funcs =>
funcs.reduce((promise, func) =>
promise.then(result =>
func().then(Array.prototype.concat.bind(result))),
Promise.resolve([]));
promise.then(result =>
func().then(Array.prototype.concat.bind(result))),
Promise.resolve([]));

//////////////////////////////////
//DAR CONSOLES UTILITY FUNCTIONS//
Expand Down
1 change: 0 additions & 1 deletion src/pages/DACDatasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {consoleTypes} from '../components/dac_dataset_table/DACDatasetTableCellD
import style from './DACDatasets.module.css';
import {Button} from '@mui/material';
import {DatasetService} from '../utils/DatasetService';
import {isDevEnv} from '../utils/EnvironmentUtils';

export default function DACDatasets(props) {

Expand Down
1 change: 0 additions & 1 deletion src/pages/DatasetCatalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {getBooleanFromEventHtmlDataValue, USER_ROLES} from '../libs/utils';
import {DataUseTranslation} from '../libs/dataUseTranslation';
import {spinnerService} from '../libs/spinner-service';
import { ArrowDropUp, ArrowDropDown } from '@mui/icons-material';
import {isDevEnv} from '../utils/EnvironmentUtils';
import DuosLogo from '../images/duos-network-logo.svg';
import style from './DatasetCatalog.module.css';

Expand Down
8 changes: 4 additions & 4 deletions src/pages/DatasetSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const signingOfficialQuery = (user) => {
'submitter.institution.id': user.institution.id
}
};
}
};

// query to return approved DAC studies from the user's institution
const myInstitutionQuery = (user) => {
Expand All @@ -40,7 +40,7 @@ const myInstitutionQuery = (user) => {
]
}
};
}
};

export const DatasetSearch = (props) => {
const { match: { params: { query } } } = props;
Expand Down Expand Up @@ -146,7 +146,7 @@ export const DatasetSearch = (props) => {
icon: homeIcon,
title: query + ' Data Library',
}
}
};

const key = query === undefined ? '/datalibrary' : toLower(query);
const version = versions[key] === undefined ? versions['/custom'] : versions[key];
Expand Down Expand Up @@ -184,7 +184,7 @@ export const DatasetSearch = (props) => {
}
};
init();
}, []);
});

return (
loading ?
Expand Down
Loading

0 comments on commit 930923e

Please sign in to comment.