fix: 发送mml命令超时时间30秒
This commit is contained in:
@@ -374,11 +374,15 @@ export async function updateNeConfigReload(neType: string, neId: string) {
|
|||||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: ['reload'] },
|
data: { mml: ['reload'] },
|
||||||
|
timeout: 30_1000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
const v = result.data.data[0];
|
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;
|
delete result.data;
|
||||||
} else {
|
} else {
|
||||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export async function sendMMlByNE(
|
|||||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: [cmdStr] },
|
data: { mml: [cmdStr] },
|
||||||
|
timeout: 30_1000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ export async function sendMMlByOMC(neId: string, cmdStr: string) {
|
|||||||
url: `/api/rest/operationManagement/v1/elementType/OMC/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/OMC/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: [cmdStr] },
|
data: { mml: [cmdStr] },
|
||||||
|
timeout: 30_1000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
|||||||
@@ -31,15 +31,13 @@ export async function getMMLByUDM() {
|
|||||||
* @param cmdStr 命令串
|
* @param cmdStr 命令串
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export async function sendMMlByUDM(
|
export async function sendMMlByUDM(neId: string, cmdStr: string) {
|
||||||
neId: string,
|
|
||||||
cmdStr: string
|
|
||||||
) {
|
|
||||||
// 发起请求
|
// 发起请求
|
||||||
const result = await request({
|
const result = await request({
|
||||||
url: `/api/rest/operationManagement/v1/elementType/UDM/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/UDM/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: [cmdStr] },
|
data: { mml: [cmdStr] },
|
||||||
|
timeout: 30_1000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user