Skip to content

Commit fcd0813

Browse files
authored
feat(Operator Page): add overlay title to organization details overlay (#6475)
* feat: add org details header to overlay * feat: show iox org cardinality as N/A * fix: add "IOx" to cardinality limit * fix: update iox cardinality limit field type to text * chore: revert code showing cardinality for iox * chore: rearrange operator page org overlay * fix: prettier * test: update orgID test * test: use correct testID to reference orgID element
1 parent 973bd9c commit fcd0813

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

cypress/e2e/cloud/operator.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ describe('Operator Page', () => {
196196
})
197197

198198
cy.getByTestID('overlay--container').should('be.visible')
199-
cy.getByTestID('overlay--header').contains('678')
199+
cy.getByTestID('org-overlay-orgID').contains('678')
200200

201201
cy.getByTestID('limits-rate.readKBs--input').clear().type('666')
202202

@@ -244,7 +244,7 @@ describe('Operator Page', () => {
244244
})
245245

246246
cy.getByTestID('overlay--container').should('be.visible')
247-
cy.getByTestID('overlay--header').contains('678')
247+
cy.getByTestID('org-overlay-orgID').contains('678')
248248

249249
cy.getByTestID('limits-rate.readKBs--input')
250250
.invoke('attr', 'value')

src/operator/LimitsField.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ interface Props {
2020
const LimitsField: FC<Props> = ({type, name, limits, onChangeLimits}) => {
2121
const [hasFocus, setHasFocus] = useState(false)
2222
const {hasWritePermissions} = useContext(OperatorContext)
23+
2324
const value = get(limits, name, '')
25+
2426
const formatted_value =
2527
type === InputType.Number
2628
? Intl.NumberFormat(navigator.language).format(value)

src/operator/OrgOverlay.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@
1313
padding: $cf-space-2xs $cf-space-s;
1414
}
1515
}
16+
17+
.org-overlay-detail--text {
18+
font-weight: 700;
19+
font-size: 16px;
20+
}

src/operator/OrgOverlay.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const OrgOverlay: FC = () => {
5757
const history = useHistory()
5858
const canReactivateOrg =
5959
hasWritePermissions && organization?.state === 'suspended'
60+
6061
const isIOx =
6162
organization?.storageType &&
6263
organization.storageType.toLowerCase() === 'iox'
@@ -98,8 +99,8 @@ const OrgOverlay: FC = () => {
9899
>
99100
<Overlay.Container maxWidth={1000}>
100101
<Overlay.Header
101-
title={orgID}
102-
className="overlay-header--color overlay-header--title"
102+
title="Organization Details"
103+
className="overlay-header--color"
103104
onDismiss={() => history.goBack()}
104105
/>
105106
<SpinnerContainer
@@ -110,13 +111,20 @@ const OrgOverlay: FC = () => {
110111
<Panel.Body>
111112
<Grid>
112113
<Grid.Row>
113-
<Grid.Column widthMD={Columns.Four}>
114-
<label>Organization Name</label>
115-
<p>{organization?.name ?? ''}</p>
114+
<Grid.Column
115+
widthMD={Columns.Four}
116+
testID="org-overlay-orgID"
117+
>
118+
<label className="org-overlay-detail--text">
119+
Organization ID
120+
</label>
121+
<p>{orgID}</p>
116122
</Grid.Column>
117123
<Grid.Column widthMD={Columns.Four}>
118-
<label>Account Type</label>
119-
<p>{organization?.account?.type ?? ''}</p>
124+
<label className="org-overlay-detail--text">
125+
Organization Name
126+
</label>
127+
<p>{organization?.name ?? ''}</p>
120128
</Grid.Column>
121129
<Grid.Column widthMD={Columns.Four}>
122130
<LinkButton
@@ -151,9 +159,17 @@ const OrgOverlay: FC = () => {
151159
</Grid.Row>
152160
<Grid.Row>
153161
<Grid.Column widthMD={Columns.Four}>
154-
<label>Organization State</label>
162+
<label className="org-overlay-detail--text">
163+
Organization State
164+
</label>
155165
<p>{organization?.state ?? ''}</p>
156166
</Grid.Column>
167+
<Grid.Column widthMD={Columns.Four}>
168+
<label className="org-overlay-detail--text">
169+
Account Type
170+
</label>
171+
<p>{organization?.account?.type ?? ''}</p>
172+
</Grid.Column>
157173
</Grid.Row>
158174
<SpinnerContainer
159175
loading={limitsStatus}

0 commit comments

Comments
 (0)