Skip to content

Commit

Permalink
"Use Yi-Cheng Lu's code"
Browse files Browse the repository at this point in the history
Signed-off-by: Future-Outlier <[email protected]>
Co-authored-by: Yicheng-Lu-llll <[email protected]>
  • Loading branch information
Future-Outlier and Yicheng-Lu-llll committed Nov 27, 2024
1 parent 17ef806 commit 3f78bee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const FlyteDeckButton: FC<FlyteDeckButtonProps> = ({
variant="outlined"
color="primary"
onClick={() => setShowDeck(true)}
disabled={phase !== NodeExecutionPhase.SUCCEEDED}
>
{flyteDeckText || t('flyteDeck')}
</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import Core from '@clients/common/flyteidl/core';
import NotFoundError from '@clients/common/Errors/NotFoundError';
import { LoadingSpinner } from '@clients/primitives/LoadingSpinner';
import { useDownloadLink } from '../../hooks/useDataProxy';
import { WaitForData } from '../../common/WaitForData';
Expand Down Expand Up @@ -27,6 +28,22 @@ export const ExecutionNodeDeck: React.FC<{
'allow-downloads',
].join(' ');

if (downloadLink?.lastError instanceof NotFoundError) {
return (

Check warning on line 32 in packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx

View check run for this annotation

Codecov / codecov/patch

packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx#L31-L32

Added lines #L31 - L32 were not covered by tests
<div style={{ textAlign: 'center' }}>
<h1>The deck will be ready soon. Please try again later.</h1>
<p>
If you're using the real-time deck, it's because the 'publish'
function has not been invoked yet.
</p>
<p>
If you're not using the real-time deck, it's because the corresponding
task is still in progress.
</p>
</div>
);
}

return (
<WaitForData {...downloadLink} loadingComponent={LoadingSpinner}>
<iframe
Expand Down

0 comments on commit 3f78bee

Please sign in to comment.