File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
portal-ui/src/screens/Console/Buckets/BucketDetails Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,10 @@ const BucketReplicationPanel = ({ classes }: IBucketReplicationProps) => {
242
242
ruleToDelete = { selectedRRule }
243
243
rulesToDelete = { selectedRepRules }
244
244
remainingRules = { replicationRules . length }
245
- allSelected = { selectedRepRules . length === replicationRules . length }
245
+ allSelected = {
246
+ replicationRules . length > 0 &&
247
+ selectedRepRules . length === replicationRules . length
248
+ }
246
249
deleteSelectedRules = { deleteSelectedRules }
247
250
/>
248
251
) }
@@ -277,7 +280,10 @@ const BucketReplicationPanel = ({ classes }: IBucketReplicationProps) => {
277
280
label = { "Remove Selected Rules" }
278
281
icon = { < TrashIcon /> }
279
282
color = { "secondary" }
280
- disabled = { selectedRepRules . length === 0 }
283
+ disabled = {
284
+ selectedRepRules . length === 0 ||
285
+ replicationRules . length === 0
286
+ }
281
287
variant = { "secondary" }
282
288
/>
283
289
</ TooltipWrapper >
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
24
24
import { ConfirmDeleteIcon } from "mds" ;
25
25
import Grid from "@mui/material/Grid" ;
26
26
import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper" ;
27
- import WarningMessage from "../../Common/WarningMessage/WarningMessage" ;
28
27
import { setErrorSnackMessage } from "../../../../systemSlice" ;
29
28
import { useAppDispatch } from "../../../../store" ;
30
29
@@ -101,10 +100,6 @@ const DeleteReplicationRule = ({
101
100
< DialogContentText >
102
101
{ deleteSelectedRules ? (
103
102
< Fragment >
104
- < WarningMessage
105
- title = { "Warning" }
106
- label = { "The corresponding remote buckets will also be deleted." }
107
- />
108
103
Are you sure you want to remove the selected replication rules for
109
104
bucket < b > { selectedBucket } </ b > ?< br />
110
105
< br />
@@ -123,10 +118,6 @@ const DeleteReplicationRule = ({
123
118
</ Fragment >
124
119
) : (
125
120
< Fragment >
126
- < WarningMessage
127
- title = { "Warning" }
128
- label = { "The corresponding remote bucket will also be deleted." }
129
- />
130
121
Are you sure you want to delete replication rule{ " " }
131
122
< b > { ruleToDelete } </ b > ?
132
123
</ Fragment >
You can’t perform that action at this time.
0 commit comments