Skip to content

Commit 933a314

Browse files
Merge pull request #2811 from devtron-labs/fix/cluster-del-modal-close
fix: handle success for cluster deletion
2 parents d6f4c15 + 3f1b579 commit 933a314

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ const ClusterForm = ({
15151515
clusterId={String(id)}
15161516
clusterName={clusterName}
15171517
handleClose={hideConfirmationModal}
1518+
handleSuccess={hideEditModal}
15181519
reload={reload}
15191520
installationId={String(installationId)}
15201521
/>

src/Pages/GlobalConfigurations/ClustersAndEnvironments/DeleteClusterConfirmationModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const DeleteClusterConfirmationModal = ({
2323
handleClose,
2424
installationId,
2525
reload,
26+
handleSuccess,
2627
}: DeleteClusterConfirmationModalProps) => {
2728
const isClusterInCreationPhase = Number(clusterId) === 0
2829

@@ -40,6 +41,7 @@ const DeleteClusterConfirmationModal = ({
4041
await deleteCluster({ id: numberedClusterId })
4142
}
4243
reload?.()
44+
handleSuccess?.()
4345
}
4446

4547
const handleToggleShouldDeleteInstalledCluster = () => {

src/Pages/GlobalConfigurations/ClustersAndEnvironments/cluster.type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export interface DeleteClusterConfirmationModalProps
231231
Pick<ClusterEnvironmentListProps, 'clusterId'> {
232232
handleClose: () => void
233233
installationId: string
234+
handleSuccess?: () => void
234235
}
235236

236237
export interface DeleteClusterPayload {

0 commit comments

Comments
 (0)