Skip to content

Commit

Permalink
Follow-up fix for RHOAIENG-14133 about pipeline server condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoDaoNoCode committed Nov 5, 2024
1 parent d56377b commit 133893b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ const DOCS_LINK =

type EnsureCompatiblePipelineServerProps = {
children: React.ReactNode;
emptyStateVariant?: EmptyStateVariant;
};

const EnsureCompatiblePipelineServer: React.FC<EnsureCompatiblePipelineServerProps> = ({
children,
emptyStateVariant = EmptyStateVariant.lg,
}) => {
const { pipelinesServer } = usePipelinesAPI();
const [isDeleting, setIsDeleting] = React.useState(false);
Expand All @@ -44,7 +46,7 @@ const EnsureCompatiblePipelineServer: React.FC<EnsureCompatiblePipelineServerPro
return (
<>
<Bullseye data-testid="incompatible-pipelines-server">
<EmptyState variant={EmptyStateVariant.lg}>
<EmptyState variant={emptyStateVariant}>
<EmptyStateHeader
data-testid="incompatible-pipelines-server-title"
titleText="Unsupported pipeline and pipeline server version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
EmptyStateBody,
EmptyStateHeader,
EmptyStateIcon,
EmptyStateVariant,
Spinner,
Stack,
Text,
Expand Down Expand Up @@ -84,7 +85,7 @@ const PipelinesCard: React.FC = () => {
);
}

if (pipelinesServer.timedOut) {
if (pipelinesServer.timedOut && pipelinesServer.compatible) {
return (
<CardBody>
<PipelineServerTimedOut />
Expand All @@ -94,7 +95,7 @@ const PipelinesCard: React.FC = () => {

return (
<EnsureAPIAvailability>
<EnsureCompatiblePipelineServer>
<EnsureCompatiblePipelineServer emptyStateVariant={EmptyStateVariant.xs}>
<PipelinesCardMetrics />
</EnsureCompatiblePipelineServer>
</EnsureAPIAvailability>
Expand Down

0 comments on commit 133893b

Please sign in to comment.