Skip to content

Commit 90c8ea7

Browse files
authored
Use PageLayout from mds (#2789)
1 parent fb5193d commit 90c8ea7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1249
-1254
lines changed

portal-ui/src/screens/Console/Account/Account.tsx

Lines changed: 93 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
Button,
2222
DeleteIcon,
2323
HelpBox,
24+
PageLayout,
2425
PasswordKeyIcon,
2526
} from "mds";
2627
import { useSelector } from "react-redux";
@@ -40,7 +41,6 @@ import {
4041

4142
import { ErrorResponseHandler } from "../../../common/types";
4243
import ChangePasswordModal from "./ChangePasswordModal";
43-
import PageLayout from "../Common/Layout/PageLayout";
4444
import SearchBox from "../Common/SearchBox";
4545
import withSuspense from "../Common/Components/withSuspense";
4646
import {
@@ -205,102 +205,104 @@ const Account = () => {
205205
/>
206206
<PageHeaderWrapper label="Access Keys" />
207207
<PageLayout>
208-
<Grid item={true} xs={12} className={classes.actionsTray}>
209-
<SearchBox
210-
placeholder={"Search Access Keys"}
211-
onChange={setFilter}
212-
overrideClass={classes.searchField}
213-
value={filter}
214-
/>
208+
<Grid container spacing={1}>
209+
<Grid item={true} xs={12} className={classes.actionsTray}>
210+
<SearchBox
211+
placeholder={"Search Access Keys"}
212+
onChange={setFilter}
213+
overrideClass={classes.searchField}
214+
value={filter}
215+
/>
215216

216-
<Box
217-
sx={{
218-
display: "flex",
219-
}}
220-
>
221-
{" "}
222-
<TooltipWrapper tooltip={"Delete Selected"}>
217+
<Box
218+
sx={{
219+
display: "flex",
220+
}}
221+
>
222+
{" "}
223+
<TooltipWrapper tooltip={"Delete Selected"}>
224+
<Button
225+
id={"delete-selected-accounts"}
226+
onClick={() => {
227+
setDeleteMultipleOpen(true);
228+
}}
229+
label={"Delete Selected"}
230+
icon={<DeleteIcon />}
231+
disabled={selectedSAs.length === 0}
232+
variant={"secondary"}
233+
/>
234+
</TooltipWrapper>
235+
<SecureComponent
236+
scopes={[IAM_SCOPES.ADMIN_CREATE_USER]}
237+
resource={CONSOLE_UI_RESOURCE}
238+
matchAll
239+
errorProps={{ disabled: true }}
240+
>
241+
<Button
242+
id={"change-password"}
243+
onClick={() => setChangePasswordModalOpen(true)}
244+
label={`Change Password`}
245+
icon={<PasswordKeyIcon />}
246+
variant={"regular"}
247+
disabled={userIDP}
248+
/>
249+
</SecureComponent>
223250
<Button
224-
id={"delete-selected-accounts"}
251+
id={"create-service-account"}
225252
onClick={() => {
226-
setDeleteMultipleOpen(true);
253+
navigate(`${IAM_PAGES.ACCOUNT_ADD}`);
227254
}}
228-
label={"Delete Selected"}
229-
icon={<DeleteIcon />}
230-
disabled={selectedSAs.length === 0}
231-
variant={"secondary"}
232-
/>
233-
</TooltipWrapper>
234-
<SecureComponent
235-
scopes={[IAM_SCOPES.ADMIN_CREATE_USER]}
236-
resource={CONSOLE_UI_RESOURCE}
237-
matchAll
238-
errorProps={{ disabled: true }}
239-
>
240-
<Button
241-
id={"change-password"}
242-
onClick={() => setChangePasswordModalOpen(true)}
243-
label={`Change Password`}
244-
icon={<PasswordKeyIcon />}
245-
variant={"regular"}
246-
disabled={userIDP}
255+
label={`Create access key`}
256+
icon={<AddIcon />}
257+
variant={"callAction"}
247258
/>
248-
</SecureComponent>
249-
<Button
250-
id={"create-service-account"}
251-
onClick={() => {
252-
navigate(`${IAM_PAGES.ACCOUNT_ADD}`);
253-
}}
254-
label={`Create access key`}
255-
icon={<AddIcon />}
256-
variant={"callAction"}
257-
/>
258-
</Box>
259-
</Grid>
259+
</Box>
260+
</Grid>
260261

261-
<Grid item xs={12} className={classes.tableBlock}>
262-
<TableWrapper
263-
isLoading={loading}
264-
records={filteredRecords}
265-
entityName={"Access Keys"}
266-
idField={""}
267-
columns={[{ label: "Access Key", elementKey: "" }]}
268-
itemActions={tableActions}
269-
selectedItems={selectedSAs}
270-
onSelect={(e) => selectSAs(e, setSelectedSAs, selectedSAs)}
271-
onSelectAll={selectAllItems}
272-
/>
273-
</Grid>
274-
<Grid item xs={12} marginTop={"15px"}>
275-
<HelpBox
276-
title={"Learn more about ACCESS KEYS"}
277-
iconComponent={<AccountIcon />}
278-
help={
279-
<Fragment>
280-
MinIO access keys are child identities of an authenticated MinIO
281-
user, including externally managed identities. Each access key
282-
inherits its privileges based on the policies attached to it’s
283-
parent user or those groups in which the parent user has
284-
membership. Access Keys also support an optional inline policy
285-
which further restricts access to a subset of actions and
286-
resources available to the parent user.
287-
<br />
288-
<br />
289-
You can learn more at our{" "}
290-
{
291-
// TODO: Change this link once it is called access keys
292-
}
293-
<a
294-
href="https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html?ref=con#service-accounts"
295-
target="_blank"
296-
rel="noopener"
297-
>
298-
documentation
299-
</a>
300-
.
301-
</Fragment>
302-
}
303-
/>
262+
<Grid item xs={12} className={classes.tableBlock}>
263+
<TableWrapper
264+
isLoading={loading}
265+
records={filteredRecords}
266+
entityName={"Access Keys"}
267+
idField={""}
268+
columns={[{ label: "Access Key", elementKey: "" }]}
269+
itemActions={tableActions}
270+
selectedItems={selectedSAs}
271+
onSelect={(e) => selectSAs(e, setSelectedSAs, selectedSAs)}
272+
onSelectAll={selectAllItems}
273+
/>
274+
</Grid>
275+
<Grid item xs={12} marginTop={"15px"}>
276+
<HelpBox
277+
title={"Learn more about ACCESS KEYS"}
278+
iconComponent={<AccountIcon />}
279+
help={
280+
<Fragment>
281+
MinIO access keys are child identities of an authenticated
282+
MinIO user, including externally managed identities. Each
283+
access key inherits its privileges based on the policies
284+
attached to it’s parent user or those groups in which the
285+
parent user has membership. Access Keys also support an
286+
optional inline policy which further restricts access to a
287+
subset of actions and resources available to the parent user.
288+
<br />
289+
<br />
290+
You can learn more at our{" "}
291+
{
292+
// TODO: Change this link once it is called access keys
293+
}
294+
<a
295+
href="https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html?ref=con#service-accounts"
296+
target="_blank"
297+
rel="noopener"
298+
>
299+
documentation
300+
</a>
301+
.
302+
</Fragment>
303+
}
304+
/>
305+
</Grid>
304306
</Grid>
305307
</PageLayout>
306308
</React.Fragment>

portal-ui/src/screens/Console/Account/AddServiceAccountScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
BackLink,
2222
Button,
2323
IAMPoliciesIcon,
24+
PageLayout,
2425
PasswordKeyIcon,
2526
ServiceAccountCredentialsIcon,
2627
} from "mds";
@@ -33,7 +34,6 @@ import {
3334
import Grid from "@mui/material/Grid";
3435
import { Box } from "@mui/material";
3536
import CodeMirrorWrapper from "../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper";
36-
import PageLayout from "../Common/Layout/PageLayout";
3737
import InputBoxWrapper from "../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
3838
import FormSwitchWrapper from "../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
3939
import AddServiceAccountHelpBox from "./AddServiceAccountHelpBox";

portal-ui/src/screens/Console/Buckets/BucketDetails/BucketDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
BucketsIcon,
2929
Button,
3030
FolderIcon,
31+
PageLayout,
3132
RefreshIcon,
3233
TrashIcon,
3334
} from "mds";
@@ -54,7 +55,6 @@ import {
5455
IAM_SCOPES,
5556
permissionTooltipHelper,
5657
} from "../../../../common/SecureComponent/permissions";
57-
import PageLayout from "../../Common/Layout/PageLayout";
5858
import VerticalTabs from "../../Common/VerticalTabs/VerticalTabs";
5959

6060
import {

portal-ui/src/screens/Console/Buckets/ListBuckets/AddBucket/AddBucket.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
FormLayout,
2727
HelpBox,
2828
InfoIcon,
29+
PageLayout,
2930
} from "mds";
3031
import {
3132
containerForHeader,
@@ -42,7 +43,6 @@ import {
4243
selSiteRep,
4344
setErrorSnackMessage,
4445
} from "../../../../../systemSlice";
45-
import PageLayout from "../../../Common/Layout/PageLayout";
4646
import InputUnitMenu from "../../../Common/FormComponents/InputUnitMenu/InputUnitMenu";
4747
import TooltipWrapper from "../../../Common/TooltipWrapper/TooltipWrapper";
4848
import SectionTitle from "../../../Common/SectionTitle";

portal-ui/src/screens/Console/Buckets/ListBuckets/ListBuckets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
HelpBox,
2626
LifecycleConfigIcon,
2727
MultipleBucketsIcon,
28+
PageLayout,
2829
RefreshIcon,
2930
SelectAllIcon,
3031
SelectMultipleIcon,
@@ -48,7 +49,6 @@ import {
4849
IAM_SCOPES,
4950
permissionTooltipHelper,
5051
} from "../../../../common/SecureComponent/permissions";
51-
import PageLayout from "../../Common/Layout/PageLayout";
5252
import SearchBox from "../../Common/SearchBox";
5353
import VirtualizedList from "../../Common/VirtualizedList/VirtualizedList";
5454
import BulkLifecycleModal from "./BulkLifecycleModal";

0 commit comments

Comments
 (0)