diff --git a/frontend/src/Activity/Queue/QueueDetails.js b/frontend/src/Activity/Queue/QueueDetails.js
index b83eddc23..874b52217 100644
--- a/frontend/src/Activity/Queue/QueueDetails.js
+++ b/frontend/src/Activity/Queue/QueueDetails.js
@@ -11,14 +11,14 @@ function QueueDetails(props) {
size,
sizeleft,
estimatedCompletionTime,
- status: queueStatus,
+ status,
+ trackedDownloadState,
+ trackedDownloadStatus,
errorMessage,
progressBar
} = props;
- const status = queueStatus.toLowerCase();
-
- const progress = (100 - sizeleft / size * 100);
+ const progress = size ? (100 - sizeleft / size * 100) : 0;
if (status === 'pending') {
return (
@@ -40,7 +40,35 @@ function QueueDetails(props) {
);
}
- // TODO: show an icon when download is complete, but not imported yet?
+ if (trackedDownloadStatus === 'warning') {
+ return (
+
+ );
+ }
+
+ if (trackedDownloadState === 'importPending') {
+ return (
+
+ );
+ }
+
+ if (trackedDownloadState === 'importing') {
+ return (
+
+ );
+ }
}
if (errorMessage) {
@@ -91,6 +119,8 @@ QueueDetails.propTypes = {
sizeleft: PropTypes.number.isRequired,
estimatedCompletionTime: PropTypes.string,
status: PropTypes.string.isRequired,
+ trackedDownloadState: PropTypes.string.isRequired,
+ trackedDownloadStatus: PropTypes.string.isRequired,
errorMessage: PropTypes.string,
progressBar: PropTypes.node.isRequired
};
diff --git a/frontend/src/Calendar/Events/CalendarEventQueueDetails.js b/frontend/src/Calendar/Events/CalendarEventQueueDetails.js
index a9338421c..7284a89e1 100644
--- a/frontend/src/Calendar/Events/CalendarEventQueueDetails.js
+++ b/frontend/src/Calendar/Events/CalendarEventQueueDetails.js
@@ -12,10 +12,12 @@ function CalendarEventQueueDetails(props) {
sizeleft,
estimatedCompletionTime,
status,
+ trackedDownloadState,
+ trackedDownloadStatus,
errorMessage
} = props;
- const progress = (100 - sizeleft / size * 100);
+ const progress = size ? (100 - sizeleft / size * 100) : 0;
return (
@@ -45,6 +49,8 @@ CalendarEventQueueDetails.propTypes = {
sizeleft: PropTypes.number.isRequired,
estimatedCompletionTime: PropTypes.string,
status: PropTypes.string.isRequired,
+ trackedDownloadState: PropTypes.string.isRequired,
+ trackedDownloadStatus: PropTypes.string.isRequired,
errorMessage: PropTypes.string
};