|
|
|
|
@ -205,10 +205,12 @@ const ComponentEnv = () => {
|
|
|
|
|
// 环境测试处理函数
|
|
|
|
|
const handleTestEnv = async (record: any) => {
|
|
|
|
|
setLoadingActions({ id: record.id, action: 'test' });
|
|
|
|
|
const loadingMessage = Message.loading(`正在测试环境 ${record.name}...`);
|
|
|
|
|
Message.loading({
|
|
|
|
|
content: `正在测试环境 ${record.name}...`,
|
|
|
|
|
duration: 0
|
|
|
|
|
});
|
|
|
|
|
try {
|
|
|
|
|
const res: any = await testEnv(record.id);
|
|
|
|
|
loadingMessage();
|
|
|
|
|
if (res.code === 200 && res.data) {
|
|
|
|
|
Notification.success({
|
|
|
|
|
closable: false,
|
|
|
|
|
@ -224,6 +226,7 @@ const ComponentEnv = () => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
Message.clear();
|
|
|
|
|
setLoadingActions({ id: null, action: null });
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|