diff --git a/dashboard/src/main/home/infrastructure-dashboard/ClusterFormContextProvider.tsx b/dashboard/src/main/home/infrastructure-dashboard/ClusterFormContextProvider.tsx index abdb97db41..7d6bdafe5d 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/ClusterFormContextProvider.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/ClusterFormContextProvider.tsx @@ -29,6 +29,7 @@ export type UpdateClusterButtonProps = { type ClusterFormContextType = { isAdvancedSettingsEnabled: boolean; + isMultiClusterEnabled: boolean; showFailedPreflightChecksModal: boolean; updateClusterButtonProps: UpdateClusterButtonProps; setCurrentContract: (contract: Contract) => void; @@ -49,6 +50,7 @@ export const useClusterFormContext = (): ClusterFormContextType => { type ClusterFormContextProviderProps = { projectId?: number; isAdvancedSettingsEnabled?: boolean; + isMultiClusterEnabled?: boolean; redirectOnSubmit?: boolean; children: JSX.Element; }; @@ -56,6 +58,7 @@ type ClusterFormContextProviderProps = { const ClusterFormContextProvider: React.FC = ({ projectId, isAdvancedSettingsEnabled = false, + isMultiClusterEnabled = false, redirectOnSubmit, children, }) => { @@ -200,6 +203,7 @@ const ClusterFormContextProvider: React.FC = ({ showFailedPreflightChecksModal, updateClusterButtonProps, isAdvancedSettingsEnabled, + isMultiClusterEnabled, }} > diff --git a/dashboard/src/main/home/infrastructure-dashboard/forms/CreateClusterForm.tsx b/dashboard/src/main/home/infrastructure-dashboard/forms/CreateClusterForm.tsx index f05869be61..4f2f1c0634 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/forms/CreateClusterForm.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/forms/CreateClusterForm.tsx @@ -53,6 +53,7 @@ const CreateClusterForm: React.FC = () => { projectId={currentProject?.id} redirectOnSubmit={true} isAdvancedSettingsEnabled={currentProject?.advanced_infra_enabled} + isMultiClusterEnabled={currentProject?.multi_cluster} > {match(selectedCloudProvider) diff --git a/dashboard/src/main/home/infrastructure-dashboard/forms/aws/ConfigureEKSCluster.tsx b/dashboard/src/main/home/infrastructure-dashboard/forms/aws/ConfigureEKSCluster.tsx index 1df1bd72cb..83d83caeb2 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/forms/aws/ConfigureEKSCluster.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/forms/aws/ConfigureEKSCluster.tsx @@ -31,7 +31,7 @@ const ConfigureEKSCluster: React.FC = ({ goBack }) => { formState: { errors }, } = useFormContext(); - const { isAdvancedSettingsEnabled } = useClusterFormContext(); + const { isMultiClusterEnabled } = useClusterFormContext(); return (
@@ -88,7 +88,7 @@ const ConfigureEKSCluster: React.FC = ({ goBack }) => { )} /> , - isAdvancedSettingsEnabled ? ( + isMultiClusterEnabled ? ( <> CIDR range diff --git a/dashboard/src/main/home/infrastructure-dashboard/forms/azure/ConfigureAKSCluster.tsx b/dashboard/src/main/home/infrastructure-dashboard/forms/azure/ConfigureAKSCluster.tsx index 826dd42ee2..07137224fa 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/forms/azure/ConfigureAKSCluster.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/forms/azure/ConfigureAKSCluster.tsx @@ -31,7 +31,7 @@ const ConfigureAKSCluster: React.FC = ({ goBack }) => { watch, } = useFormContext(); - const { isAdvancedSettingsEnabled } = useClusterFormContext(); + const { isMultiClusterEnabled } = useClusterFormContext(); const region = watch("cluster.config.region"); @@ -127,7 +127,7 @@ const ConfigureAKSCluster: React.FC = ({ goBack }) => { /> , - isAdvancedSettingsEnabled ? ( + isMultiClusterEnabled ? ( <> CIDR range diff --git a/dashboard/src/main/home/infrastructure-dashboard/forms/gcp/ConfigureGKECluster.tsx b/dashboard/src/main/home/infrastructure-dashboard/forms/gcp/ConfigureGKECluster.tsx index 198cd7bb16..02cc2d25a7 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/forms/gcp/ConfigureGKECluster.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/forms/gcp/ConfigureGKECluster.tsx @@ -30,7 +30,7 @@ const ConfigureGKECluster: React.FC = ({ goBack }) => { formState: { errors }, } = useFormContext(); - const { isAdvancedSettingsEnabled } = useClusterFormContext(); + const { isMultiClusterEnabled } = useClusterFormContext(); return (
@@ -93,7 +93,7 @@ const ConfigureGKECluster: React.FC = ({ goBack }) => { }} /> , - isAdvancedSettingsEnabled ? ( + isMultiClusterEnabled ? ( <> CIDR range diff --git a/dashboard/src/main/home/infrastructure-dashboard/shared/NodeGroups.tsx b/dashboard/src/main/home/infrastructure-dashboard/shared/NodeGroups.tsx index d34273b041..9cd706bd26 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/shared/NodeGroups.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/shared/NodeGroups.tsx @@ -52,7 +52,7 @@ const NodeGroups: React.FC = ({ availableMachineTypes }) => { {displayableNodeGroups.APPLICATION?.map((ng) => { return ( @@ -129,7 +129,7 @@ const NodeGroups: React.FC = ({ availableMachineTypes }) => { {displayableNodeGroups.CUSTOM?.map((ng) => { return ( diff --git a/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/AKSClusterOverview.tsx b/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/AKSClusterOverview.tsx index 61cc758b91..32e0c4f652 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/AKSClusterOverview.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/AKSClusterOverview.tsx @@ -60,8 +60,10 @@ const AKSClusterOverview: React.FC = () => { /> - - Application node group{" "} + Node groups + + + Configure node groups to support custom workloads.{" "} {  (?) - + mt.supportedRegions.includes(region) diff --git a/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/EKSClusterOverview.tsx b/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/EKSClusterOverview.tsx index 0e8239d2bc..7a9eebb216 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/EKSClusterOverview.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/tabs/overview/EKSClusterOverview.tsx @@ -16,6 +16,7 @@ import NodeGroups from "../../shared/NodeGroups"; const EKSClusterOverview: React.FC = () => { const { watch } = useFormContext(); const region = watch("cluster.config.region"); + const cidrRange = watch("cluster.config.cidrRange"); const label = useMemo(() => { return SUPPORTED_AWS_REGIONS.find((x) => x.name === region)?.displayName; @@ -37,6 +38,16 @@ const EKSClusterOverview: React.FC = () => { /> + + Cluster CIDR range + +