-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): add deployments option accordion (#6845)
* feat(ui): add deployments option accordion * feat(ui): only show deploy to free users * chore: add feature flag
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
src/homepageExperience/components/OptionAccordion/DeployAccordion.tsx
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,80 @@ | ||
// Libraries | ||
import React, {FC} from 'react' | ||
|
||
// Components | ||
import {IconFont, InfluxColors} from '@influxdata/clockface' | ||
import {OptionAccordion} from 'src/homepageExperience/components/OptionAccordion/OptionAccordion' | ||
import {OptionAccordionElement} from 'src/homepageExperience/components/OptionAccordion/OptionAccordionElement' | ||
import {OptionLink} from './OptionLink' | ||
|
||
// Utils | ||
import {event} from 'src/cloud/utils/reporting' | ||
|
||
export const DeployAccordion: FC = () => { | ||
const optionId = 'deployInstance' | ||
|
||
const handleServerlessClick = () => { | ||
event(`homeOptions.${optionId}.serverless.clicked`) | ||
} | ||
|
||
const handleDedicatedClick = () => { | ||
event(`homeOptions.${optionId}.dedicated.clicked`) | ||
} | ||
|
||
const handleClusteredClick = () => { | ||
event(`homeOptions.${optionId}.clustered.clicked`) | ||
} | ||
|
||
return ( | ||
<OptionAccordion | ||
headerIcon={IconFont.Cube} | ||
headerIconColor={InfluxColors.Star} | ||
headerTitle="Deploy" | ||
headerDescription="Run InfluxDB where you need it." | ||
optionId="deployInstance" | ||
bodyContent={ | ||
<> | ||
<OptionAccordionElement | ||
elementTitle="Cloud Serverless" | ||
elementDescription="A fully managed, elastic, multi-tenant service best for smaller workloads." | ||
cta={() => { | ||
return ( | ||
<OptionLink | ||
title="Learn More" | ||
href="https://docs.influxdata.com/influxdb/cloud-serverless/" | ||
onClick={handleServerlessClick} | ||
/> | ||
) | ||
}} | ||
/> | ||
<OptionAccordionElement | ||
elementTitle="Cloud Dedicated" | ||
elementDescription="A fully managed, single-tenant service for high volume production workloads." | ||
cta={() => { | ||
return ( | ||
<OptionLink | ||
title="Learn More" | ||
href="https://docs.influxdata.com/influxdb/cloud-dedicated/" | ||
onClick={handleDedicatedClick} | ||
/> | ||
) | ||
}} | ||
/> | ||
<OptionAccordionElement | ||
elementTitle="Clustered" | ||
elementDescription="A self-managed database for on-premises or private cloud deployments." | ||
cta={() => { | ||
return ( | ||
<OptionLink | ||
title="Learn More" | ||
href="https://docs.influxdata.com/influxdb/clustered/" | ||
onClick={handleClusteredClick} | ||
/> | ||
) | ||
}} | ||
/> | ||
</> | ||
} | ||
/> | ||
) | ||
} |
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