feat(export): network download (MIN-240)
3 unresolved threads
3 unresolved threads
Added the possibility to download data from network from the export tab. We send the items selected by the user to the backend and the backend returns the text to be saved in a file. The data is saved in a .csv file. An improvement reported by Marek regarding removing types and columns sections, displaying only available annotations and removing special characters from their names has also been added.
Merge request reports
Activity
Filter activity
assigned to @mateusz-winiarczyk
added 4 commits
-
2c7b6c63...ab449b1e - 3 commits from branch
development
- 0828e3fe - Merge remote-tracking branch 'origin/development' into MIN-240-download-network
-
2c7b6c63...ab449b1e - 3 commits from branch
added 3 commits
-
0828e3fe...2e797ddc - 2 commits from branch
development
- 902f6b88 - Merge remote-tracking branch 'origin/development' into MIN-240-download-network
-
0828e3fe...2e797ddc - 2 commits from branch
- src/redux/export/export.thunks.ts 0 → 100644
13 annotations: string[]; 14 includedCompartmentIds: number[]; 15 excludedCompartmentIds: number[]; 16 reactionTypes: string[]; 17 }; 18 19 const downloadFileFromBlob = (data: string): void => { 20 const fileName = `${PROJECT_ID}-networkExport.csv`; 21 const url = window.URL.createObjectURL(new Blob([data])); 22 const link = document.createElement('a'); 23 link.href = url; 24 link.setAttribute('download', fileName); 25 document.body.appendChild(link); 26 link.click(); 27 link.remove(); 28 }; changed this line in version 5 of the diff
10 reactionTypes: string[]; 11 }; 12 13 type GetDownloadBodyRequestProps = { 14 types: CheckboxItem[]; 15 columns: CheckboxItem[]; 16 modelIds: number[]; 17 annotations: CheckboxItem[]; 18 includedCompartmentPathways: CheckboxItem[]; 19 excludedCompartmentPathways: CheckboxItem[]; 20 }; 21 22 const extractAndParseNumberIdFromCompartment = (compartment: CheckboxItem): number => { 23 const [, id] = compartment.id.split('-'); 24 return Number(id); 25 }; 9 excludedCompartmentIds: number[]; 10 reactionTypes: string[]; 11 }; 12 13 type GetDownloadBodyRequestProps = { 14 types: CheckboxItem[]; 15 columns: CheckboxItem[]; 16 modelIds: number[]; 17 annotations: CheckboxItem[]; 18 includedCompartmentPathways: CheckboxItem[]; 19 excludedCompartmentPathways: CheckboxItem[]; 20 }; 21 22 const extractAndParseNumberIdFromCompartment = (compartment: CheckboxItem): number => { 23 const [, id] = compartment.id.split('-'); 24 return Number(id); added 5 commits
-
902f6b88...db55a1e7 - 4 commits from branch
development
- 2b0c353b - Merge remote-tracking branch 'origin/development' into MIN-240-download-network
-
902f6b88...db55a1e7 - 4 commits from branch
added 1 commit
- e89c9c6c - refactor(export): extract downloadFileFromBlob to separate file
mentioned in commit 8f926bf4
Please register or sign in to reply