Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
zwright committed Mar 8, 2021
2 parents 5107866 + 316aa46 commit 15b44dd
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orion-web",
"version": "2.8.0",
"version": "2.9.0",
"private": true,
"devDependencies": {
"acorn": "^7.2.0",
Expand All @@ -17,7 +17,7 @@
"@fortawesome/free-solid-svg-icons": "5.11.2",
"@fortawesome/react-fontawesome": "0.1.7",
"antd": "3.26.0",
"axios": "0.19.0",
"axios": "0.21.1",
"bootstrap-css-only": "4.3.1",
"bowser": "2.7.0",
"braces": "3.0.2",
Expand Down
Binary file added public/img/icon_epigenetics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/icon_metabolomics_132x132.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/icon_proteomics_132x132.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/actions/Error/errorActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export const handleError = (statusCode) => {
};

export const sendMessageToBackend = (error) => {

if (!error.status) {
return (dispatch) => {
dispatch(window.location.reload());
}
}
if (error.response && error.response.status && error.response.status >= 400) {
return (dispatch) => {
let href = window.location.href;
Expand Down
10 changes: 5 additions & 5 deletions src/actions/userActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { sendMessageToBackend } from './Error/errorActions';
const api = Api.getInstance();

export const getUserInformation = () => {
return (dispatch) => {
api.get('/api/v1/userInformation')
.then(res => {
return (dispatch) => {
api.get('/api/v1/userInformation')
.then(res => {
dispatch(setUserInformation(res.data));
})
.catch(err => {
dispatch(sendMessageToBackend(err));
});
dispatch(sendMessageToBackend(err));
});
};
}

Expand Down
6 changes: 6 additions & 0 deletions src/components/Packages/dataTypeIconHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export const iconDataTypes = new Map(
iconImage: 'icon_transcriptomics_132x132.png'
}
],
['Epigenetics',
{
iconDataType: 'Epigenetics',
iconImage: 'icon_epigenetics.png'
}
],
['Pilot 3',
{
iconDataType: 'Pilot3',
Expand Down
9 changes: 4 additions & 5 deletions src/components/Packages/dataTypeIconHelper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ describe('getDataTypeIconInfo', () => {
{"iconType":"Imaging","packageTypes":["3-D Tissue Imaging","Multiplex ISH","CODEX","Whole Slide Images"]},
{"iconType":"Proteomics","packageTypes":["Bulk Proteomics","Sub-segmental Proteomics","Near-single-cell Proteomics"]},
{"iconType":"Pilot 3","packageTypes":["Pilot 3 Receipt Picture"]},
{"iconType":"Other","packageTypes":["DNA Methylation","Other"]}];
{"iconType":"Epigenetics","packageTypes":["ATAC-seq"]},
{"iconType":"Other","packageTypes":["Other"]}];

describe("Other types", () => {
it('should return Other when not in list', () => {
Expand All @@ -19,9 +20,6 @@ describe('getDataTypeIconInfo', () => {
it('should return Other when Other', () => {
expect(getDataTypeIconInfo(packageTypeIcons, "Other").iconDataType).toBe("Other");
});
it('should return Other when DNA Methylation', () => {
expect(getDataTypeIconInfo(packageTypeIcons, "DNA Methylation").iconDataType).toBe("Other");
});
});

describe("Imaging types", () => {
Expand Down Expand Up @@ -84,5 +82,6 @@ describe('getDataTypeIconInfo', () => {
it('should return Transcriptomics when Sub-segment RNA-Seq', () => {
expect(getDataTypeIconInfo(packageTypeIcons, "Sub-segmental RNA-Seq").iconDataType).toBe("Transcriptomics");
});
})
});

});

0 comments on commit 15b44dd

Please sign in to comment.