-
Notifications
You must be signed in to change notification settings - Fork 55
feat: add support for freemium license #2882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
eece861
feat: add support for freemium license
arunjaindev 52ddf77
chore: version bump
arunjaindev 27ecf02
chore: add gradient
arunjaindev 705d2e7
feat: add module limits in freemium
arunjaindev 2f2fc0f
chore: version bump
arunjaindev 5489a64
chore: add check for license data
arunjaindev ddd2c23
fix: use all clusters for count
arunjaindev b849663
chore: version bump
arunjaindev cc854a4
feat: use icon from icon component
arunjaindev b00ed98
chore: version bump
arunjaindev 5955bd5
chore: update url for upgrade contact
arunjaindev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
84 changes: 84 additions & 0 deletions
84
src/Pages/Shared/UpgradeToEnterprise/UpgradeToEnterpriseDialog.tsx
This file contains hidden or 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,84 @@ | ||
import { | ||
Button, | ||
ButtonStyleType, | ||
ButtonVariantType, | ||
GenericModal, | ||
Icon, | ||
noop, | ||
} from '@devtron-labs/devtron-fe-common-lib' | ||
|
||
import { ReactComponent as ICUpgradeToEnterprise } from './ic-upgrade-enterprise.svg' | ||
|
||
const ENTERPRISE_PLAN_OFFERINGS = [ | ||
'Unlimited clusters', | ||
'Managed Devtron installation', | ||
'Priority support', | ||
'Contribute to our roadmap', | ||
'Early access to enterprise features & more…', | ||
] | ||
|
||
const UpgradeToEnterpriseDialog = ({ open, handleClose }: { open: boolean; handleClose: () => void }) => ( | ||
<GenericModal name="upgrade-to-enterprise" open={open} width={450} onClose={noop}> | ||
<GenericModal.Body> | ||
<div | ||
className="p-32 flexbox-col dc__gap-32" | ||
style={{ | ||
background: | ||
'linear-gradient(183deg, var(--bg-primary) 5.64%, var(--bg-primary, #FFF) 41.13%, var(--B100) 76.62%, var(--V200) 94.36%)', | ||
}} | ||
> | ||
<div className="flexbox-col dc__gap-16"> | ||
<div className="flexbox dc__content-space dc__align-start"> | ||
<ICUpgradeToEnterprise className="icon-dim-64" /> | ||
<Button | ||
dataTestId="close-upgrade-dialog" | ||
icon={<Icon name="ic-close-large" color={null} />} | ||
variant={ButtonVariantType.secondary} | ||
style={ButtonStyleType.negativeGrey} | ||
onClick={handleClose} | ||
ariaLabel="close-upgrade-dialog" | ||
showAriaLabelInTippy={false} | ||
/> | ||
</div> | ||
<div className="flexbox-col dc__gap-8"> | ||
<h1 className="fs-24 lh-1-5 fw-7 cn-9 m-0">Upgrade to Enterprise Plan</h1> | ||
<span className="fs-16 fw-4 lh-1-5 cn-9"> | ||
Your freemium plan allows only 1 cluster. Unlock more to scale without limits. | ||
</span> | ||
</div> | ||
</div> | ||
<div className="flexbox-col border__primary-translucent br-12 shadow__card--10"> | ||
<div className="flexbox-col dc__gap-16 p-20"> | ||
<span className="fs-15 fw-6 lh-1-5 cn-9">What’s included</span> | ||
<div className="flexbox-col dc__gap-8"> | ||
{ENTERPRISE_PLAN_OFFERINGS.map((description) => ( | ||
<div key={description} className="flexbox dc__gap-8 dc__align-items-center"> | ||
<Icon name="ic-check" color="G500" size={20} /> | ||
<span className="fs-13 lh-20 fw-4 cn-9">{description}</span> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
<div className="divider__primary--horizontal" /> | ||
<div className="p-20 flexbox-col dc__gap-20"> | ||
<div className="flexbox-col dc__gap-4"> | ||
<span className="fs-15 fw-6 lh-1-5 cn-9">Unlock Devtron's Full Potential</span> | ||
<span className="fs-13 hw-4 lh-1-5 cn-9"> | ||
Scale your infrastructure, accelerate your teams, and get the resources you need to | ||
grow. | ||
</span> | ||
</div> | ||
{/* TODO: Add onClick handler */} | ||
arunjaindev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Button | ||
dataTestId="upgrade-to-enterprise" | ||
text="Upgrade Now" | ||
endIcon={<Icon name="ic-arrow-right" color={null} />} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</GenericModal.Body> | ||
</GenericModal> | ||
) | ||
|
||
export default UpgradeToEnterpriseDialog |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.