From 3ae8666707b350aa255725cf89ade0acbbdd9c64 Mon Sep 17 00:00:00 2001 From: Jarvis <113449836+jarvisraymond-uchicago@users.noreply.github.com> Date: Tue, 3 Oct 2023 07:56:01 -0500 Subject: [PATCH 001/266] Feat/vadc sprint19 (#1426) * feat(storybookCommandUpdate): Updated storybook command (#1415) * Chore/home table filter test (#1419) * chore(homeTableFilterTest): Wrote test, got first test to work correctly * chore(homeTableFilterTest): formatted code * chore(homeTableFilterTest): Finished writing remaining tests for filtering * chore(homeTableFilterTest): Ran eslint-new * chore(homeTableFilterTest): Added tests to validate function returns array of length zero when search term is not found * feat: make sure teamproject is part of workflow submit ...and moved fetchArboristTeamProjectRoles into a shared folder location * feat: unit tests for temProjectApi.js * fix: fix eslint issues --------- Co-authored-by: pieterlukasse --- package.json | 2 +- src/Analysis/GWASApp/GWASContainer.jsx | 2 + .../Steps/ConfigureGWAS/ConfigureGWAS.jsx | 3 + .../Utils/StateManagement/InitialState.js | 1 + src/Analysis/GWASApp/Utils/gwasWorkflowApi.js | 2 + .../filterTableData.test.js | 77 +++++++++++++++++++ .../OHDSIAtlas/Utils/teamProjectApi.js | 12 --- .../OHDSIAtlas/Views/AtlasStarter.jsx | 12 +-- src/Analysis/SharedUtils/teamProjectApi.js | 20 +++++ .../SharedUtils/teamProjectApi.test.js | 53 +++++++++++++ 10 files changed, 161 insertions(+), 23 deletions(-) create mode 100644 src/Analysis/GWASResults/Views/Home/HomeTable/tableDataProcessing/filterTableData.test.js delete mode 100644 src/Analysis/OHDSIAtlas/Utils/teamProjectApi.js create mode 100644 src/Analysis/SharedUtils/teamProjectApi.js create mode 100644 src/Analysis/SharedUtils/teamProjectApi.test.js diff --git a/package.json b/package.json index 0f12228a34..5f2007ca5c 100644 --- a/package.json +++ b/package.json @@ -197,7 +197,7 @@ "eslint": "./node_modules/.bin/eslint --ext js --ext jsx --ext ts --ext tsx --ignore-pattern '**/__generated__/**' --ignore-pattern '**/*.min.js' --ignore-pattern '**/setupJest.js' --ignore-pattern '**/gqlHelper.js' --ignore-pattern '**/formHooks.jsx' --ignore-pattern '**/*.stories.jsx' --fix src data", "eslint-new": "./node_modules/.bin/eslint --no-error-on-unmatched-pattern --ext js --ext jsx --ext ts --ext tsx --ignore-pattern '**/__generated__/**' --ignore-pattern '**/*.ejs' --ignore-pattern '**/*.min.js' --ignore-pattern '**/setupJest.js' --ignore-pattern '**/gqlHelper.js' --ignore-pattern '**/formHooks.jsx' --ignore-pattern '**/*.json' --ignore-pattern '**/Dockerfile' --ignore-pattern '**/*.png' --ignore-pattern '**/*.ico' --ignore-pattern '**/*.stories.jsx' --ignore-pattern '**/*.css' --ignore-pattern '**/*.md' --ignore-pattern '**/*.yml' --ignore-pattern '**/*.conf' --quiet --fix $(git diff --name-only master | xargs)", "elint": "./node_modules/.bin/eslint --ext js --ext jsx --ext ts --ext tsx --ignore-pattern '**/__generated__/**' --ignore-pattern '**/*.min.js' --ignore-pattern '**/setupJest.js'", - "storybook": "start-storybook -p 6006 -s .storybook/public", + "storybook": "npm run params && start-storybook -p 6006 -s .storybook/public", "stylelint": "stylelint 'src/**/*.less' 'src/**/*.css' --config .stylelintrc.js --fix", "sanity-check": "node ./sanity-check" }, diff --git a/src/Analysis/GWASApp/GWASContainer.jsx b/src/Analysis/GWASApp/GWASContainer.jsx index 66cb5343fa..3b6adee62d 100644 --- a/src/Analysis/GWASApp/GWASContainer.jsx +++ b/src/Analysis/GWASApp/GWASContainer.jsx @@ -59,6 +59,7 @@ const GWASContainer = () => { outcome={state.outcome} showModal={false} finalPopulationSizes={state.finalPopulationSizes} + selectedTeamProject={state.selectedTeamProject} /> ); case 4: @@ -74,6 +75,7 @@ const GWASContainer = () => { outcome={state.outcome} showModal finalPopulationSizes={state.finalPopulationSizes} + selectedTeamProject={state.selectedTeamProject} /> ); default: diff --git a/src/Analysis/GWASApp/Steps/ConfigureGWAS/ConfigureGWAS.jsx b/src/Analysis/GWASApp/Steps/ConfigureGWAS/ConfigureGWAS.jsx index f1a2278e58..367f1fb0d1 100644 --- a/src/Analysis/GWASApp/Steps/ConfigureGWAS/ConfigureGWAS.jsx +++ b/src/Analysis/GWASApp/Steps/ConfigureGWAS/ConfigureGWAS.jsx @@ -27,6 +27,7 @@ const ConfigureGWAS = ({ outcome, showModal, finalPopulationSizes, + selectedTeamProject, }) => { const { source } = useSourceContext(); const sourceId = source; // TODO - change name of source to sourceId for clarity @@ -81,6 +82,7 @@ const ConfigureGWAS = ({ imputationScore, selectedCohort, jobName, + selectedTeamProject, ), { onSuccess: (data) => { @@ -170,6 +172,7 @@ ConfigureGWAS.propTypes = { outcome: PropTypes.object.isRequired, showModal: PropTypes.bool, finalPopulationSizes: PropTypes.array.isRequired, + selectedTeamProject: PropTypes.string.isRequired, }; ConfigureGWAS.defaultProps = { diff --git a/src/Analysis/GWASApp/Utils/StateManagement/InitialState.js b/src/Analysis/GWASApp/Utils/StateManagement/InitialState.js index fdf534a42c..0850a72cb7 100644 --- a/src/Analysis/GWASApp/Utils/StateManagement/InitialState.js +++ b/src/Analysis/GWASApp/Utils/StateManagement/InitialState.js @@ -11,6 +11,7 @@ const initialState = { finalPopulationSizes: [], selectionMode: '', messages: [], + selectedTeamProject: 'temporary-test-teamproject01', // TODO - remove and leave '' when teamproject selection is ready }; export default initialState; diff --git a/src/Analysis/GWASApp/Utils/gwasWorkflowApi.js b/src/Analysis/GWASApp/Utils/gwasWorkflowApi.js index 019c4d878e..12d56e4af5 100644 --- a/src/Analysis/GWASApp/Utils/gwasWorkflowApi.js +++ b/src/Analysis/GWASApp/Utils/gwasWorkflowApi.js @@ -11,6 +11,7 @@ export const jobSubmission = async ( imputationScore, selectedCohort, jobName, + selectedTeamProject, ) => { const submitEndpoint = `${gwasWorkflowPath}submit`; const requestBody = { @@ -26,6 +27,7 @@ export const jobSubmission = async ( source_id: sourceId, source_population_cohort: selectedCohort.cohort_definition_id, workflow_name: jobName, + team_project: selectedTeamProject, }; const res = await fetch(submitEndpoint, { method: 'POST', diff --git a/src/Analysis/GWASResults/Views/Home/HomeTable/tableDataProcessing/filterTableData.test.js b/src/Analysis/GWASResults/Views/Home/HomeTable/tableDataProcessing/filterTableData.test.js new file mode 100644 index 0000000000..8d6c86ebbe --- /dev/null +++ b/src/Analysis/GWASResults/Views/Home/HomeTable/tableDataProcessing/filterTableData.test.js @@ -0,0 +1,77 @@ +import filterTableData from './filterTableData'; +import InitialHomeTableState from '../../HomeTableState/InitialHomeTableState'; +import PHASES from '../../../../Utils/PhasesEnumeration'; + +describe('filterTableData', () => { + const testData = [ + { + name: 'name-test-1', + wf_name: 'workflow-name-test-1', + submittedAt: '2023-01-15T12:00:00Z', + finishedAt: '2023-01-20T12:00:00Z', + phase: PHASES.Succeeded, + }, + { + name: 'name-test-2', + wf_name: 'workflow-name-test-2', + submittedAt: '2023-02-15T12:00:00Z', + finishedAt: '2023-02-20T12:00:00Z', + phase: PHASES.Failed, + }, + ]; + + it('should filter data by name search term', () => { + const filteredData = filterTableData(testData, + { ...InitialHomeTableState, ...{ nameSearchTerm: 'name-test-1' } }, + ); + expect(filteredData).toHaveLength(1); + expect(filteredData[0].name).toBe('name-test-1'); + }); + + it('should return an array of length zero if name search term is not found', () => { + const filteredData = filterTableData(testData, + { ...InitialHomeTableState, ...{ nameSearchTerm: 'name-test-3' } }, + ); + expect(filteredData).toHaveLength(0); + }); + + it('should filter data by workflow name search term', () => { + const filteredData = filterTableData(testData, + { ...InitialHomeTableState, ...{ wfNameSearchTerm: 'workflow-name-test-2' } }, + ); + expect(filteredData).toHaveLength(1); + expect(filteredData[0].wf_name).toBe('workflow-name-test-2'); + }); + + it('should return an array of length zero if workflow name search term is not found', () => { + const filteredData = filterTableData(testData, + { ...InitialHomeTableState, ...{ wfNameSearchTerm: 'workflow-name-test-3' } }, + ); + expect(filteredData).toHaveLength(0); + }); + + it('should filter data by submitted date range', () => { + const filteredData = filterTableData(testData, + { ...InitialHomeTableState, ...{ submittedAtSelections: [new Date('2023-01-01'), new Date('2023-03-01')] } }, + ); + expect(filteredData).toHaveLength(2); + expect(filteredData[0].submittedAt).toBe(testData[0].submittedAt); + expect(filteredData[1].submittedAt).toBe(testData[1].submittedAt); + }); + + it('should filter data by job statuses', () => { + const filteredData = filterTableData(testData, + { ...InitialHomeTableState, ...{ jobStatusSelections: [PHASES.Succeeded] } }, + ); + expect(filteredData).toHaveLength(1); + expect(filteredData[0].phase).toBe(PHASES.Succeeded); + }); + + it('should filter data by finished date range', () => { + const filteredData = filterTableData(testData, + { ...InitialHomeTableState, ...{ finishedAtSelections: [new Date('2023-01-15'), new Date('2023-01-22')] } }, + ); + expect(filteredData).toHaveLength(1); + expect(filteredData[0].finishedAt).toBe('2023-01-20T12:00:00Z'); + }); +}); diff --git a/src/Analysis/OHDSIAtlas/Utils/teamProjectApi.js b/src/Analysis/OHDSIAtlas/Utils/teamProjectApi.js deleted file mode 100644 index 661cc66673..0000000000 --- a/src/Analysis/OHDSIAtlas/Utils/teamProjectApi.js +++ /dev/null @@ -1,12 +0,0 @@ -import { authzMappingPath } from '../../../configs'; - -const fetchAuthorizationMappingsForCurrentUser = async () => { - const response = await fetch(authzMappingPath); - if (!response.ok) { - const message = `An error has occured: ${response.status}`; - throw new Error(message); - } - return response.json(); -}; - -export default fetchAuthorizationMappingsForCurrentUser; diff --git a/src/Analysis/OHDSIAtlas/Views/AtlasStarter.jsx b/src/Analysis/OHDSIAtlas/Views/AtlasStarter.jsx index dc9c243a0e..8fcb19f90d 100644 --- a/src/Analysis/OHDSIAtlas/Views/AtlasStarter.jsx +++ b/src/Analysis/OHDSIAtlas/Views/AtlasStarter.jsx @@ -3,21 +3,13 @@ import PropTypes from 'prop-types'; import { Spin, Button } from 'antd'; import { useQuery } from 'react-query'; import queryConfig from '../../SharedUtils/QueryConfig'; -import fetchAuthorizationMappingsForCurrentUser from '../Utils/teamProjectApi'; +import fetchArboristTeamProjectRoles from '../../SharedUtils/teamProjectApi'; import SelectTeamProjectDropDown from '../Components/SelectTeamProjectDropDown'; import LoadingErrorMessage from '../../SharedUtils/LoadingErrorMessage/LoadingErrorMessage'; const AtlasStarter = ({ setCurrentViewAndTeamProject }) => { const [selectedTeamProject, setSelectedTeamProject] = useState(''); - async function fetchArboristTeamProjectRoles() { - const authorizationMappings = await fetchAuthorizationMappingsForCurrentUser(); - const teamProjectList = Object.keys(authorizationMappings) - .filter((key) => key.startsWith('/gwas_projects/')) - .map((key) => ({ teamName: key })); - return { teams: teamProjectList }; - } - const { data, status } = useQuery('teamprojects', fetchArboristTeamProjectRoles, queryConfig); if (status === 'loading') { return ( @@ -32,7 +24,7 @@ const AtlasStarter = ({ setCurrentViewAndTeamProject }) => { } if (status === 'error') { return ( - + ); } return ( diff --git a/src/Analysis/SharedUtils/teamProjectApi.js b/src/Analysis/SharedUtils/teamProjectApi.js new file mode 100644 index 0000000000..82eee3f713 --- /dev/null +++ b/src/Analysis/SharedUtils/teamProjectApi.js @@ -0,0 +1,20 @@ +import { authzMappingPath } from '../../configs'; + +const fetchAuthorizationMappingsForCurrentUser = async () => { + const response = await fetch(authzMappingPath); + if (!response.ok) { + const message = `An error has occured: ${response.status}`; + throw new Error(message); + } + return response.json(); +}; + +const fetchArboristTeamProjectRoles = async () => { + const authorizationMappings = await fetchAuthorizationMappingsForCurrentUser(); + const teamProjectList = Object.keys(authorizationMappings) + .filter((key) => key.startsWith('/gwas_projects/')) + .map((key) => ({ teamName: key })); + return { teams: teamProjectList }; +}; + +export default fetchArboristTeamProjectRoles; diff --git a/src/Analysis/SharedUtils/teamProjectApi.test.js b/src/Analysis/SharedUtils/teamProjectApi.test.js new file mode 100644 index 0000000000..0f29255cea --- /dev/null +++ b/src/Analysis/SharedUtils/teamProjectApi.test.js @@ -0,0 +1,53 @@ +import fetchArboristTeamProjectRoles from './teamProjectApi'; +import { authzMappingPath } from '../../configs'; + +// Mocking the fetch function +global.fetch = jest.fn(); + +describe('fetchArboristTeamProjectRoles', () => { + beforeEach(() => { + // Clear the mock function calls and reset any mock implementation + jest.clearAllMocks(); + }); + + it('fetches and returns team project roles successfully', async () => { + // Define the expected response data + const mockResponse = { + '/gwas_projects/project1': { abc: 'def' }, + '/gwas_projects/project2': { abc: 'def' }, + '/ohter/project3': { abc: 'def' }, + }; + + // Mock the fetch function to return a successful response with the expected data + global.fetch.mockResolvedValueOnce({ + ok: true, + json: () => mockResponse, + }); + + // Call the function and assert the result + const result = await fetchArboristTeamProjectRoles(); + + expect(result).toEqual({ + teams: [ + { teamName: '/gwas_projects/project1' }, + { teamName: '/gwas_projects/project2' }, + ], + }); + + // Ensure that fetch was called with the correct URL + expect(global.fetch).toHaveBeenCalledWith(authzMappingPath); + }); + + it('throws an error when fetch fails', async () => { + // Mock the fetch function to return an error response + global.fetch.mockRejectedValueOnce(new Error('Network error')); + + // Call the function and expect it to throw an error + await expect(fetchArboristTeamProjectRoles()).rejects.toThrow( + 'Network error', + ); + + // Ensure that fetch was called with the correct URL + expect(global.fetch).toHaveBeenCalledWith(authzMappingPath); + }); +}); From 3de73c6d7d71c260936c33a19c662dac34542930 Mon Sep 17 00:00:00 2001 From: Mingfei Shao <2475897+mfshao@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:32:55 -0500 Subject: [PATCH 002/266] Fix/guppy crash (#1427) * debug * fix having undefined fields * update lock * update lock --- package-lock.json | 14 ++--- package.json | 2 +- .../ExplorerFilter/index.jsx | 53 ++++++++++++------- 3 files changed, 41 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6cbad5404b..8de8f49c49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@fortawesome/free-brands-svg-icons": "^5.14.0", "@fortawesome/free-solid-svg-icons": "^5.2.0", "@fortawesome/react-fontawesome": "^0.2.0", - "@gen3/guppy": "^0.17.0", + "@gen3/guppy": "^0.17.1", "@gen3/ui-component": "^0.11.4", "@reactour/tour": "^2.12.0", "@upsetjs/venn.js": "^1.4.2", @@ -3833,9 +3833,9 @@ "dev": true }, "node_modules/@gen3/guppy": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@gen3/guppy/-/guppy-0.17.0.tgz", - "integrity": "sha512-8eGw7TeM9cSrDjk3OVwnzpm8aNY/Pj9JmIpuv3vycRoThBrSu/Q75KFPC9p5/IN6AVe38KKoFBU6ukP9nFK2Ag==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@gen3/guppy/-/guppy-0.17.1.tgz", + "integrity": "sha512-Vr5N11p2vi5iVrmXkTkfuUHpx3vvNj8X2fdnIUtFqWqQVg0K8w7G3L4rTCEhTreSs+JDgj0Q9qRZMFFWCcfymA==", "dependencies": { "@apollo/server": "^4.7.5", "@elastic/elasticsearch": "~7.13.0", @@ -40479,9 +40479,9 @@ "dev": true }, "@gen3/guppy": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@gen3/guppy/-/guppy-0.17.0.tgz", - "integrity": "sha512-8eGw7TeM9cSrDjk3OVwnzpm8aNY/Pj9JmIpuv3vycRoThBrSu/Q75KFPC9p5/IN6AVe38KKoFBU6ukP9nFK2Ag==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@gen3/guppy/-/guppy-0.17.1.tgz", + "integrity": "sha512-Vr5N11p2vi5iVrmXkTkfuUHpx3vvNj8X2fdnIUtFqWqQVg0K8w7G3L4rTCEhTreSs+JDgj0Q9qRZMFFWCcfymA==", "requires": { "@apollo/server": "^4.7.5", "@elastic/elasticsearch": "~7.13.0", diff --git a/package.json b/package.json index 5f2007ca5c..8390086683 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@fortawesome/free-brands-svg-icons": "^5.14.0", "@fortawesome/free-solid-svg-icons": "^5.2.0", "@fortawesome/react-fontawesome": "^0.2.0", - "@gen3/guppy": "^0.17.0", + "@gen3/guppy": "^0.17.1", "@gen3/ui-component": "^0.11.4", "@reactour/tour": "^2.12.0", "@upsetjs/venn.js": "^1.4.2", diff --git a/src/GuppyDataExplorer/ExplorerFilter/index.jsx b/src/GuppyDataExplorer/ExplorerFilter/index.jsx index da67f97fb4..51b117a09e 100644 --- a/src/GuppyDataExplorer/ExplorerFilter/index.jsx +++ b/src/GuppyDataExplorer/ExplorerFilter/index.jsx @@ -60,7 +60,34 @@ class ExplorerFilter extends React.Component { return null; } - componentDidUpdate() { + /** + * Little helper function to apply accessibility filters to aggregation histogram results + * @param {*} accessibleValues list of values that user has access to + * @param {*} histogram raw histogram array + * @returns modified histogram after applying accessibility filters + */ + applyAccessibleFilter = (accessibleValues, histogram) => { + if (!Array.isArray(histogram)) { + throw new Error('Invalid histogram format'); + } + return histogram.filter(({ key }) => { + const accessible = accessibleValues.includes(key); + switch (this.state.selectedAccessFilter) { + case 'all-data': + return true; // always show all items if 'all-data' + case 'with-access': + return accessible; // only show accessible items if 'with-access' + case 'without-access': + return !accessible; // only show unaccessible items if 'without-access' + default: + throw new Error('Invalid access filter option'); + } + }) + .map(({ key, count }) => ({ + key, + count, + accessible: accessibleValues.includes(key), + })); } /** @@ -87,26 +114,12 @@ class ExplorerFilter extends React.Component { // if the field is in accessibleFieldObject, add "accessible=false" // to those items which are unaccessible const accessibleValues = this.props.accessibleFieldObject[field]; - const newHistogram = aggsData[field].histogram - .filter(({ key }) => { - const accessible = accessibleValues.includes(key); - switch (this.state.selectedAccessFilter) { - case 'all-data': - return true; // always show all items if 'all-data' - case 'with-access': - return accessible; // only show accessible items if 'with-access' - case 'without-access': - return !accessible; // only show unaccessible items if 'without-access' - default: - throw new Error('Invalid access filter option'); - } - }) - .map(({ key, count }) => ({ - key, - count, - accessible: accessibleValues.includes(key), - })); + const newHistogram = this.applyAccessibleFilter(accessibleValues, aggsData[field].histogram); res[field] = { histogram: newHistogram }; + if (Array.isArray(aggsData[field].asTextHistogram)) { + const newAsTextHistogram = this.applyAccessibleFilter(accessibleValues, aggsData[field].asTextHistogram); + res[field] = { ...res[field], asTextHistogram: newAsTextHistogram }; + } return res; }, {}); return newAggsData; From 97fc569568d6932b51f2e516d99de5cee44a6e96 Mon Sep 17 00:00:00 2001 From: Shawn O'Connor Date: Tue, 3 Oct 2023 14:46:36 -0500 Subject: [PATCH 003/266] (PXP-11107): fix loading of gitops.css locally (#1421) --- .gitignore | 1 + boot.js | 11 +---------- custom/customize.sh | 3 +++ runWebpack.sh | 1 + 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 7bbabd4f14..40318e58bc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ data/schema.graphql data/schema.json src/params.js src/css/themeoverrides.css +public/* src/img/sponsors/gitops-sponsors/ __generated__/ *.log diff --git a/boot.js b/boot.js index 8cb85f5870..d7355ab319 100644 --- a/boot.js +++ b/boot.js @@ -19,18 +19,9 @@ scriptNode.src = buildSrc; scriptNode.type = 'text/javascript'; document.body.appendChild(scriptNode); - // create theme override node in body - const themeOverridesSrc = (basename && basename !== '/') ? `${basename}/src/css/themeoverrides.css?_=${cssVersion}` : `/src/css/themeoverrides.css?_=${cssVersion}`; - let linkNode = document.createElement('link'); - linkNode.href = themeOverridesSrc; - linkNode.type = 'text/css'; - linkNode.id = 'gen3-theme-overrides'; - linkNode.rel = 'stylesheet'; - document.body.appendChild(linkNode); // create local theme override node in body - const localThemeOverridesSrc = (basename && basename !== '/') ? `https://localhost:9443${basename}/src/css/themeoverrides.css` : 'https://localhost:9443/src/css/themeoverrides.css'; linkNode = document.createElement('link'); - linkNode.href = localThemeOverridesSrc; + linkNode.href = 'https://localhost:9443/src/css/themeoverrides.css'; linkNode.type = 'text/css'; linkNode.rel = 'stylesheet'; document.body.appendChild(linkNode); diff --git a/custom/customize.sh b/custom/customize.sh index 1f5532a792..73a28f5621 100644 --- a/custom/customize.sh +++ b/custom/customize.sh @@ -29,7 +29,10 @@ fi if [ -f custom/css/$APP.css ]; then cp custom/css/$APP.css src/css/themeoverrides.css + mkdir -p public/src/css/ + cp custom/css/$APP.css public/src/css/themeoverrides.css else + rm -rf public/src echo "/* generated file - see customize.sh */" > src/css/themeoverrides.css fi diff --git a/runWebpack.sh b/runWebpack.sh index 336349553a..d23b16c38d 100755 --- a/runWebpack.sh +++ b/runWebpack.sh @@ -108,6 +108,7 @@ gitops_config() { cp $copySource/*.* $copyDest/ else echo "INFO: gitops_config - no $copySource in gitops" + rm -f $copyDest fi done fi From 50573f4f1dc3e6d1b9325dd2be09859987b7a09f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:59:17 -0500 Subject: [PATCH 004/266] chore(deps-dev): bump postcss from 8.4.27 to 8.4.31 (#1429) Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mingfei Shao <2475897+mfshao@users.noreply.github.com> --- package-lock.json | 18 +++++++++--------- src/Covid19Dashboard/standalone/package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8de8f49c49..d92371c020 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28376,9 +28376,9 @@ } }, "node_modules/postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -37663,7 +37663,7 @@ "eslint-plugin-react": "^7.4.0", "eslint-plugin-react-hooks": "^4.2.0", "html-webpack-plugin": "^4.0.0", - "postcss": "^8.0.0", + "postcss": "^8.4.31", "postcss-less": "^6.0.0", "stylelint": "^15.0.0", "typescript": "^4.1.3", @@ -53081,7 +53081,7 @@ "less-loader": "^4.1.0", "mapbox-gl": "^1.9.1", "nanoid": "^3.1.22", - "postcss": "^8.0.0", + "postcss": "^8.4.31", "postcss-less": "^6.0.0", "prop-types": "^15.6.0", "react": "16.8.6", @@ -59727,9 +59727,9 @@ "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==" }, "postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "requires": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -61739,7 +61739,7 @@ "fb-watchman": "^2.0.0", "fbjs": "^3.0.0", "glob": "^7.1.1", - "immutable": "*", + "immutable": "~3.7.6", "nullthrows": "^1.1.1", "relay-runtime": "10.1.3", "signedsource": "^1.0.0", diff --git a/src/Covid19Dashboard/standalone/package.json b/src/Covid19Dashboard/standalone/package.json index 33a6ef109a..de4ad9e3f6 100644 --- a/src/Covid19Dashboard/standalone/package.json +++ b/src/Covid19Dashboard/standalone/package.json @@ -36,7 +36,7 @@ "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-flow-strip-types": "^6.22.0", "dotenv-webpack": "^7.0.2", - "postcss": "^8.0.0", + "postcss": "^8.4.31", "postcss-less": "^6.0.0", "eslint": "^7.18.0", "eslint-import-resolver-typescript": "^2.3.0", From 2d6d47778afba7b65c5437452360f8e4359ffbd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:41:33 -0500 Subject: [PATCH 005/266] Chore(deps): Bump import-in-the-middle from 1.3.4 to 1.4.2 (#1379) Bumps [import-in-the-middle](https://github.com/DataDog/import-in-the-middle) from 1.3.4 to 1.4.2. - [Release notes](https://github.com/DataDog/import-in-the-middle/releases) - [Commits](https://github.com/DataDog/import-in-the-middle/compare/v1.3.4...v1.4.2) --- updated-dependencies: - dependency-name: import-in-the-middle dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mingfei Shao <2475897+mfshao@users.noreply.github.com> From 5c7073daa23112df4930edd6b4696d85263b5fa4 Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Thu, 5 Oct 2023 17:36:16 +0200 Subject: [PATCH 006/266] feat: remove atlas starter prototype --- src/Analysis/AnalysisApp.jsx | 7 -- src/Analysis/OHDSIAtlas/AtlasContainer.jsx | 48 ------------- .../Components/SelectTeamProjectDropDown.jsx | 32 --------- .../OHDSIAtlas/Views/AtlasStarter.jsx | 53 -------------- .../OHDSIAtlas/Views/AtlasStarter.stories.jsx | 71 ------------------- 5 files changed, 211 deletions(-) delete mode 100644 src/Analysis/OHDSIAtlas/AtlasContainer.jsx delete mode 100644 src/Analysis/OHDSIAtlas/Components/SelectTeamProjectDropDown.jsx delete mode 100644 src/Analysis/OHDSIAtlas/Views/AtlasStarter.jsx delete mode 100644 src/Analysis/OHDSIAtlas/Views/AtlasStarter.stories.jsx diff --git a/src/Analysis/AnalysisApp.jsx b/src/Analysis/AnalysisApp.jsx index d65e135001..5081af1054 100644 --- a/src/Analysis/AnalysisApp.jsx +++ b/src/Analysis/AnalysisApp.jsx @@ -13,7 +13,6 @@ import './AnalysisApp.css'; import sessionMonitor from '../SessionMonitor'; import GWASContainer from './GWASApp/GWASContainer'; import GWASResultsContainer from './GWASResults/GWASResultsContainer'; -import AtlasContainer from './OHDSIAtlas/AtlasContainer'; const queryClient = new QueryClient(); @@ -137,12 +136,6 @@ class AnalysisApp extends React.Component { ); } - case 'OHDSI Atlas': - return ( -
- -
- ); default: // this will ensure the main window will process the app messages (if any): window.addEventListener('message', this.processAppMessages); diff --git a/src/Analysis/OHDSIAtlas/AtlasContainer.jsx b/src/Analysis/OHDSIAtlas/AtlasContainer.jsx deleted file mode 100644 index 81094bd4bc..0000000000 --- a/src/Analysis/OHDSIAtlas/AtlasContainer.jsx +++ /dev/null @@ -1,48 +0,0 @@ -import React, { useState } from 'react'; -import PropTypes from 'prop-types'; -import AtlasStarter from './Views/AtlasStarter'; - -const AtlasContainer = ({ atlasUrl, handleIframeApp }) => { - const [currentView, setCurrentView] = useState('start'); - const [teamProject, setTeamProject] = useState(''); - - const setCurrentViewAndTeamProject = (viewName, selectedTeamProject) => { - setCurrentView(viewName); - setTeamProject(selectedTeamProject); - }; - const generateView = () => { - switch (currentView) { - case 'start': - return ; - case 'atlas': - return ( - -
-