From 434f677300dc04fbf16239ba957ce3fdcb79c602 Mon Sep 17 00:00:00 2001
From: Mingfei Shao <2475897+mfshao@users.noreply.github.com>
Date: Thu, 5 Dec 2024 22:07:18 -0600
Subject: [PATCH] update batch export result texts (#1657)
---
.../DiscoveryActionBarConstants.tsx | 4 +---
.../utils/checkDownloadStatus.tsx | 7 ++-----
.../ActionButtons/DownloadUtils/Constants.tsx | 2 --
.../DownloadDataFiles/CheckDownloadStatus.tsx | 8 ++------
.../DownloadDataFiles/Constants.tsx | 20 -------------------
.../DownloadDataFiles/DownloadDataFiles.tsx | 2 +-
.../Interfaces/DownloadStatus.ts | 2 +-
7 files changed, 7 insertions(+), 38 deletions(-)
delete mode 100644 src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/ActionButtons/DownloadUtils/DownloadDataFiles/Constants.tsx
diff --git a/src/Discovery/DiscoveryActionBar/DiscoveryActionBarConstants.tsx b/src/Discovery/DiscoveryActionBar/DiscoveryActionBarConstants.tsx
index 8d23715318..24a4969c19 100644
--- a/src/Discovery/DiscoveryActionBar/DiscoveryActionBarConstants.tsx
+++ b/src/Discovery/DiscoveryActionBar/DiscoveryActionBarConstants.tsx
@@ -2,7 +2,6 @@ import React from 'react';
const BATCH_EXPORT_JOB_PREFIX = 'batch-export';
const GUID_PREFIX_PATTERN = /^dg.[a-zA-Z0-9]+\//;
-const DOWNLOAD_SUCCEEDED_MESSAGE = 'Your download has been prepared. If your download doesn\'t start automatically, please follow this direct link:';
const JOB_POLLING_INTERVAL = 5000;
const DOWNLOAD_FAIL_STATUS = {
inProgress: false,
@@ -20,6 +19,5 @@ const DOWNLOAD_FAIL_STATUS = {
};
export {
- BATCH_EXPORT_JOB_PREFIX, GUID_PREFIX_PATTERN, JOB_POLLING_INTERVAL,
- DOWNLOAD_SUCCEEDED_MESSAGE, DOWNLOAD_FAIL_STATUS,
+ BATCH_EXPORT_JOB_PREFIX, GUID_PREFIX_PATTERN, JOB_POLLING_INTERVAL, DOWNLOAD_FAIL_STATUS,
};
diff --git a/src/Discovery/DiscoveryActionBar/utils/checkDownloadStatus.tsx b/src/Discovery/DiscoveryActionBar/utils/checkDownloadStatus.tsx
index 0287615b88..7932dec3cd 100644
--- a/src/Discovery/DiscoveryActionBar/utils/checkDownloadStatus.tsx
+++ b/src/Discovery/DiscoveryActionBar/utils/checkDownloadStatus.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import { datadogRum } from '@datadog/browser-rum';
import { faro } from '@grafana/faro-core';
import {
- JOB_POLLING_INTERVAL, DOWNLOAD_FAIL_STATUS, DOWNLOAD_SUCCEEDED_MESSAGE,
+ JOB_POLLING_INTERVAL, DOWNLOAD_FAIL_STATUS,
} from '../DiscoveryActionBarConstants';
import { jobAPIPath } from '../../../localconf';
import { DownloadStatus } from '../DiscoveryActionBarInterfaces';
@@ -56,10 +56,7 @@ const checkDownloadStatus = (
title: 'Your download is ready',
content: (
{DOWNLOAD_SUCCEEDED_MESSAGE} Your download has been prepared. If your download doesn't start automatically, please click this link {DOWNLOAD_SUCCEEDED_MESSAGE} Your download has been prepared. If your download doesn't start automatically, please click this link
- There was a problem preparing your download. Please consider using the - Gen3 SDK for Python (w/ CLI) to download these files via a manifest. -
- ), - active: true, - }, -}; - -export const DOWNLOAD_SUCCEEDED_MESSAGE = 'Your download has been prepared. If your download doesn\'t start automatically, please follow this direct link:'; - -export const JOB_POLLING_INTERVAL = 5000; diff --git a/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/ActionButtons/DownloadUtils/DownloadDataFiles/DownloadDataFiles.tsx b/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/ActionButtons/DownloadUtils/DownloadDataFiles/DownloadDataFiles.tsx index b1ae8fe543..46f507fbcc 100644 --- a/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/ActionButtons/DownloadUtils/DownloadDataFiles/DownloadDataFiles.tsx +++ b/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/ActionButtons/DownloadUtils/DownloadDataFiles/DownloadDataFiles.tsx @@ -5,7 +5,7 @@ import { jobAPIPath } from '../../../../../../../../../localconf'; import DownloadStatus from '../../../Interfaces/DownloadStatus'; import CheckFederatedLoginStatus from './CheckFederatedLoginStatus'; import CheckDownloadStatus from './CheckDownloadStatus'; -import { DOWNLOAD_FAIL_STATUS, JOB_POLLING_INTERVAL } from './Constants'; +import { DOWNLOAD_FAIL_STATUS, JOB_POLLING_INTERVAL } from '../Constants'; const DownloadDataFiles = async ( downloadStatus: DownloadStatus, diff --git a/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/Interfaces/DownloadStatus.ts b/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/Interfaces/DownloadStatus.ts index dc348eeb59..b83ac48deb 100644 --- a/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/Interfaces/DownloadStatus.ts +++ b/src/Discovery/DiscoveryDetails/Components/FieldGrouping/TabField/DataDownloadList/Interfaces/DownloadStatus.ts @@ -1,6 +1,6 @@ interface DownloadStatus { inProgress:'DownloadVariableMetadata' | 'DownloadDataFiles' | - 'DownloadManifest'| 'DownloadStudyLevelMetadata'| ''; + 'DownloadManifest'| 'DownloadStudyLevelMetadata'| '' | boolean; message: { content: JSX.Element; active: boolean;