Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: real time deck support #781

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ export const ExecutionDetailsActions = ({
variant="outlined"
color="primary"
onClick={() => setShowDeck(true)}
disabled={phase !== NodeExecutionPhase.SUCCEEDED}
>
{text?.flyteDeckText || t('flyteDeck')}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useDownloadLink } from 'components/hooks/useDataProxy';
import { WaitForData } from 'components/common/WaitForData';
import * as React from 'react';
import { Core } from '@flyteorg/flyteidl-types';
import { NotFoundError } from 'errors/fetchErrors';

/** Fetches and renders the deck data for a given `nodeExecutionId` */
export const ExecutionNodeDeck: React.FC<{
Expand All @@ -10,6 +11,22 @@ export const ExecutionNodeDeck: React.FC<{
}> = ({ nodeExecutionId, className = '' }) => {
const downloadLink = useDownloadLink(nodeExecutionId);

if (downloadLink?.lastError instanceof NotFoundError) {
return (
<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 'persist'
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}>
<iframe
Expand Down