@@ -21,6 +21,7 @@ import {
21
21
Button ,
22
22
DeleteIcon ,
23
23
HelpBox ,
24
+ PageLayout ,
24
25
PasswordKeyIcon ,
25
26
} from "mds" ;
26
27
import { useSelector } from "react-redux" ;
@@ -40,7 +41,6 @@ import {
40
41
41
42
import { ErrorResponseHandler } from "../../../common/types" ;
42
43
import ChangePasswordModal from "./ChangePasswordModal" ;
43
- import PageLayout from "../Common/Layout/PageLayout" ;
44
44
import SearchBox from "../Common/SearchBox" ;
45
45
import withSuspense from "../Common/Components/withSuspense" ;
46
46
import {
@@ -205,102 +205,104 @@ const Account = () => {
205
205
/>
206
206
< PageHeaderWrapper label = "Access Keys" />
207
207
< 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
+ />
215
216
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 >
223
250
< Button
224
- id = { "delete-selected-accounts " }
251
+ id = { "create-service-account " }
225
252
onClick = { ( ) => {
226
- setDeleteMultipleOpen ( true ) ;
253
+ navigate ( ` ${ IAM_PAGES . ACCOUNT_ADD } ` ) ;
227
254
} }
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" }
247
258
/>
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 >
260
261
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 >
304
306
</ Grid >
305
307
</ PageLayout >
306
308
</ React . Fragment >
0 commit comments