Skip to content

Commit

Permalink
Fixed assign policies screens (#1815)
Browse files Browse the repository at this point in the history
  • Loading branch information
bexsoft committed Apr 8, 2022
1 parent 404a10d commit 49f340b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 50 deletions.
25 changes: 14 additions & 11 deletions portal-ui/src/screens/Console/Groups/AddGroupMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,20 @@ const AddGroupMember = ({
title={title}
titleIcon={<AddMembersToGroupIcon />}
>
<div className={classes.formFieldRow}>
<PredefinedList label={`Selected Group`} content={selectedGroup} />
</div>
<div className={classes.userSelector}>
<UsersSelectors
selectedUsers={selectedUsers}
setSelectedUsers={setSelectedUsers}
editMode={!selectedGroup}
/>
</div>

<Grid container>
<Grid item xs={12}>
<div className={classes.formFieldRow}>
<PredefinedList label={`Selected Group`} content={selectedGroup} />
</div>
<div className={classes.userSelector}>
<UsersSelectors
selectedUsers={selectedUsers}
setSelectedUsers={setSelectedUsers}
editMode={!selectedGroup}
/>
</div>
</Grid>
</Grid>
<Grid item xs={12} className={classes.modalButtonBar}>
<Button
type="button"
Expand Down
38 changes: 21 additions & 17 deletions portal-ui/src/screens/Console/Policies/SetPolicy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,28 @@ const SetPolicy = ({
modalOpen={open}
title="Set Policies"
>
<Grid item xs={12}>
<PredefinedList
label={`Selected ${selectedGroup !== null ? "Group" : "User"}`}
content={selectedGroup !== null ? selectedGroup : userName}
/>
</Grid>
<Grid item xs={12}>
<PredefinedList
label={"Current Policy"}
content={actualPolicy.join(", ")}
/>
<Grid container>
<Grid item xs={12}>
<PredefinedList
label={`Selected ${selectedGroup !== null ? "Group" : "User"}`}
content={selectedGroup !== null ? selectedGroup : userName}
/>
</Grid>
<Grid item xs={12}>
<PredefinedList
label={"Current Policy"}
content={actualPolicy.join(", ")}
/>
</Grid>
<Grid item xs={12}>
<div className={classes.tableBlock}>
<PolicySelectors
selectedPolicy={selectedPolicy}
setSelectedPolicy={setSelectedPolicy}
/>
</div>
</Grid>
</Grid>
<div className={classes.tableBlock}>
<PolicySelectors
selectedPolicy={selectedPolicy}
setSelectedPolicy={setSelectedPolicy}
/>
</div>
<Grid item xs={12} className={classes.buttonContainer}>
<Button
type="button"
Expand Down
30 changes: 8 additions & 22 deletions portal-ui/src/screens/Console/Users/SetUserPolicies.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -121,12 +106,13 @@ const SetUserPolicies = ({
modalOpen={open}
title="Set Policies"
>
<PolicySelectors
selectedPolicy={selectedPolicy}
setSelectedPolicy={setSelectedPolicy}
/>
<Grid item xs={12}>
<br />
<Grid container>
<Grid item xs={12}>
<PolicySelectors
selectedPolicy={selectedPolicy}
setSelectedPolicy={setSelectedPolicy}
/>
</Grid>
</Grid>
<Grid item xs={12} className={classes.buttonContainer}>
<button
Expand Down

0 comments on commit 49f340b

Please sign in to comment.