Skip to content

Commit 538efbd

Browse files
authored
feat(identity): show deleted org status in orgs list (#6378)
* feat: styling for suspended org card * feat: show provisioningStatus of org * feat: tooltip for suspended org card * fix: prettier * fix: alphabetize and change suspended card color * chore: alphabetize and clean up
1 parent 270b850 commit 538efbd

File tree

3 files changed

+69
-7
lines changed

3 files changed

+69
-7
lines changed

src/identity/components/OrganizationListTab/OrgList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import {getSortedResources, SortTypes} from 'src/shared/utils/sort'
2020

2121
// Types
2222
import {Sort} from '@influxdata/clockface'
23-
import {OrganizationSummaries} from 'src/client/unityRoutes'
23+
import {QuartzOrganization} from 'src/identity/apis/org'
2424

2525
interface Props {
2626
currentPage: number
27-
filteredOrgs: OrganizationSummaries
27+
filteredOrgs: QuartzOrganization[]
2828
isAtOrgLimit: boolean
2929
pageHeight: number
3030
setTotalPages: (action: SetStateAction<number>) => void
@@ -112,6 +112,7 @@ export const OrgList: FC<Props> = ({
112112
provider={org.provider}
113113
regionCode={org.regionCode}
114114
regionName={org.regionName}
115+
provisioningStatus={org.provisioningStatus}
115116
/>
116117
))}
117118
</>

src/identity/components/OrganizationListTab/OrganizationCard.scss

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
@import '@influxdata/clockface/dist/variables.scss';
22

33
.account--organizations-tab-orgs-card {
4-
margin-top: $cf-space-3xs;
5-
margin-bottom: $cf-space-3xs;
64
background-color: $cf-grey-15;
75
border-radius: 2px;
6+
margin-bottom: $cf-space-3xs;
7+
margin-top: $cf-space-3xs;
8+
}
9+
10+
.account--organizations-tab-suspended-orgs-card {
11+
background-color: #11121a;
12+
border-radius: 2px;
13+
margin-bottom: $cf-space-3xs;
14+
margin-top: $cf-space-3xs;
15+
div:not(:last-child) {
16+
opacity: 0.5;
17+
}
818
}
919

1020
.account--organizations-tab-orgs-card-cluster-data {
@@ -18,13 +28,25 @@
1828
}
1929

2030
.account-organizations-tab-orgs-card-location-data {
21-
width: 240px;
31+
width: 200px;
32+
}
33+
34+
.account-organizations-tab-orgs-status--text {
35+
color: $cf-white;
36+
}
37+
38+
.account-organizations-tab-orgs-card-org-status {
39+
width: 150px;
40+
.cf-question-mark-tooltip {
41+
background-color: $cf-white;
42+
color: $cf-grey-5;
43+
}
2244
}
2345

2446
.account--organizations-tab-orgs-card-orgname {
2547
.cf-resource-name--text {
2648
font-size: $cf-text-base-1;
27-
color: $cf-white;
2849
font-weight: $cf-font-weight--bold;
50+
color: $cf-white;
2951
}
3052
}

src/identity/components/OrganizationListTab/OrganizationCard.tsx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,51 @@ import {
33
FlexBox,
44
FlexDirection,
55
JustifyContent,
6+
QuestionMarkTooltip,
67
ResourceCard,
78
} from '@influxdata/clockface'
89

10+
// Utils
11+
import {SafeBlankLink} from 'src/utils/SafeBlankLink'
12+
913
// Styles
1014
import './OrganizationCard.scss'
1115

1216
interface OrgCardProps {
1317
name: string
1418
provider: string
19+
provisioningStatus?: string
1520
regionCode: string
1621
regionName: string
1722
}
1823

24+
const tooltipContent = (
25+
<p>
26+
Organizations can be reactivated within 7 days of deletion. Contact support
27+
at{' '}
28+
<SafeBlankLink href="mailto:support@influxdata.com">
29+
support@influxdata.com
30+
</SafeBlankLink>{' '}
31+
to reactivate.
32+
</p>
33+
)
34+
1935
export const OrganizationCard: FC<OrgCardProps> = ({
2036
name,
2137
provider,
38+
provisioningStatus,
2239
regionCode,
2340
regionName,
2441
}) => {
42+
const isOrgSuspended = provisioningStatus === 'suspended'
43+
2544
return (
2645
<ResourceCard
27-
className="account--organizations-tab-orgs-card"
46+
className={
47+
isOrgSuspended
48+
? 'account--organizations-tab-suspended-orgs-card'
49+
: 'account--organizations-tab-orgs-card'
50+
}
2851
direction={FlexDirection.Row}
2952
justifyContent={JustifyContent.SpaceBetween}
3053
testID="account--organizations-tab-orgs-card"
@@ -43,6 +66,22 @@ export const OrganizationCard: FC<OrgCardProps> = ({
4366
<FlexBox className="account-organizations-tab-orgs-card-location-data">
4467
<b>Location:</b> &nbsp;{regionName}
4568
</FlexBox>
69+
<FlexBox
70+
justifyContent={JustifyContent.SpaceBetween}
71+
className="account-organizations-tab-orgs-card-org-status"
72+
>
73+
{isOrgSuspended && (
74+
<>
75+
<b className="account-organizations-tab-orgs-status--text">
76+
Deletion in progress
77+
</b>
78+
<QuestionMarkTooltip
79+
diameter={15}
80+
tooltipContents={tooltipContent}
81+
/>
82+
</>
83+
)}
84+
</FlexBox>
4685
</ResourceCard.Meta>
4786
</ResourceCard>
4887
)

0 commit comments

Comments
 (0)