-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add multi-cluster management (#1153)
- Loading branch information
Showing
32 changed files
with
885 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Button, Modal, WarningIcon } from '@pluralsh/design-system' | ||
import { ReactElement } from 'react' | ||
import { useNavigate } from 'react-router-dom' | ||
import styled from 'styled-components' | ||
|
||
const Wrap = styled.div((_) => ({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
})) | ||
|
||
const Message = styled.div(({ theme }) => ({ | ||
...theme.partials.text.body2, | ||
marginBottom: theme.spacing.large, | ||
})) | ||
|
||
const Header = styled.div(({ theme }) => ({ | ||
...theme.partials.text.overline, | ||
display: 'flex', | ||
})) | ||
|
||
function UpgradeNeededModal({ open, onClose }): ReactElement { | ||
const navigate = useNavigate() | ||
|
||
return ( | ||
<Modal | ||
BackdropProps={{ zIndex: 20 }} | ||
header={ | ||
<Header> | ||
<WarningIcon | ||
color="icon-warning" | ||
marginRight="xsmall" | ||
/> | ||
Upgrade needed | ||
</Header> | ||
} | ||
open={open} | ||
onClose={() => onClose()} | ||
style={{ padding: 0 }} | ||
> | ||
<Wrap> | ||
<Message> | ||
Upgrade to Plural Professional to access multi-cluster-management. | ||
</Message> | ||
<Button | ||
alignSelf="flex-end" | ||
onClick={() => navigate('/account/billing')} | ||
> | ||
Review plans | ||
</Button> | ||
</Wrap> | ||
</Modal> | ||
) | ||
} | ||
|
||
export default UpgradeNeededModal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Button } from '@pluralsh/design-system' | ||
import { ReactElement, useState } from 'react' | ||
|
||
import CreateClusterModal from './CreateClusterModal' | ||
|
||
function CreateClusterButton(): ReactElement { | ||
const [createClusterModalOpen, setCreateClusterModalOpen] = useState(false) | ||
|
||
return ( | ||
<> | ||
<Button onClick={() => setCreateClusterModalOpen(true)}> | ||
Create cluster | ||
</Button> | ||
{createClusterModalOpen && ( | ||
<CreateClusterModal | ||
open={createClusterModalOpen} | ||
onClose={() => setCreateClusterModalOpen(false)} | ||
/> | ||
)} | ||
</> | ||
) | ||
} | ||
|
||
export default CreateClusterButton |
Oops, something went wrong.