diff --git a/geonode_mapstore_client/client/js/routes/UploadDataset.jsx b/geonode_mapstore_client/client/js/routes/UploadDataset.jsx index a74206609c..3b1052e939 100644 --- a/geonode_mapstore_client/client/js/routes/UploadDataset.jsx +++ b/geonode_mapstore_client/client/js/routes/UploadDataset.jsx @@ -19,7 +19,6 @@ import { getProcessedUploadsByImportId, uploadDataset } from '@js/api/geonode/v2'; -import uuidv1 from 'uuid/v1'; import axios from '@mapstore/framework/libs/ajax'; import UploadListContainer from '@js/routes/upload/UploadListContainer'; import UploadContainer from '@js/routes/upload/UploadContainer'; @@ -209,6 +208,12 @@ function UploadList({ .then((responses) => { const successfulUploads = responses.filter(({ status }) => status === 'success'); const errorUploads = responses.filter(({ status }) => status === 'error'); + if (errorUploads.length > 0) { + errorUploads.forEach((upload) => { + const { baseName } = upload; + waitingUploads[baseName].error = true; + }); + } if (successfulUploads.length > 0) { const successfulUploadsIds = successfulUploads.map(({ data }) => data?.id); const successfulUploadsNames = successfulUploads.map(({ baseName }) => baseName); @@ -224,17 +229,6 @@ function UploadList({ } else { setLoading(false); } - if (errorUploads.length > 0) { - const failedUploads = errorUploads.map(({ baseName: name, error }) => ({ - id: uuidv1(), - name, - progress: 100, - state: 'INVALID', - create_date: Date.now(), - error - })); - onSuccess(failedUploads); - } }) .catch(() => { setLoading(false); diff --git a/geonode_mapstore_client/client/js/routes/upload/PendingUploadCard.jsx b/geonode_mapstore_client/client/js/routes/upload/PendingUploadCard.jsx index b2428df64d..162ff7d17d 100644 --- a/geonode_mapstore_client/client/js/routes/upload/PendingUploadCard.jsx +++ b/geonode_mapstore_client/client/js/routes/upload/PendingUploadCard.jsx @@ -13,7 +13,13 @@ import Button from '@js/components/Button'; import Badge from '@js/components/Badge'; import Message from '@mapstore/framework/components/I18N/Message'; import Spinner from '@js/components/Spinner'; +import tooltip from '@mapstore/framework/components/misc/enhancers/tooltip'; +function ErrorMessage(props) { + return (