diff --git a/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionDetailsActions/FlyteDeckButton.tsx b/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionDetailsActions/FlyteDeckButton.tsx index b4e7c23b8..b83f1594a 100644 --- a/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionDetailsActions/FlyteDeckButton.tsx +++ b/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionDetailsActions/FlyteDeckButton.tsx @@ -8,6 +8,8 @@ import Grid from '@mui/material/Grid'; import IconButton from '@mui/material/IconButton'; import Typography from '@mui/material/Typography'; import DialogContent from '@mui/material/DialogContent'; +import { useDownloadLink } from '@clients/oss-console/components/hooks/useDataProxy'; +import RefreshIcon from '@mui/icons-material/Refresh'; import t from '../strings'; import { WorkflowNodeExecution } from '../../contexts'; import { NodeExecutionPhase } from '../../../../models/Execution/enums'; @@ -52,13 +54,11 @@ export const FlyteDeckButton: FC = ({ setSetFullScreen(!fullScreen); }; + const donwloadLink = useDownloadLink(nodeExecution?.id); + return nodeExecution?.closure?.deckUri ? ( <> - = ({ fontSize: '24px', lineHeight: '32px', marginBlock: 0, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + gap: 1, }} py={2} > {t('flyteDeck')} + donwloadLink.fetch()}> + + @@ -108,7 +115,7 @@ export const FlyteDeckButton: FC = ({ overflow: 'hidden', }} > - + diff --git a/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx b/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx index d19b5f7af..d37419f1a 100644 --- a/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx +++ b/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx @@ -9,8 +9,8 @@ import { WaitForData } from '../../common/WaitForData'; export const ExecutionNodeDeck: React.FC<{ nodeExecutionId: Core.NodeExecutionIdentifier; className?: string; -}> = ({ nodeExecutionId, className = '' }) => { - const downloadLink = useDownloadLink(nodeExecutionId); + downloadLink: ReturnType; +}> = ({ className = '', downloadLink }) => { const iFrameSrc = downloadLink?.value?.signedUrl?.[0]; // Taken from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox @@ -40,22 +40,6 @@ export const ExecutionNodeDeck: React.FC<{ If you're not using the real-time deck, it's because the corresponding task is still in progress.

- ); }