Skip to content

Commit 5fbc600

Browse files
authored
feat(3619): regional-specific, cluster info into Org about page (#3674)
1 parent 86dd149 commit 5fbc600

File tree

8 files changed

+303
-159
lines changed

8 files changed

+303
-159
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"cy": "CYPRESS_dexUrl=https://$INGRESS_HOST:$PORT_HTTPS CYPRESS_baseUrl=http://localhost:9999 cypress open",
5353
"cy:dev": "source ../monitor-ci/.env && CYPRESS_dexUrl=CLOUD CYPRESS_baseUrl=https://$INGRESS_HOST:$PORT_HTTPS cypress open --config testFiles='{cloud,shared}/**/*.*'",
5454
"cy:dev-oss": "source ../monitor-ci/.env && CYPRESS_dexUrl=OSS CYPRESS_baseUrl=https://$INGRESS_HOST:$PORT_HTTPS cypress open --config testFiles='{oss,shared}/**/*.*'",
55-
"generate": "export SHA=1a263ef19a48e03100c7e8006ee76b3a8e6e932e && export REMOTE=https://raw.githubusercontent.com/influxdata/openapi/${SHA}/ && yarn generate-meta",
55+
"generate": "export SHA=7227887eaec5dfcab6774209e660eb797dd9efac && export REMOTE=https://raw.githubusercontent.com/influxdata/openapi/${SHA}/ && yarn generate-meta",
5656
"generate-local": "export REMOTE=../openapi/ && yarn generate-meta",
5757
"generate-meta": "if [ -z \"${CLOUD_URL}\" ]; then yarn generate-meta-oss; else yarn generate-meta-cloud; fi",
5858
"generate-meta-oss": "yarn oss-api && yarn notebooks && yarn unity && yarn annotations-oss && yarn pinned && yarn mapsd-oss && yarn cloudPriv",

src/flows/pipes/Region/view.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ export const REGIONS = [
6161
flag: 'local-dev',
6262
value: 'https://influxdb.aws.influxdata.io',
6363
},
64-
{
65-
label: 'Local Kind Cluster',
66-
group: 'Development',
67-
flag: 'local-dev',
68-
value: 'https://twodotoh.a.influxcloud.dev.local',
69-
},
7064
{label: 'Current Region', value: 'self'},
7165
{label: 'Self Hosted', value: 'self-hosted'},
7266
]

src/organizations/components/OrgProfileTab.tsx

Lines changed: 0 additions & 148 deletions
This file was deleted.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Libraries
2+
import React, {FC} from 'react'
3+
import {useDispatch} from 'react-redux'
4+
5+
// Components
6+
import {
7+
FlexBox,
8+
ComponentSize,
9+
Heading,
10+
HeadingElement,
11+
FontWeight,
12+
JustifyContent,
13+
} from '@influxdata/clockface'
14+
import CopyButton from 'src/shared/components/CopyButton'
15+
16+
// Actions
17+
import {notify} from 'src/shared/actions/notifications'
18+
19+
// Utils
20+
import {copyToClipboardSuccess} from 'src/shared/copy/notifications'
21+
import 'src/organizations/components/OrgProfileTab/style.scss'
22+
23+
interface Props {
24+
id: string
25+
label: string
26+
src: string
27+
name?: string
28+
}
29+
30+
const CopyableLabeledData: FC<Props> = ({id, label, src, name}) => {
31+
const dispatch = useDispatch()
32+
const generateCopyText = () => {
33+
dispatch(notify(copyToClipboardSuccess(label, src)))
34+
}
35+
36+
return (
37+
<>
38+
<Heading
39+
element={HeadingElement.H4}
40+
className="org-profile-tab--heading"
41+
weight={FontWeight.Regular}
42+
>
43+
{label}
44+
</Heading>
45+
<div
46+
className="code-snippet org-profile-tab--copyableText"
47+
data-testid={`code-snippet--${id}`}
48+
>
49+
<div className="code-snippet--text">
50+
<pre>
51+
<code>{src}</code>
52+
</pre>
53+
</div>
54+
<FlexBox
55+
className="code-snippet--footer"
56+
margin={ComponentSize.Medium}
57+
stretchToFitWidth={true}
58+
justifyContent={JustifyContent.SpaceBetween}
59+
>
60+
<CopyButton
61+
text={src}
62+
testID={`copy-btn--${id}`}
63+
onCopy={generateCopyText}
64+
/>
65+
{name && (
66+
<label
67+
className="code-snippet--label"
68+
data-testid="org-profile--name"
69+
>
70+
{`${name} |`} <b>{label}</b>
71+
</label>
72+
)}
73+
</FlexBox>
74+
</div>
75+
</>
76+
)
77+
}
78+
79+
export default CopyableLabeledData

src/organizations/components/OrgProfileDeletePanel.tsx renamed to src/organizations/components/OrgProfileTab/DeletePanel.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ import {event} from 'src/cloud/utils/reporting'
2222
import {getQuartzMe} from 'src/me/selectors'
2323
import {NotificationButtonElement} from 'src/types'
2424

25-
const OrgProfileTab: FC = () => {
25+
import 'src/organizations/components/OrgProfileTab/style.scss'
26+
27+
const DeletePanel: FC = () => {
2628
const quartzMe = useSelector(getQuartzMe)
2729
const org = useSelector(getOrg)
2830
const history = useHistory()
@@ -65,8 +67,8 @@ const OrgProfileTab: FC = () => {
6567
{CLOUD && quartzMe?.accountType === 'free' && (
6668
<>
6769
<FlexBox.Child>
68-
<h4 style={{marginBottom: '4px'}}>Delete Organization</h4>
69-
<p style={{margin: '0px'}}>
70+
<h4>Delete Organization</h4>
71+
<p className="org-profile-tab--heading org-profile-tab--deleteHeading">
7072
Delete your Free InfluxDB Cloud account and remove any data that
7173
you have loaded.
7274
</p>
@@ -86,4 +88,4 @@ const OrgProfileTab: FC = () => {
8688
)
8789
}
8890

89-
export default OrgProfileTab
91+
export default DeletePanel
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Libraries
2+
import React, {FC} from 'react'
3+
4+
// Components
5+
import {
6+
FlexBox,
7+
AlignItems,
8+
FlexDirection,
9+
ComponentSize,
10+
Heading,
11+
HeadingElement,
12+
FontWeight,
13+
} from '@influxdata/clockface'
14+
15+
interface Props {
16+
label: string
17+
src: string
18+
}
19+
20+
const LabeledData: FC<Props> = ({label, src}) => (
21+
<FlexBox
22+
direction={FlexDirection.Column}
23+
margin={ComponentSize.Large}
24+
alignItems={AlignItems.FlexStart}
25+
>
26+
<Heading
27+
className="org-profile-tab--heading"
28+
element={HeadingElement.H4}
29+
weight={FontWeight.Regular}
30+
>
31+
{label}
32+
</Heading>
33+
<span style={{fontWeight: FontWeight.Light, width: '100%'}}>{src}</span>
34+
</FlexBox>
35+
)
36+
37+
export default LabeledData

0 commit comments

Comments
 (0)