Skip to content

Commit 49f340b

Browse files
authored
Fixed assign policies screens (#1815)
1 parent 404a10d commit 49f340b

File tree

3 files changed

+43
-50
lines changed

3 files changed

+43
-50
lines changed

portal-ui/src/screens/Console/Groups/AddGroupMember.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,20 @@ const AddGroupMember = ({
8080
title={title}
8181
titleIcon={<AddMembersToGroupIcon />}
8282
>
83-
<div className={classes.formFieldRow}>
84-
<PredefinedList label={`Selected Group`} content={selectedGroup} />
85-
</div>
86-
<div className={classes.userSelector}>
87-
<UsersSelectors
88-
selectedUsers={selectedUsers}
89-
setSelectedUsers={setSelectedUsers}
90-
editMode={!selectedGroup}
91-
/>
92-
</div>
93-
83+
<Grid container>
84+
<Grid item xs={12}>
85+
<div className={classes.formFieldRow}>
86+
<PredefinedList label={`Selected Group`} content={selectedGroup} />
87+
</div>
88+
<div className={classes.userSelector}>
89+
<UsersSelectors
90+
selectedUsers={selectedUsers}
91+
setSelectedUsers={setSelectedUsers}
92+
editMode={!selectedGroup}
93+
/>
94+
</div>
95+
</Grid>
96+
</Grid>
9497
<Grid item xs={12} className={classes.modalButtonBar}>
9598
<Button
9699
type="button"

portal-ui/src/screens/Console/Policies/SetPolicy.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -145,24 +145,28 @@ const SetPolicy = ({
145145
modalOpen={open}
146146
title="Set Policies"
147147
>
148-
<Grid item xs={12}>
149-
<PredefinedList
150-
label={`Selected ${selectedGroup !== null ? "Group" : "User"}`}
151-
content={selectedGroup !== null ? selectedGroup : userName}
152-
/>
153-
</Grid>
154-
<Grid item xs={12}>
155-
<PredefinedList
156-
label={"Current Policy"}
157-
content={actualPolicy.join(", ")}
158-
/>
148+
<Grid container>
149+
<Grid item xs={12}>
150+
<PredefinedList
151+
label={`Selected ${selectedGroup !== null ? "Group" : "User"}`}
152+
content={selectedGroup !== null ? selectedGroup : userName}
153+
/>
154+
</Grid>
155+
<Grid item xs={12}>
156+
<PredefinedList
157+
label={"Current Policy"}
158+
content={actualPolicy.join(", ")}
159+
/>
160+
</Grid>
161+
<Grid item xs={12}>
162+
<div className={classes.tableBlock}>
163+
<PolicySelectors
164+
selectedPolicy={selectedPolicy}
165+
setSelectedPolicy={setSelectedPolicy}
166+
/>
167+
</div>
168+
</Grid>
159169
</Grid>
160-
<div className={classes.tableBlock}>
161-
<PolicySelectors
162-
selectedPolicy={selectedPolicy}
163-
setSelectedPolicy={setSelectedPolicy}
164-
/>
165-
</div>
166170
<Grid item xs={12} className={classes.buttonContainer}>
167171
<Button
168172
type="button"

portal-ui/src/screens/Console/Users/SetUserPolicies.tsx

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
// This file is part of MinIO Console Server
2-
// Copyright (c) 2021 MinIO, Inc.
3-
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
8-
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
13-
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16-
// This file is part of MinIO Console Server
17-
// Copyright (c) 2021 MinIO, Inc.
2+
// Copyright (c) 2022 MinIO, Inc.
183
//
194
// This program is free software: you can redistribute it and/or modify
205
// it under the terms of the GNU Affero General Public License as published by
@@ -121,12 +106,13 @@ const SetUserPolicies = ({
121106
modalOpen={open}
122107
title="Set Policies"
123108
>
124-
<PolicySelectors
125-
selectedPolicy={selectedPolicy}
126-
setSelectedPolicy={setSelectedPolicy}
127-
/>
128-
<Grid item xs={12}>
129-
<br />
109+
<Grid container>
110+
<Grid item xs={12}>
111+
<PolicySelectors
112+
selectedPolicy={selectedPolicy}
113+
setSelectedPolicy={setSelectedPolicy}
114+
/>
115+
</Grid>
130116
</Grid>
131117
<Grid item xs={12} className={classes.buttonContainer}>
132118
<button

0 commit comments

Comments
 (0)