Skip to content

Commit 40a794d

Browse files
authored
Merge pull request #252 from MetaCell/codex/integrate-uploaddialog-with-tabs
#247 - Increase file size allowed on file upload, save debug more on local storage
2 parents 518cd91 + 83ba533 commit 40a794d

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const App = () => {
2828
const enableUpload = debugFlag !== null ?
2929
debugFlag === 'true' :
3030
config.enableUploadDialog === true;
31-
const debug = enableUpload === 'true';
31+
const debug = enableUpload === true;
3232

3333
const dispatch = useDispatch();
3434
const [openDatasetsListDialog, setOpenDatasetsListDialog] = useState(false);

src/components/DatasetsListViewer/DatasetsListDialog.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ const DatasetsListDialog = (props) => {
174174
});
175175
datasetStorage = {
176176
version : versionID,
177-
datasets : parsedDatasets
177+
datasets : parsedDatasets,
178+
debug : debug
178179
}
179180

180181
localStorage.setItem(config.datasetsStorage, JSON.stringify(datasetStorage));
@@ -220,6 +221,12 @@ const DatasetsListDialog = (props) => {
220221

221222
if (storage && versionID === storageVersion) {
222223
dispatch(setDatasetsList(storage.datasets));
224+
let filteredDatasets = storage.datasets
225+
if (!debug) {
226+
filteredDatasets = storage.datasets.filter(
227+
node => node?.attributes?.statusOnPlatform?.[0]?.includes(PUBLISHED)
228+
);
229+
}
223230
setFilteredDatasets(storage.datasets);
224231
} else {
225232
await loadDatasets(versionID);

src/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const LIST_DATASETS = 'List Datasets';
44
export const SPARC_DATASETS = 'SPARC Datasets';
55
export const FILE_UPLOAD_PARAMS = {
66
acceptedFileExtensions: ['json', 'ttl'],
7-
maxFileSize: 10242880,
7+
maxFileSize: 20242880,
88
maxFiles: 6,
99
};
1010
export const NODES = ["dataset", "nifti", "volume", "matlab"];

0 commit comments

Comments
 (0)