Skip to content

Commit

Permalink
fix(cluster-warning-indicator): exclude on_premise cloud provider (#1721
Browse files Browse the repository at this point in the history
)
  • Loading branch information
RemiBonnet authored Oct 15, 2024
1 parent 3f75e1b commit 9dd6590
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libs/pages/layout/src/lib/ui/layout-page/layout-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ export function LayoutPage(props: PropsWithChildren<LayoutPageProps>) {
clusterStatuses?.find(({ status }) => status === ClusterStateEnum.INVALID_CREDENTIALS)?.cluster_id === id
)

const clusterUpgradeWarning = clusters?.find(
({ id }) =>
clusterStatuses?.find(({ next_k8s_available_version }) => next_k8s_available_version !== null)?.cluster_id === id
)
const clusterUpgradeWarning = clusters?.find(({ id, cloud_provider }) => {
const updatedClusters = clusterStatuses?.find(
({ next_k8s_available_version }) => next_k8s_available_version !== null
)
return updatedClusters?.cluster_id === id && cloud_provider !== 'ON_PREMISE'
})

const clusterCredentialError = Boolean(!matchLogInfraRoute && invalidCluster)

Expand Down

0 comments on commit 9dd6590

Please sign in to comment.