|
1 | 1 | // Libraries |
2 | | -import React, {CSSProperties, FC, memo, useContext} from 'react' |
3 | | -import { |
4 | | - Panel, |
5 | | - FlexBox, |
6 | | - FlexDirection, |
7 | | - ComponentSize, |
8 | | - AlignItems, |
9 | | -} from '@influxdata/clockface' |
| 2 | +import React, {FC, memo, useContext} from 'react' |
| 3 | +import {useSelector} from 'react-redux' |
10 | 4 |
|
11 | 5 | // Utils |
12 | 6 | import {CLOUD} from 'src/shared/constants' |
13 | 7 | import {UsageContext} from 'src/usage/context/usage' |
14 | 8 |
|
15 | 9 | // Components |
| 10 | +import { |
| 11 | + FlexBox, |
| 12 | + FlexDirection, |
| 13 | + ComponentSize, |
| 14 | + AlignItems, |
| 15 | +} from '@influxdata/clockface' |
| 16 | +import AnnouncementCenter from './AnnouncementCenter' |
| 17 | +import AnnouncementBlock from './AnnouncementBlock' |
16 | 18 | import UsagePanel from 'src/me/components/UsagePanel' |
17 | 19 | import DocSearchWidget from 'src/me/components/DocSearchWidget' |
18 | 20 | import VersionInfo from 'src/shared/components/VersionInfo' |
19 | 21 |
|
20 | | -type OwnProps = { |
21 | | - style?: CSSProperties |
22 | | -} |
| 22 | +// Utils |
| 23 | +import {isOrgIOx} from 'src/organizations/selectors' |
23 | 24 |
|
24 | | -const ResourceLists: FC<OwnProps> = (props: OwnProps) => { |
| 25 | +const ResourceLists: FC = () => { |
25 | 26 | const {paygCreditEnabled} = useContext(UsageContext) |
26 | 27 |
|
27 | 28 | return ( |
28 | 29 | <FlexBox |
29 | 30 | direction={FlexDirection.Column} |
30 | 31 | alignItems={AlignItems.Stretch} |
31 | 32 | stretchToFitWidth={true} |
32 | | - margin={ComponentSize.Small} |
| 33 | + stretchToFitHeight={true} |
| 34 | + margin={ComponentSize.Large} |
33 | 35 | > |
34 | | - <Panel testID="documentation--panel"> |
35 | | - <Panel.Body style={props.style}> |
36 | | - <DocSearchWidget /> |
37 | | - </Panel.Body> |
38 | | - </Panel> |
| 36 | + <DocSearchWidget /> |
| 37 | + {useSelector(isOrgIOx) && ( |
| 38 | + <AnnouncementCenter> |
| 39 | + <AnnouncementBlock |
| 40 | + title="New time-series engine for InfluxDB" |
| 41 | + body={ |
| 42 | + <> |
| 43 | + <p> |
| 44 | + InfluxDB Cloud is now powered by the new{' '} |
| 45 | + <strong>IOx High-Performance Time-Series Engine</strong>. What |
| 46 | + does this mean for you? |
| 47 | + </p> |
| 48 | + <ul> |
| 49 | + <li>Improved performance</li> |
| 50 | + <li>Native support for SQL</li> |
| 51 | + <li>Unlimited series cardinality</li> |
| 52 | + <li>Low-cost cloud object storage</li> |
| 53 | + </ul> |
| 54 | + </> |
| 55 | + } |
| 56 | + ctaText="Learn more" |
| 57 | + ctaLink="https://www.influxdata.com/blog/influxdb-cloud-announces-new-time-series-engine/" |
| 58 | + /> |
| 59 | + </AnnouncementCenter> |
| 60 | + )} |
39 | 61 | {CLOUD && paygCreditEnabled && <UsagePanel />} |
40 | | - <Panel> |
41 | | - <Panel.Footer style={props.style}> |
42 | | - <VersionInfo /> |
43 | | - </Panel.Footer> |
44 | | - </Panel> |
| 62 | + <VersionInfo /> |
45 | 63 | </FlexBox> |
46 | 64 | ) |
47 | 65 | } |
|
0 commit comments