diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/runLogs/LogsTab.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/runLogs/LogsTab.tsx index 094bd95fd1..3d6f30d736 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/runLogs/LogsTab.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/runLogs/LogsTab.tsx @@ -119,6 +119,10 @@ const LogsTabForPodName: React.FC<{ podName: string }> = ({ podName }) => { {!podStatus?.podInitializing && ( = ({ podName }) => { /> )} - - - - - {isSmallScreen() ? null : ( + {!podError && ( + + + + + {isSmallScreen() ? null : ( + + + + Step + + + + )} - - - Step - - + ({ + key: container.name, + label: container.name, + }))} + value={selectedContainer?.name ?? ''} + placeholder="Select container..." + onChange={(v) => { + setSelectedContainer(podContainers.find((c) => c.name === v) ?? null); + }} + width={150} + /> - )} - - ({ - key: container.name, - label: container.name, - }))} - value={selectedContainer?.name ?? ''} - placeholder="Select container..." - onChange={(v) => { - setSelectedContainer(podContainers.find((c) => c.name === v) ?? null); - }} - width={150} - /> - - - - - {!podStatus?.completed && ( - - )} - - - {downloading ? ( - <> - {' '} - - ) : null} - {podContainers.length !== 0 ? ( - setIsDownloadDropdownOpen(!isDownloadDropdownOpen)} - /> - ) : ( - setIsDownloadDropdownOpen(!isDownloadDropdownOpen)} - > - Download - - ) - } - isOpen={isDownloadDropdownOpen} - isPlain={isSmallScreen()} - dropdownItems={[ - - - , - - - , - ]} - /> - ) : ( - Download current step log}> + + + + {!podStatus?.completed && ( - - )} - - - + )} + + + {downloading ? ( + <> + {' '} + + ) : null} + {podContainers.length !== 0 ? ( + setIsDownloadDropdownOpen(!isDownloadDropdownOpen)} + /> + ) : ( + setIsDownloadDropdownOpen(!isDownloadDropdownOpen)} + > + Download + + ) + } + isOpen={isDownloadDropdownOpen} + isPlain={isSmallScreen()} + dropdownItems={[ + + + , + + + , + ]} + /> + ) : ( + Download current step log}> + + + )} + + + + )} void; onDownload: () => void; }; -const LogsTabStatus: React.FC = ({ error, loaded, refresh, onDownload }) => { +const LogsTabStatus: React.FC = ({ + podError, + podName, + podStatus, + error, + loaded, + refresh, + onDownload, +}) => { if (error) { return ( Retry} + title={ + podStatus === null || (podError && podStatus?.completed) + ? podError?.message + : error?.message.includes('Failed to fetch') && error.message + ' logs' + } + actionLinks={ + !podStatus === null && Retry + } > -

{error.message}

+

+ {podStatus === null || (podError && podStatus?.completed) + ? podName + ' may have been pruned to prevent over-utilization of resources.' + : error?.message.includes('Failed to fetch') && + 'Check your connection and reload the page.'} +

); }