Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/api/types/crate/controlPlanes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface ControlPlaneComponentsType {
externalSecretsOperator: ControlPlaneComponentsSpecType | undefined;
kyverno: ControlPlaneComponentsSpecType | undefined;
flux: ControlPlaneComponentsSpecType | undefined;
landscaper: ControlPlaneComponentsSpecType | undefined;
}

export interface ControlPlaneComponentsSpecType {
Expand Down
86 changes: 48 additions & 38 deletions src/spaces/mcp/pages/McpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export default function McpPage() {
return <IllustratedError details={error?.message} />;
}

const isComponentInstalledCrossplane = !!mcp.spec?.components.crossplane;
const isComponentInstalledFlux = !!mcp.spec?.components.flux;
const isComponentInstalledLandscaper = !!mcp.spec?.components.landscaper;

return (
<McpContextProvider
context={{
Expand Down Expand Up @@ -154,46 +158,52 @@ export default function McpPage() {
</ObjectPageSubSection>
</ObjectPageSection>

<ObjectPageSection id="crossplane" titleText={t('McpPage.crossplaneTitle')}>
<ObjectPageSubSection id="providers" titleText={t('McpPage.providersTitle')} className={styles.section}>
<Providers />
</ObjectPageSubSection>
<ObjectPageSubSection
id="provider-configs"
titleText={t('McpPage.providerConfigsTitle')}
className={styles.section}
>
<ProvidersConfig />
</ObjectPageSubSection>
<ObjectPageSubSection
id="managed-resources"
titleText={t('McpPage.managedResourcesTitle')}
className={styles.section}
>
<ManagedResources />
</ObjectPageSubSection>
</ObjectPageSection>
{isComponentInstalledCrossplane && (
<ObjectPageSection id="crossplane" titleText={t('McpPage.crossplaneTitle')}>
<ObjectPageSubSection id="providers" titleText={t('McpPage.providersTitle')} className={styles.section}>
<Providers />
</ObjectPageSubSection>
<ObjectPageSubSection
id="provider-configs"
titleText={t('McpPage.providerConfigsTitle')}
className={styles.section}
>
<ProvidersConfig />
</ObjectPageSubSection>
<ObjectPageSubSection
id="managed-resources"
titleText={t('McpPage.managedResourcesTitle')}
className={styles.section}
>
<ManagedResources />
</ObjectPageSubSection>
</ObjectPageSection>
)}

<ObjectPageSection id="flux" titleText={t('McpPage.fluxTitle')}>
<ObjectPageSubSection
id="git-repositories"
titleText={t('McpPage.gitRepositoriesTitle')}
className={styles.section}
>
<GitRepositories />
</ObjectPageSubSection>
<ObjectPageSubSection
id="kustomizations"
titleText={t('McpPage.kustomizationsTitle')}
className={styles.section}
>
<Kustomizations />
</ObjectPageSubSection>
</ObjectPageSection>
{isComponentInstalledFlux && (
<ObjectPageSection id="flux" titleText={t('McpPage.fluxTitle')}>
<ObjectPageSubSection
id="git-repositories"
titleText={t('McpPage.gitRepositoriesTitle')}
className={styles.section}
>
<GitRepositories />
</ObjectPageSubSection>
<ObjectPageSubSection
id="kustomizations"
titleText={t('McpPage.kustomizationsTitle')}
className={styles.section}
>
<Kustomizations />
</ObjectPageSubSection>
</ObjectPageSection>
)}

<ObjectPageSection id="landscapers" titleText={t('McpPage.landscapersTitle')} className={styles.section}>
<Landscapers />
</ObjectPageSection>
{isComponentInstalledLandscaper && (
<ObjectPageSection id="landscapers" titleText={t('McpPage.landscapersTitle')} className={styles.section}>
<Landscapers />
</ObjectPageSection>
)}
</ObjectPage>
</WithinManagedControlPlane>
</AuthProviderMcp>
Expand Down
Loading