fix: 发送mml命令超时时间30秒

This commit is contained in:
TsMask
2023-10-25 19:21:49 +08:00
parent 566020baa2
commit 749d83e00f
4 changed files with 9 additions and 5 deletions

View File

@@ -374,11 +374,15 @@ export async function updateNeConfigReload(neType: string, neId: string) {
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
method: 'post',
data: { mml: ['reload'] },
timeout: 30_1000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const v = result.data.data[0];
if (v && v.toLowerCase().includes('ok')) {
const str = v.toLowerCase();
if (str.indexOf('ok') !== -1) {
delete result.data;
} else if (str.indexOf('success') !== -1) {
delete result.data;
} else {
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };