fixed file upload of new files and get 1000 process models to list tiles page w/ burnettk

This commit is contained in:
jasquat 2022-12-16 15:12:14 -05:00
parent f2818f57a7
commit d5f72cbd24
2 changed files with 9 additions and 3 deletions

View File

@ -35,7 +35,7 @@ export default function ProcessModelListTiles({
setProcessModels(result.results); setProcessModels(result.results);
}; };
// only allow 10 for now until we get the backend only returning certain models for user execution // only allow 10 for now until we get the backend only returning certain models for user execution
let queryParams = '?per_page=20'; let queryParams = '?per_page=1000';
if (processGroup) { if (processGroup) {
queryParams = `${queryParams}&process_group_identifier=${processGroup.id}`; queryParams = `${queryParams}&process_group_identifier=${processGroup.id}`;
} else { } else {

View File

@ -418,12 +418,18 @@ export default function ProcessModelShow() {
const checkDuplicateFile = (event: any) => { const checkDuplicateFile = (event: any) => {
if (processModel && processModel.files.length > 0) { if (processModel && processModel.files.length > 0) {
let foundExistingFile = false;
processModel.files.forEach((file) => { processModel.files.forEach((file) => {
if (file.name === filesToUpload[0].name) { if (file.name === filesToUpload[0].name) {
displayOverwriteConfirmation(file.name); foundExistingFile = true;
setFileUploadEvent(event);
} }
}); });
if (foundExistingFile) {
displayOverwriteConfirmation(filesToUpload[0].name);
setFileUploadEvent(event);
} else {
doFileUpload(event);
}
} }
}; };