From 3f78bee2b3e0812f053bfefbd16778bd305e3f9e Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Wed, 27 Nov 2024 22:02:55 +0800 Subject: [PATCH 1/6] "Use Yi-Cheng Lu's code" Signed-off-by: Future-Outlier Co-authored-by: Yicheng-Lu-llll --- .../ExecutionDetailsActions/FlyteDeckButton.tsx | 1 - .../ExecutionDetails/ExecutionNodeDeck.tsx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) 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 dbff7814a..b4e7c23b8 100644 --- a/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionDetailsActions/FlyteDeckButton.tsx +++ b/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionDetailsActions/FlyteDeckButton.tsx @@ -58,7 +58,6 @@ export const FlyteDeckButton: FC = ({ variant="outlined" color="primary" onClick={() => setShowDeck(true)} - disabled={phase !== NodeExecutionPhase.SUCCEEDED} > {flyteDeckText || t('flyteDeck')} diff --git a/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx b/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx index 105c05f1a..857a74984 100644 --- a/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx +++ b/packages/oss-console/src/components/Executions/ExecutionDetails/ExecutionNodeDeck.tsx @@ -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'; @@ -27,6 +28,22 @@ export const ExecutionNodeDeck: React.FC<{ 'allow-downloads', ].join(' '); + if (downloadLink?.lastError instanceof NotFoundError) { + return ( +
+

The deck will be ready soon. Please try again later.

+

+ If you're using the real-time deck, it's because the 'publish' + function has not been invoked yet. +

+

+ If you're not using the real-time deck, it's because the corresponding + task is still in progress. +

+
+ ); + } + return (