Skip to content

Commit

Permalink
Hotfix multi-cluster (#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdess09 authored Oct 9, 2023
1 parent 169b414 commit 9d367d1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 23 deletions.
5 changes: 3 additions & 2 deletions dashboard/src/components/ProvisionerFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ const ProvisionerFlow: React.FC<Props> = ({ }) => {
<Block
key={i}
disabled={
isUsageExceeded ||
(provider === "gcp" && !currentProject?.azure_enabled)
!currentProject?.multi_cluster && (isUsageExceeded ||
(provider === "gcp" && !currentProject?.azure_enabled))

}
onClick={() => {
if (
Expand Down
52 changes: 31 additions & 21 deletions dashboard/src/main/home/sidebar/ProvisionClusterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,46 @@ const ProvisionClusterModal: React.FC<Props> = ({
const [targetArn, setTargetARN] = useState("")

return (
<Modal closeModal={closeModal} width={"900px"}>
<Modal closeModal={closeModal} width={"1000px"}>
<Text size={16}>
Provision A New Cluster
</Text>
<Spacer y={1} />
{currentCredential && targetArn ? (<>
<ProvisionerSettings
credentialId={targetArn}
closeModal={closeModal}
/>

{/* <ProvisionerForm
goBack={() => setCurrentStep("credentials")}
credentialId={String(currentCredential.aws_integration_id)}
provider={"aws"}
/> */}
</>) : (
< AWSCredentialsList
setTargetARN={setTargetARN}
selectCredential={
(i) =>
setCurrentCredential({
<ScrollableContent>
{currentCredential && targetArn ? (
<>
<ProvisionerSettings
credentialId={targetArn}
closeModal={closeModal}
/>
{/* Uncommented for future use if needed.
<ProvisionerForm
goBack={() => setCurrentStep("credentials")}
credentialId={String(currentCredential.aws_integration_id)}
provider={"aws"}
/> */}
</>
) : (
<AWSCredentialsList
setTargetARN={setTargetARN}
selectCredential={
(i) => setCurrentCredential({
aws_integration_id: i,
})
}
/>)
}
}
/>
)}
</ScrollableContent>
</Modal >
)
}

export default ProvisionClusterModal;

const ScrollableContent = styled.div`
width: 100%;
max-height: 700px; // or whatever height you prefer
overflow-y: auto;
padding: 10px;
position: relative;
`;

0 comments on commit 9d367d1

Please sign in to comment.