@@ -18,24 +18,21 @@ import React, { Fragment, useEffect, useState } from "react";
18
18
import {
19
19
AccountIcon ,
20
20
AddIcon ,
21
+ Box ,
21
22
Button ,
23
+ DataTable ,
22
24
DeleteIcon ,
25
+ Grid ,
23
26
HelpBox ,
24
27
PageLayout ,
25
28
PasswordKeyIcon ,
26
29
} from "mds" ;
27
30
import { useSelector } from "react-redux" ;
28
31
import { useNavigate } from "react-router-dom" ;
29
- import { Theme } from "@mui/material/styles" ;
30
- import createStyles from "@mui/styles/createStyles" ;
31
- import Grid from "@mui/material/Grid" ;
32
32
import api from "../../../common/api" ;
33
- import { Box } from "@mui/material" ;
34
- import TableWrapper from "../Common/TableWrapper/TableWrapper" ;
35
33
import { stringSort } from "../../../utils/sortFunctions" ;
36
34
import {
37
35
actionsTray ,
38
- searchField ,
39
36
tableStyles ,
40
37
} from "../Common/FormComponents/common/styleLibrary" ;
41
38
@@ -54,7 +51,6 @@ import { selectSAs } from "../Configurations/utils";
54
51
import DeleteMultipleServiceAccounts from "../Users/DeleteMultipleServiceAccounts" ;
55
52
import ServiceAccountPolicy from "./ServiceAccountPolicy" ;
56
53
import { setErrorSnackMessage , setSnackBarMessage } from "../../../systemSlice" ;
57
- import makeStyles from "@mui/styles/makeStyles" ;
58
54
import { selFeatures } from "../consoleSlice" ;
59
55
import { useAppDispatch } from "../../../store" ;
60
56
import TooltipWrapper from "../Common/TooltipWrapper/TooltipWrapper" ;
@@ -64,24 +60,10 @@ const DeleteServiceAccount = withSuspense(
64
60
React . lazy ( ( ) => import ( "./DeleteServiceAccount" ) )
65
61
) ;
66
62
67
- const useStyles = makeStyles ( ( theme : Theme ) =>
68
- createStyles ( {
69
- ...actionsTray ,
70
- ...searchField ,
71
- searchField : {
72
- ...searchField . searchField ,
73
- marginRight : "auto" ,
74
- maxWidth : 380 ,
75
- } ,
76
- ...tableStyles ,
77
- } )
78
- ) ;
79
-
80
63
const Account = ( ) => {
81
64
const dispatch = useAppDispatch ( ) ;
82
65
const navigate = useNavigate ( ) ;
83
66
84
- const classes = useStyles ( ) ;
85
67
const features = useSelector ( selFeatures ) ;
86
68
87
69
const [ records , setRecords ] = useState < string [ ] > ( [ ] ) ;
@@ -199,27 +181,29 @@ const Account = () => {
199
181
closeModalAndRefresh = { closePolicyModal }
200
182
/>
201
183
) }
202
- < ChangePasswordModal
203
- open = { changePasswordModalOpen }
204
- closeModal = { ( ) => setChangePasswordModalOpen ( false ) }
205
- />
184
+ { changePasswordModalOpen && (
185
+ < ChangePasswordModal
186
+ open = { changePasswordModalOpen }
187
+ closeModal = { ( ) => setChangePasswordModalOpen ( false ) }
188
+ />
189
+ ) }
206
190
< PageHeaderWrapper label = "Access Keys" />
207
191
< PageLayout >
208
- < Grid container spacing = { 1 } >
209
- < Grid item = { true } xs = { 12 } className = { classes . actionsTray } >
192
+ < Grid container >
193
+ < Grid item xs = { 12 } sx = { { ... actionsTray . actionsTray } } >
210
194
< SearchBox
211
195
placeholder = { "Search Access Keys" }
212
196
onChange = { setFilter }
213
- overrideClass = { classes . searchField }
197
+ sx = { { marginRight : "auto" , maxWidth : 380 } }
214
198
value = { filter }
215
199
/>
216
-
217
200
< Box
218
201
sx = { {
219
202
display : "flex" ,
203
+ flexWrap : "nowrap" ,
204
+ gap : 5 ,
220
205
} }
221
206
>
222
- { " " }
223
207
< TooltipWrapper tooltip = { "Delete Selected" } >
224
208
< Button
225
209
id = { "delete-selected-accounts" }
@@ -266,20 +250,19 @@ const Account = () => {
266
250
</ Box >
267
251
</ Grid >
268
252
269
- < Grid item xs = { 12 } className = { classes . tableBlock } >
270
- < TableWrapper
253
+ < Grid item xs = { 12 } sx = { { ... tableStyles . tableBlock } } >
254
+ < DataTable
271
255
isLoading = { loading }
272
256
records = { filteredRecords }
273
257
entityName = { "Access Keys" }
274
- idField = { "" }
275
- columns = { [ { label : "Access Key" , elementKey : "" } ] }
258
+ columns = { [ { label : "Access Key" } ] }
276
259
itemActions = { tableActions }
277
260
selectedItems = { selectedSAs }
278
261
onSelect = { ( e ) => selectSAs ( e , setSelectedSAs , selectedSAs ) }
279
262
onSelectAll = { selectAllItems }
280
263
/>
281
264
</ Grid >
282
- < Grid item xs = { 12 } marginTop = { "15px" } >
265
+ < Grid item xs = { 12 } sx = { { marginTop : 15 } } >
283
266
< HelpBox
284
267
title = { "Learn more about ACCESS KEYS" }
285
268
iconComponent = { < AccountIcon /> }
@@ -295,11 +278,8 @@ const Account = () => {
295
278
< br />
296
279
< br />
297
280
You can learn more at our{ " " }
298
- {
299
- // TODO: Change this link once it is called access keys
300
- }
301
281
< a
302
- href = "https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html?ref=con#service-accounts "
282
+ href = "https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html?ref=con#id3 "
303
283
target = "_blank"
304
284
rel = "noopener"
305
285
>
0 commit comments