From 05e458a664b32a29f1d6adb10f2700032c96da7b Mon Sep 17 00:00:00 2001 From: Andreas Kienle Date: Wed, 8 Oct 2025 12:30:43 +0200 Subject: [PATCH] feat: hide tabs of uninstalled components --- src/lib/api/types/crate/controlPlanes.ts | 1 + src/spaces/mcp/pages/McpPage.tsx | 86 +++++++++++++----------- 2 files changed, 49 insertions(+), 38 deletions(-) diff --git a/src/lib/api/types/crate/controlPlanes.ts b/src/lib/api/types/crate/controlPlanes.ts index 7392fa47..47275638 100644 --- a/src/lib/api/types/crate/controlPlanes.ts +++ b/src/lib/api/types/crate/controlPlanes.ts @@ -31,6 +31,7 @@ export interface ControlPlaneComponentsType { externalSecretsOperator: ControlPlaneComponentsSpecType | undefined; kyverno: ControlPlaneComponentsSpecType | undefined; flux: ControlPlaneComponentsSpecType | undefined; + landscaper: ControlPlaneComponentsSpecType | undefined; } export interface ControlPlaneComponentsSpecType { diff --git a/src/spaces/mcp/pages/McpPage.tsx b/src/spaces/mcp/pages/McpPage.tsx index f4d8397c..5b4b0262 100644 --- a/src/spaces/mcp/pages/McpPage.tsx +++ b/src/spaces/mcp/pages/McpPage.tsx @@ -81,6 +81,10 @@ export default function McpPage() { return ; } + const isComponentInstalledCrossplane = !!mcp.spec?.components.crossplane; + const isComponentInstalledFlux = !!mcp.spec?.components.flux; + const isComponentInstalledLandscaper = !!mcp.spec?.components.landscaper; + return ( - - - - - - - - - - - + {isComponentInstalledCrossplane && ( + + + + + + + + + + + + )} - - - - - - - - + {isComponentInstalledFlux && ( + + + + + + + + + )} - - - + {isComponentInstalledLandscaper && ( + + + + )}