Skip to content

Commit

Permalink
update batch export result texts (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao authored Dec 6, 2024
1 parent 1a879e8 commit 434f677
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
};
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -56,10 +56,7 @@ const checkDownloadStatus = (
title: 'Your download is ready',
content: (
<React.Fragment>
<p> {DOWNLOAD_SUCCEEDED_MESSAGE} </p>
<a href={output} target='_blank' rel='noreferrer'>
{output}
</a>
<p>Your download has been prepared. If your download doesn&apos;t start automatically, please click <a href={output} target='_blank' rel='noreferrer'>this link</a></p>
</React.Fragment>
),
active: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ export const DOWNLOAD_FAIL_STATUS: DownloadStatus = {
},
};

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;
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import { jobAPIPath } from '../../../../../../../../../localconf';
import DownloadStatus from '../../../Interfaces/DownloadStatus';
import {
DOWNLOAD_FAIL_STATUS,
DOWNLOAD_SUCCEEDED_MESSAGE,
JOB_POLLING_INTERVAL,
} from './Constants';
} from '../Constants';

const CheckDownloadStatus = (
uid: string,
Expand Down Expand Up @@ -55,10 +54,7 @@ const CheckDownloadStatus = (
title: 'Your download is ready',
content: (
<React.Fragment>
<p> {DOWNLOAD_SUCCEEDED_MESSAGE} </p>
<a href={output} target='_blank' rel='noreferrer'>
{output}
</a>
<p>Your download has been prepared. If your download doesn&apos;t start automatically, please click <a href={output} target='_blank' rel='noreferrer'>this link</a></p>
</React.Fragment>
),
active: true,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interface DownloadStatus {
inProgress:'DownloadVariableMetadata' | 'DownloadDataFiles' |
'DownloadManifest'| 'DownloadStudyLevelMetadata'| '';
'DownloadManifest'| 'DownloadStudyLevelMetadata'| '' | boolean;
message: {
content: JSX.Element;
active: boolean;
Expand Down

0 comments on commit 434f677

Please sign in to comment.