You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
// If unchecking, reset confirmation and update form
49
+
setCredentialConfirmationStep(0);
50
+
form.setFieldsValue({[fieldName]:false});
51
+
return;
52
+
}
53
+
54
+
// First confirmation
55
+
if(credentialConfirmationStep===0){
56
+
Modal.confirm({
57
+
title:'Overwrite Credentials Warning',
58
+
icon:<ExclamationCircleOutlined/>,
59
+
content:(
60
+
<div>
61
+
<Alert
62
+
message="This action will overwrite existing credentials in the target environment."
63
+
description="This is a serious operation that may affect other applications and users. Are you sure you want to proceed?"
64
+
type="warning"
65
+
showIcon
66
+
style={{marginBottom:16}}
67
+
/>
68
+
</div>
69
+
),
70
+
okText:'Continue',
71
+
cancelText:'Cancel',
72
+
onOk:()=>{
73
+
setCredentialConfirmationStep(1);
74
+
// Show second confirmation immediately
75
+
showSecondConfirmation(fieldName);
76
+
},
77
+
onCancel:()=>{
78
+
setCredentialConfirmationStep(0);
79
+
form.setFieldsValue({[fieldName]:false});
80
+
}
81
+
});
82
+
}
83
+
};
84
+
85
+
constshowSecondConfirmation=(fieldName:string)=>{
86
+
Modal.confirm({
87
+
title:'Final Confirmation Required',
88
+
icon:<ExclamationCircleOutlined/>,
89
+
content:(
90
+
<div>
91
+
<Alert
92
+
message="Final Warning: Credential Overwrite"
93
+
description="You are about to overwrite credentials in the target environment. This action cannot be undone and may break existing integrations. Please confirm one more time."
94
+
type="error"
95
+
showIcon
96
+
style={{marginBottom:16}}
97
+
/>
98
+
<p><strong>Are you absolutely certain you want to overwrite the credentials?</strong></p>
99
+
</div>
100
+
),
101
+
okText:'Yes, Overwrite Credentials',
102
+
okType:'danger',
103
+
cancelText:'Cancel',
104
+
onOk:()=>{
105
+
setCredentialConfirmationStep(2);
106
+
form.setFieldsValue({[fieldName]:true});
107
+
},
108
+
onCancel:()=>{
109
+
setCredentialConfirmationStep(0);
110
+
form.setFieldsValue({[fieldName]:false});
111
+
}
112
+
});
113
+
};
114
+
42
115
consthandleDeploy=async()=>{
43
116
if(!config.deploy||!item)return;
44
117
@@ -50,6 +123,12 @@ function DeployItemModal({
50
123
messageInstance.error('Target environment not found');