remove warning message in delete bucket replication rule (#2931)
This commit is contained in:
committed by
GitHub
parent
420ed00f55
commit
60f5eb603b
@@ -242,7 +242,10 @@ const BucketReplicationPanel = ({ classes }: IBucketReplicationProps) => {
|
||||
ruleToDelete={selectedRRule}
|
||||
rulesToDelete={selectedRepRules}
|
||||
remainingRules={replicationRules.length}
|
||||
allSelected={selectedRepRules.length === replicationRules.length}
|
||||
allSelected={
|
||||
replicationRules.length > 0 &&
|
||||
selectedRepRules.length === replicationRules.length
|
||||
}
|
||||
deleteSelectedRules={deleteSelectedRules}
|
||||
/>
|
||||
)}
|
||||
@@ -277,7 +280,10 @@ const BucketReplicationPanel = ({ classes }: IBucketReplicationProps) => {
|
||||
label={"Remove Selected Rules"}
|
||||
icon={<TrashIcon />}
|
||||
color={"secondary"}
|
||||
disabled={selectedRepRules.length === 0}
|
||||
disabled={
|
||||
selectedRepRules.length === 0 ||
|
||||
replicationRules.length === 0
|
||||
}
|
||||
variant={"secondary"}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
|
||||
@@ -24,7 +24,6 @@ import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
|
||||
import { ConfirmDeleteIcon } from "mds";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
|
||||
import WarningMessage from "../../Common/WarningMessage/WarningMessage";
|
||||
import { setErrorSnackMessage } from "../../../../systemSlice";
|
||||
import { useAppDispatch } from "../../../../store";
|
||||
|
||||
@@ -101,10 +100,6 @@ const DeleteReplicationRule = ({
|
||||
<DialogContentText>
|
||||
{deleteSelectedRules ? (
|
||||
<Fragment>
|
||||
<WarningMessage
|
||||
title={"Warning"}
|
||||
label={"The corresponding remote buckets will also be deleted."}
|
||||
/>
|
||||
Are you sure you want to remove the selected replication rules for
|
||||
bucket <b>{selectedBucket}</b>?<br />
|
||||
<br />
|
||||
@@ -123,10 +118,6 @@ const DeleteReplicationRule = ({
|
||||
</Fragment>
|
||||
) : (
|
||||
<Fragment>
|
||||
<WarningMessage
|
||||
title={"Warning"}
|
||||
label={"The corresponding remote bucket will also be deleted."}
|
||||
/>
|
||||
Are you sure you want to delete replication rule{" "}
|
||||
<b>{ruleToDelete}</b>?
|
||||
</Fragment>
|
||||
|
||||
Reference in New Issue
Block a user