Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
)}
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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 />
Expand All @@ -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>
Expand Down